diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Account.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Account.java index 6944a39d4..8464f272d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Account.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Account.java @@ -1,4237 +1,4243 @@ -package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.r5.model.Enumerations.*; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Block; - -/** - * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. - */ -@ResourceDef(name="Account", profile="http://hl7.org/fhir/StructureDefinition/Account") -public class Account extends DomainResource { - - public enum AccountStatus { - /** - * This account is active and may be used. - */ - ACTIVE, - /** - * This account is inactive and should not be used to track financial information. - */ - INACTIVE, - /** - * This instance should not have been part of this patient's medical record. - */ - ENTEREDINERROR, - /** - * This account is on hold. - */ - ONHOLD, - /** - * The account status is unknown. - */ - UNKNOWN, - /** - * added to help the parsers with the generic types - */ - NULL; - public static AccountStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return ACTIVE; - if ("inactive".equals(codeString)) - return INACTIVE; - if ("entered-in-error".equals(codeString)) - return ENTEREDINERROR; - if ("on-hold".equals(codeString)) - return ONHOLD; - if ("unknown".equals(codeString)) - return UNKNOWN; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACTIVE: return "active"; - case INACTIVE: return "inactive"; - case ENTEREDINERROR: return "entered-in-error"; - case ONHOLD: return "on-hold"; - case UNKNOWN: return "unknown"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ACTIVE: return "http://hl7.org/fhir/account-status"; - case INACTIVE: return "http://hl7.org/fhir/account-status"; - case ENTEREDINERROR: return "http://hl7.org/fhir/account-status"; - case ONHOLD: return "http://hl7.org/fhir/account-status"; - case UNKNOWN: return "http://hl7.org/fhir/account-status"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ACTIVE: return "This account is active and may be used."; - case INACTIVE: return "This account is inactive and should not be used to track financial information."; - case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; - case ONHOLD: return "This account is on hold."; - case UNKNOWN: return "The account status is unknown."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACTIVE: return "Active"; - case INACTIVE: return "Inactive"; - case ENTEREDINERROR: return "Entered in error"; - case ONHOLD: return "On Hold"; - case UNKNOWN: return "Unknown"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class AccountStatusEnumFactory implements EnumFactory { - public AccountStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return AccountStatus.ACTIVE; - if ("inactive".equals(codeString)) - return AccountStatus.INACTIVE; - if ("entered-in-error".equals(codeString)) - return AccountStatus.ENTEREDINERROR; - if ("on-hold".equals(codeString)) - return AccountStatus.ONHOLD; - if ("unknown".equals(codeString)) - return AccountStatus.UNKNOWN; - throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, AccountStatus.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, AccountStatus.NULL, code); - if ("active".equals(codeString)) - return new Enumeration(this, AccountStatus.ACTIVE, code); - if ("inactive".equals(codeString)) - return new Enumeration(this, AccountStatus.INACTIVE, code); - if ("entered-in-error".equals(codeString)) - return new Enumeration(this, AccountStatus.ENTEREDINERROR, code); - if ("on-hold".equals(codeString)) - return new Enumeration(this, AccountStatus.ONHOLD, code); - if ("unknown".equals(codeString)) - return new Enumeration(this, AccountStatus.UNKNOWN, code); - throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); - } - public String toCode(AccountStatus code) { - if (code == AccountStatus.ACTIVE) - return "active"; - if (code == AccountStatus.INACTIVE) - return "inactive"; - if (code == AccountStatus.ENTEREDINERROR) - return "entered-in-error"; - if (code == AccountStatus.ONHOLD) - return "on-hold"; - if (code == AccountStatus.UNKNOWN) - return "unknown"; - return "?"; - } - public String toSystem(AccountStatus code) { - return code.getSystem(); - } - } - - @Block() - public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { - /** +package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; + +/** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. + */ +@ResourceDef(name="Account", profile="http://hl7.org/fhir/StructureDefinition/Account") +public class Account extends DomainResource { + + public enum AccountStatus { + /** + * This account is active and may be used. + */ + ACTIVE, + /** + * This account is inactive and should not be used to track financial information. + */ + INACTIVE, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * This account is on hold. + */ + ONHOLD, + /** + * The account status is unknown. + */ + UNKNOWN, + /** + * added to help the parsers with the generic types + */ + NULL; + public static AccountStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("inactive".equals(codeString)) + return INACTIVE; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("unknown".equals(codeString)) + return UNKNOWN; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case INACTIVE: return "inactive"; + case ENTEREDINERROR: return "entered-in-error"; + case ONHOLD: return "on-hold"; + case UNKNOWN: return "unknown"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/account-status"; + case INACTIVE: return "http://hl7.org/fhir/account-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/account-status"; + case ONHOLD: return "http://hl7.org/fhir/account-status"; + case UNKNOWN: return "http://hl7.org/fhir/account-status"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "This account is active and may be used."; + case INACTIVE: return "This account is inactive and should not be used to track financial information."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case ONHOLD: return "This account is on hold."; + case UNKNOWN: return "The account status is unknown."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case INACTIVE: return "Inactive"; + case ENTEREDINERROR: return "Entered in error"; + case ONHOLD: return "On Hold"; + case UNKNOWN: return "Unknown"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class AccountStatusEnumFactory implements EnumFactory { + public AccountStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return AccountStatus.ACTIVE; + if ("inactive".equals(codeString)) + return AccountStatus.INACTIVE; + if ("entered-in-error".equals(codeString)) + return AccountStatus.ENTEREDINERROR; + if ("on-hold".equals(codeString)) + return AccountStatus.ONHOLD; + if ("unknown".equals(codeString)) + return AccountStatus.UNKNOWN; + throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, AccountStatus.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, AccountStatus.NULL, code); + if ("active".equals(codeString)) + return new Enumeration(this, AccountStatus.ACTIVE, code); + if ("inactive".equals(codeString)) + return new Enumeration(this, AccountStatus.INACTIVE, code); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, AccountStatus.ENTEREDINERROR, code); + if ("on-hold".equals(codeString)) + return new Enumeration(this, AccountStatus.ONHOLD, code); + if ("unknown".equals(codeString)) + return new Enumeration(this, AccountStatus.UNKNOWN, code); + throw new FHIRException("Unknown AccountStatus code '"+codeString+"'"); + } + public String toCode(AccountStatus code) { + if (code == AccountStatus.NULL) + return null; + if (code == AccountStatus.ACTIVE) + return "active"; + if (code == AccountStatus.INACTIVE) + return "inactive"; + if (code == AccountStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == AccountStatus.ONHOLD) + return "on-hold"; + if (code == AccountStatus.UNKNOWN) + return "unknown"; + return "?"; + } + public String toSystem(AccountStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { + /** * The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). -A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing. - */ - @Child(name = "coverage", type = {Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="The party(s), such as insurances, that may contribute to the payment of this account", formalDefinition="The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing." ) - protected Reference coverage; - - /** - * The priority of the coverage in the context of this account. - */ - @Child(name = "priority", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The priority of the coverage in the context of this account", formalDefinition="The priority of the coverage in the context of this account." ) - protected PositiveIntType priority; - - private static final long serialVersionUID = 1695665065L; - - /** - * Constructor - */ - public CoverageComponent() { - super(); - } - - /** - * Constructor - */ - public CoverageComponent(Reference coverage) { - super(); - this.setCoverage(coverage); - } - - /** +A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing. + */ + @Child(name = "coverage", type = {Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The party(s), such as insurances, that may contribute to the payment of this account", formalDefinition="The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing." ) + protected Reference coverage; + + /** + * The priority of the coverage in the context of this account. + */ + @Child(name = "priority", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The priority of the coverage in the context of this account", formalDefinition="The priority of the coverage in the context of this account." ) + protected PositiveIntType priority; + + private static final long serialVersionUID = 1695665065L; + + /** + * Constructor + */ + public CoverageComponent() { + super(); + } + + /** + * Constructor + */ + public CoverageComponent(Reference coverage) { + super(); + this.setCoverage(coverage); + } + + /** * @return {@link #coverage} (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). -A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.) - */ - 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 - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** +A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.) + */ + 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 + return this.coverage; + } + + public boolean hasCoverage() { + return this.coverage != null && !this.coverage.isEmpty(); + } + + /** * @param value {@link #coverage} (The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay). -A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.) - */ - public CoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #priority} (The priority of the coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value - */ - public PositiveIntType getPriorityElement() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new PositiveIntType(); // 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 coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value - */ - public CoverageComponent setPriorityElement(PositiveIntType value) { - this.priority = value; - return this; - } - - /** - * @return The priority of the coverage in the context of this account. - */ - public int getPriority() { - return this.priority == null || this.priority.isEmpty() ? 0 : this.priority.getValue(); - } - - /** - * @param value The priority of the coverage in the context of this account. - */ - public CoverageComponent setPriority(int value) { - if (this.priority == null) - this.priority = new PositiveIntType(); - this.priority.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("coverage", "Reference(Coverage)", "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 0, 1, coverage)); - children.add(new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 0, 1, coverage); - case -1165461084: /*priority*/ return new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference - case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // PositiveIntType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -351767064: // coverage - this.coverage = TypeConvertor.castToReference(value); // Reference - return value; - case -1165461084: // priority - this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("coverage")) { - this.coverage = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("priority")) { - this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("coverage")) { - this.coverage = null; - } else if (name.equals("priority")) { - this.priority = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -351767064: return getCoverage(); - case -1165461084: return getPriorityElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -351767064: /*coverage*/ return new String[] {"Reference"}; - case -1165461084: /*priority*/ return new String[] {"positiveInt"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("coverage")) { - this.coverage = new Reference(); - return this.coverage; - } - else if (name.equals("priority")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.coverage.priority"); - } - else - return super.addChild(name); - } - - public CoverageComponent copy() { - CoverageComponent dst = new CoverageComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(CoverageComponent dst) { - super.copyValues(dst); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.priority = priority == null ? null : priority.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other_; - return compareDeep(coverage, o.coverage, true) && compareDeep(priority, o.priority, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other_; - return compareValues(priority, o.priority, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, priority); - } - - public String fhirType() { - return "Account.coverage"; - - } - - } - - @Block() - public static class GuarantorComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The entity who is responsible. - */ - @Child(name = "party", type = {Patient.class, RelatedPerson.class, Organization.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Responsible entity", formalDefinition="The entity who is responsible." ) - protected Reference party; - - /** - * A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. - */ - @Child(name = "onHold", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Credit or other hold applied", formalDefinition="A guarantor may be placed on credit hold or otherwise have their role temporarily suspended." ) - protected BooleanType onHold; - - /** - * The timeframe during which the guarantor accepts responsibility for the account. - */ - @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Guarantee account during", formalDefinition="The timeframe during which the guarantor accepts responsibility for the account." ) - protected Period period; - - private static final long serialVersionUID = -523056773L; - - /** - * Constructor - */ - public GuarantorComponent() { - super(); - } - - /** - * Constructor - */ - public GuarantorComponent(Reference party) { - super(); - this.setParty(party); - } - - /** - * @return {@link #party} (The entity who is responsible.) - */ - public Reference getParty() { - if (this.party == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuarantorComponent.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} (The entity who is responsible.) - */ - public GuarantorComponent setParty(Reference value) { - this.party = value; - return this; - } - - /** - * @return {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value - */ - public BooleanType getOnHoldElement() { - if (this.onHold == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuarantorComponent.onHold"); - else if (Configuration.doAutoCreate()) - this.onHold = new BooleanType(); // bb - return this.onHold; - } - - public boolean hasOnHoldElement() { - return this.onHold != null && !this.onHold.isEmpty(); - } - - public boolean hasOnHold() { - return this.onHold != null && !this.onHold.isEmpty(); - } - - /** - * @param value {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value - */ - public GuarantorComponent setOnHoldElement(BooleanType value) { - this.onHold = value; - return this; - } - - /** - * @return A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. - */ - public boolean getOnHold() { - return this.onHold == null || this.onHold.isEmpty() ? false : this.onHold.getValue(); - } - - /** - * @param value A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. - */ - public GuarantorComponent setOnHold(boolean value) { - if (this.onHold == null) - this.onHold = new BooleanType(); - this.onHold.setValue(value); - return this; - } - - /** - * @return {@link #period} (The timeframe during which the guarantor accepts responsibility for the account.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuarantorComponent.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 timeframe during which the guarantor accepts responsibility for the account.) - */ - public GuarantorComponent setPeriod(Period value) { - this.period = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party)); - children.add(new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold)); - children.add(new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 106437350: /*party*/ return new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party); - case -1013289154: /*onHold*/ return new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold); - case -991726143: /*period*/ return new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference - case -1013289154: /*onHold*/ return this.onHold == null ? new Base[0] : new Base[] {this.onHold}; // BooleanType - case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 106437350: // party - this.party = TypeConvertor.castToReference(value); // Reference - return value; - case -1013289154: // onHold - this.onHold = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -991726143: // period - this.period = TypeConvertor.castToPeriod(value); // Period - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("party")) { - this.party = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("onHold")) { - this.onHold = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("period")) { - this.period = TypeConvertor.castToPeriod(value); // Period - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("party")) { - this.party = null; - } else if (name.equals("onHold")) { - this.onHold = null; - } else if (name.equals("period")) { - this.period = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 106437350: return getParty(); - case -1013289154: return getOnHoldElement(); - case -991726143: return getPeriod(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 106437350: /*party*/ return new String[] {"Reference"}; - case -1013289154: /*onHold*/ return new String[] {"boolean"}; - case -991726143: /*period*/ return new String[] {"Period"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("party")) { - this.party = new Reference(); - return this.party; - } - else if (name.equals("onHold")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.guarantor.onHold"); - } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; - } - else - return super.addChild(name); - } - - public GuarantorComponent copy() { - GuarantorComponent dst = new GuarantorComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(GuarantorComponent dst) { - super.copyValues(dst); - dst.party = party == null ? null : party.copy(); - dst.onHold = onHold == null ? null : onHold.copy(); - dst.period = period == null ? null : period.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof GuarantorComponent)) - return false; - GuarantorComponent o = (GuarantorComponent) other_; - return compareDeep(party, o.party, true) && compareDeep(onHold, o.onHold, true) && compareDeep(period, o.period, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof GuarantorComponent)) - return false; - GuarantorComponent o = (GuarantorComponent) other_; - return compareValues(onHold, o.onHold, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(party, onHold, period); - } - - public String fhirType() { - return "Account.guarantor"; - - } - - } - - @Block() - public static class AccountDiagnosisComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Ranking of the diagnosis (for each type). - */ - @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Ranking of the diagnosis (for each type)", formalDefinition="Ranking of the diagnosis (for each type)." ) - protected PositiveIntType sequence; - - /** - * The diagnosis relevant to the account. - */ - @Child(name = "condition", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="The diagnosis relevant to the account", formalDefinition="The diagnosis relevant to the account." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") - protected CodeableReference condition; - - /** - * Ranking of the diagnosis (for each type). - */ - @Child(name = "dateOfDiagnosis", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Date of the diagnosis (when coded diagnosis)", formalDefinition="Ranking of the diagnosis (for each type)." ) - protected DateTimeType dateOfDiagnosis; - - /** - * Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …). - */ - @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …)", formalDefinition="Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diagnosis-use") - protected List type; - - /** - * Was the Diagnosis present on Admission in the related Encounter. - */ - @Child(name = "onAdmission", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Diagnosis present on Admission", formalDefinition="Was the Diagnosis present on Admission in the related Encounter." ) - protected BooleanType onAdmission; - - /** - * The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs. - */ - @Child(name = "packageCode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Package Code specific for billing", formalDefinition="The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs." ) - protected List packageCode; - - private static final long serialVersionUID = 57125500L; - - /** - * Constructor - */ - public AccountDiagnosisComponent() { - super(); - } - - /** - * Constructor - */ - public AccountDiagnosisComponent(CodeableReference condition) { - super(); - this.setCondition(condition); - } - - /** - * @return {@link #sequence} (Ranking of the diagnosis (for each type).). 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 AccountDiagnosisComponent.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} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public AccountDiagnosisComponent setSequenceElement(PositiveIntType value) { - this.sequence = value; - return this; - } - - /** - * @return Ranking of the diagnosis (for each type). - */ - public int getSequence() { - return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); - } - - /** - * @param value Ranking of the diagnosis (for each type). - */ - public AccountDiagnosisComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new PositiveIntType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #condition} (The diagnosis relevant to the account.) - */ - public CodeableReference getCondition() { - if (this.condition == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountDiagnosisComponent.condition"); - else if (Configuration.doAutoCreate()) - this.condition = new CodeableReference(); // cc - return this.condition; - } - - public boolean hasCondition() { - return this.condition != null && !this.condition.isEmpty(); - } - - /** - * @param value {@link #condition} (The diagnosis relevant to the account.) - */ - public AccountDiagnosisComponent setCondition(CodeableReference value) { - this.condition = value; - return this; - } - - /** - * @return {@link #dateOfDiagnosis} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getDateOfDiagnosis" gives direct access to the value - */ - public DateTimeType getDateOfDiagnosisElement() { - if (this.dateOfDiagnosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountDiagnosisComponent.dateOfDiagnosis"); - else if (Configuration.doAutoCreate()) - this.dateOfDiagnosis = new DateTimeType(); // bb - return this.dateOfDiagnosis; - } - - public boolean hasDateOfDiagnosisElement() { - return this.dateOfDiagnosis != null && !this.dateOfDiagnosis.isEmpty(); - } - - public boolean hasDateOfDiagnosis() { - return this.dateOfDiagnosis != null && !this.dateOfDiagnosis.isEmpty(); - } - - /** - * @param value {@link #dateOfDiagnosis} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getDateOfDiagnosis" gives direct access to the value - */ - public AccountDiagnosisComponent setDateOfDiagnosisElement(DateTimeType value) { - this.dateOfDiagnosis = value; - return this; - } - - /** - * @return Ranking of the diagnosis (for each type). - */ - public Date getDateOfDiagnosis() { - return this.dateOfDiagnosis == null ? null : this.dateOfDiagnosis.getValue(); - } - - /** - * @param value Ranking of the diagnosis (for each type). - */ - public AccountDiagnosisComponent setDateOfDiagnosis(Date value) { - if (value == null) - this.dateOfDiagnosis = null; - else { - if (this.dateOfDiagnosis == null) - this.dateOfDiagnosis = new DateTimeType(); - this.dateOfDiagnosis.setValue(value); - } - return this; - } - - /** - * @return {@link #type} (Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AccountDiagnosisComponent setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public AccountDiagnosisComponent addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #onAdmission} (Was the Diagnosis present on Admission in the related Encounter.). This is the underlying object with id, value and extensions. The accessor "getOnAdmission" gives direct access to the value - */ - public BooleanType getOnAdmissionElement() { - if (this.onAdmission == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountDiagnosisComponent.onAdmission"); - else if (Configuration.doAutoCreate()) - this.onAdmission = new BooleanType(); // bb - return this.onAdmission; - } - - public boolean hasOnAdmissionElement() { - return this.onAdmission != null && !this.onAdmission.isEmpty(); - } - - public boolean hasOnAdmission() { - return this.onAdmission != null && !this.onAdmission.isEmpty(); - } - - /** - * @param value {@link #onAdmission} (Was the Diagnosis present on Admission in the related Encounter.). This is the underlying object with id, value and extensions. The accessor "getOnAdmission" gives direct access to the value - */ - public AccountDiagnosisComponent setOnAdmissionElement(BooleanType value) { - this.onAdmission = value; - return this; - } - - /** - * @return Was the Diagnosis present on Admission in the related Encounter. - */ - public boolean getOnAdmission() { - return this.onAdmission == null || this.onAdmission.isEmpty() ? false : this.onAdmission.getValue(); - } - - /** - * @param value Was the Diagnosis present on Admission in the related Encounter. - */ - public AccountDiagnosisComponent setOnAdmission(boolean value) { - if (this.onAdmission == null) - this.onAdmission = new BooleanType(); - this.onAdmission.setValue(value); - return this; - } - - /** - * @return {@link #packageCode} (The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.) - */ - public List getPackageCode() { - if (this.packageCode == null) - this.packageCode = new ArrayList(); - return this.packageCode; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AccountDiagnosisComponent setPackageCode(List thePackageCode) { - this.packageCode = thePackageCode; - return this; - } - - public boolean hasPackageCode() { - if (this.packageCode == null) - return false; - for (CodeableConcept item : this.packageCode) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addPackageCode() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.packageCode == null) - this.packageCode = new ArrayList(); - this.packageCode.add(t); - return t; - } - - public AccountDiagnosisComponent addPackageCode(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.packageCode == null) - this.packageCode = new ArrayList(); - this.packageCode.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #packageCode}, creating it if it does not already exist {3} - */ - public CodeableConcept getPackageCodeFirstRep() { - if (getPackageCode().isEmpty()) { - addPackageCode(); - } - return getPackageCode().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("sequence", "positiveInt", "Ranking of the diagnosis (for each type).", 0, 1, sequence)); - children.add(new Property("condition", "CodeableReference(Condition)", "The diagnosis relevant to the account.", 0, 1, condition)); - children.add(new Property("dateOfDiagnosis", "dateTime", "Ranking of the diagnosis (for each type).", 0, 1, dateOfDiagnosis)); - children.add(new Property("type", "CodeableConcept", "Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("onAdmission", "boolean", "Was the Diagnosis present on Admission in the related Encounter.", 0, 1, onAdmission)); - children.add(new Property("packageCode", "CodeableConcept", "The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Ranking of the diagnosis (for each type).", 0, 1, sequence); - case -861311717: /*condition*/ return new Property("condition", "CodeableReference(Condition)", "The diagnosis relevant to the account.", 0, 1, condition); - case -774562228: /*dateOfDiagnosis*/ return new Property("dateOfDiagnosis", "dateTime", "Ranking of the diagnosis (for each type).", 0, 1, dateOfDiagnosis); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, type); - case -3386134: /*onAdmission*/ return new Property("onAdmission", "boolean", "Was the Diagnosis present on Admission in the related Encounter.", 0, 1, onAdmission); - case 908444499: /*packageCode*/ return new Property("packageCode", "CodeableConcept", "The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType - case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // CodeableReference - case -774562228: /*dateOfDiagnosis*/ return this.dateOfDiagnosis == null ? new Base[0] : new Base[] {this.dateOfDiagnosis}; // DateTimeType - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case -3386134: /*onAdmission*/ return this.onAdmission == null ? new Base[0] : new Base[] {this.onAdmission}; // BooleanType - case 908444499: /*packageCode*/ return this.packageCode == null ? new Base[0] : this.packageCode.toArray(new Base[this.packageCode.size()]); // CodeableConcept - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 1349547969: // sequence - this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case -861311717: // condition - this.condition = TypeConvertor.castToCodeableReference(value); // CodeableReference - return value; - case -774562228: // dateOfDiagnosis - this.dateOfDiagnosis = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -3386134: // onAdmission - this.onAdmission = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case 908444499: // packageCode - this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("sequence")) { - this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("condition")) { - this.condition = TypeConvertor.castToCodeableReference(value); // CodeableReference - } else if (name.equals("dateOfDiagnosis")) { - this.dateOfDiagnosis = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("onAdmission")) { - this.onAdmission = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("packageCode")) { - this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("sequence")) { - this.sequence = null; - } else if (name.equals("condition")) { - this.condition = null; - } else if (name.equals("dateOfDiagnosis")) { - this.dateOfDiagnosis = null; - } else if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("onAdmission")) { - this.onAdmission = null; - } else if (name.equals("packageCode")) { - this.getPackageCode().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1349547969: return getSequenceElement(); - case -861311717: return getCondition(); - case -774562228: return getDateOfDiagnosisElement(); - case 3575610: return addType(); - case -3386134: return getOnAdmissionElement(); - case 908444499: return addPackageCode(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; - case -861311717: /*condition*/ return new String[] {"CodeableReference"}; - case -774562228: /*dateOfDiagnosis*/ return new String[] {"dateTime"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case -3386134: /*onAdmission*/ return new String[] {"boolean"}; - case 908444499: /*packageCode*/ return new String[] {"CodeableConcept"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.sequence"); - } - else if (name.equals("condition")) { - this.condition = new CodeableReference(); - return this.condition; - } - else if (name.equals("dateOfDiagnosis")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.dateOfDiagnosis"); - } - else if (name.equals("type")) { - return addType(); - } - else if (name.equals("onAdmission")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.onAdmission"); - } - else if (name.equals("packageCode")) { - return addPackageCode(); - } - else - return super.addChild(name); - } - - public AccountDiagnosisComponent copy() { - AccountDiagnosisComponent dst = new AccountDiagnosisComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AccountDiagnosisComponent dst) { - super.copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.condition = condition == null ? null : condition.copy(); - dst.dateOfDiagnosis = dateOfDiagnosis == null ? null : dateOfDiagnosis.copy(); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - dst.onAdmission = onAdmission == null ? null : onAdmission.copy(); - if (packageCode != null) { - dst.packageCode = new ArrayList(); - for (CodeableConcept i : packageCode) - dst.packageCode.add(i.copy()); - }; - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AccountDiagnosisComponent)) - return false; - AccountDiagnosisComponent o = (AccountDiagnosisComponent) other_; - return compareDeep(sequence, o.sequence, true) && compareDeep(condition, o.condition, true) && compareDeep(dateOfDiagnosis, o.dateOfDiagnosis, true) - && compareDeep(type, o.type, true) && compareDeep(onAdmission, o.onAdmission, true) && compareDeep(packageCode, o.packageCode, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AccountDiagnosisComponent)) - return false; - AccountDiagnosisComponent o = (AccountDiagnosisComponent) other_; - return compareValues(sequence, o.sequence, true) && compareValues(dateOfDiagnosis, o.dateOfDiagnosis, true) - && compareValues(onAdmission, o.onAdmission, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, condition, dateOfDiagnosis - , type, onAdmission, packageCode); - } - - public String fhirType() { - return "Account.diagnosis"; - - } - - } - - @Block() - public static class AccountProcedureComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Ranking of the procedure (for each type). - */ - @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Ranking of the procedure (for each type)", formalDefinition="Ranking of the procedure (for each type)." ) - protected PositiveIntType sequence; - - /** - * The procedure relevant to the account. - */ - @Child(name = "code", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="The procedure relevant to the account", formalDefinition="The procedure relevant to the account." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code") - protected CodeableReference code; - - /** - * Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. - */ - @Child(name = "dateOfService", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Date of the procedure (when coded procedure)", formalDefinition="Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used." ) - protected DateTimeType dateOfService; - - /** - * How this procedure value should be used in charging the account. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="How this procedure value should be used in charging the account", formalDefinition="How this procedure value should be used in charging the account." ) - protected List type; - - /** - * The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs. - */ - @Child(name = "packageCode", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Package Code specific for billing", formalDefinition="The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs." ) - protected List packageCode; - - /** - * Any devices that were associated with the procedure relevant to the account. - */ - @Child(name = "device", type = {Device.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Any devices that were associated with the procedure", formalDefinition="Any devices that were associated with the procedure relevant to the account." ) - protected List device; - - private static final long serialVersionUID = -797201673L; - - /** - * Constructor - */ - public AccountProcedureComponent() { - super(); - } - - /** - * Constructor - */ - public AccountProcedureComponent(CodeableReference code) { - super(); - this.setCode(code); - } - - /** - * @return {@link #sequence} (Ranking of the procedure (for each type).). 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 AccountProcedureComponent.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} (Ranking of the procedure (for each type).). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public AccountProcedureComponent setSequenceElement(PositiveIntType value) { - this.sequence = value; - return this; - } - - /** - * @return Ranking of the procedure (for each type). - */ - public int getSequence() { - return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); - } - - /** - * @param value Ranking of the procedure (for each type). - */ - public AccountProcedureComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new PositiveIntType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #code} (The procedure relevant to the account.) - */ - public CodeableReference getCode() { - if (this.code == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountProcedureComponent.code"); - else if (Configuration.doAutoCreate()) - this.code = new CodeableReference(); // cc - return this.code; - } - - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); - } - - /** - * @param value {@link #code} (The procedure relevant to the account.) - */ - public AccountProcedureComponent setCode(CodeableReference value) { - this.code = value; - return this; - } - - /** - * @return {@link #dateOfService} (Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.). This is the underlying object with id, value and extensions. The accessor "getDateOfService" gives direct access to the value - */ - public DateTimeType getDateOfServiceElement() { - if (this.dateOfService == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountProcedureComponent.dateOfService"); - else if (Configuration.doAutoCreate()) - this.dateOfService = new DateTimeType(); // bb - return this.dateOfService; - } - - public boolean hasDateOfServiceElement() { - return this.dateOfService != null && !this.dateOfService.isEmpty(); - } - - public boolean hasDateOfService() { - return this.dateOfService != null && !this.dateOfService.isEmpty(); - } - - /** - * @param value {@link #dateOfService} (Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.). This is the underlying object with id, value and extensions. The accessor "getDateOfService" gives direct access to the value - */ - public AccountProcedureComponent setDateOfServiceElement(DateTimeType value) { - this.dateOfService = value; - return this; - } - - /** - * @return Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. - */ - public Date getDateOfService() { - return this.dateOfService == null ? null : this.dateOfService.getValue(); - } - - /** - * @param value Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. - */ - public AccountProcedureComponent setDateOfService(Date value) { - if (value == null) - this.dateOfService = null; - else { - if (this.dateOfService == null) - this.dateOfService = new DateTimeType(); - this.dateOfService.setValue(value); - } - return this; - } - - /** - * @return {@link #type} (How this procedure value should be used in charging the account.) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AccountProcedureComponent setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public AccountProcedureComponent addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #packageCode} (The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.) - */ - public List getPackageCode() { - if (this.packageCode == null) - this.packageCode = new ArrayList(); - return this.packageCode; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AccountProcedureComponent setPackageCode(List thePackageCode) { - this.packageCode = thePackageCode; - return this; - } - - public boolean hasPackageCode() { - if (this.packageCode == null) - return false; - for (CodeableConcept item : this.packageCode) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addPackageCode() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.packageCode == null) - this.packageCode = new ArrayList(); - this.packageCode.add(t); - return t; - } - - public AccountProcedureComponent addPackageCode(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.packageCode == null) - this.packageCode = new ArrayList(); - this.packageCode.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #packageCode}, creating it if it does not already exist {3} - */ - public CodeableConcept getPackageCodeFirstRep() { - if (getPackageCode().isEmpty()) { - addPackageCode(); - } - return getPackageCode().get(0); - } - - /** - * @return {@link #device} (Any devices that were associated with the procedure relevant to the account.) - */ - public List getDevice() { - if (this.device == null) - this.device = new ArrayList(); - return this.device; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AccountProcedureComponent setDevice(List theDevice) { - this.device = theDevice; - return this; - } - - public boolean hasDevice() { - if (this.device == null) - return false; - for (Reference item : this.device) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addDevice() { //3 - Reference t = new Reference(); - if (this.device == null) - this.device = new ArrayList(); - this.device.add(t); - return t; - } - - public AccountProcedureComponent addDevice(Reference t) { //3 - if (t == null) - return this; - if (this.device == null) - this.device = new ArrayList(); - this.device.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #device}, creating it if it does not already exist {3} - */ - public Reference getDeviceFirstRep() { - if (getDevice().isEmpty()) { - addDevice(); - } - return getDevice().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("sequence", "positiveInt", "Ranking of the procedure (for each type).", 0, 1, sequence)); - children.add(new Property("code", "CodeableReference(Procedure)", "The procedure relevant to the account.", 0, 1, code)); - children.add(new Property("dateOfService", "dateTime", "Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.", 0, 1, dateOfService)); - children.add(new Property("type", "CodeableConcept", "How this procedure value should be used in charging the account.", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("packageCode", "CodeableConcept", "The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode)); - children.add(new Property("device", "Reference(Device)", "Any devices that were associated with the procedure relevant to the account.", 0, java.lang.Integer.MAX_VALUE, device)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Ranking of the procedure (for each type).", 0, 1, sequence); - case 3059181: /*code*/ return new Property("code", "CodeableReference(Procedure)", "The procedure relevant to the account.", 0, 1, code); - case -328510256: /*dateOfService*/ return new Property("dateOfService", "dateTime", "Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.", 0, 1, dateOfService); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "How this procedure value should be used in charging the account.", 0, java.lang.Integer.MAX_VALUE, type); - case 908444499: /*packageCode*/ return new Property("packageCode", "CodeableConcept", "The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode); - case -1335157162: /*device*/ return new Property("device", "Reference(Device)", "Any devices that were associated with the procedure relevant to the account.", 0, java.lang.Integer.MAX_VALUE, device); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType - case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableReference - case -328510256: /*dateOfService*/ return this.dateOfService == null ? new Base[0] : new Base[] {this.dateOfService}; // DateTimeType - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case 908444499: /*packageCode*/ return this.packageCode == null ? new Base[0] : this.packageCode.toArray(new Base[this.packageCode.size()]); // CodeableConcept - case -1335157162: /*device*/ return this.device == null ? new Base[0] : this.device.toArray(new Base[this.device.size()]); // Reference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 1349547969: // sequence - this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case 3059181: // code - this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference - return value; - case -328510256: // dateOfService - this.dateOfService = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 908444499: // packageCode - this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1335157162: // device - this.getDevice().add(TypeConvertor.castToReference(value)); // Reference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("sequence")) { - this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("code")) { - this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference - } else if (name.equals("dateOfService")) { - this.dateOfService = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("packageCode")) { - this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("device")) { - this.getDevice().add(TypeConvertor.castToReference(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("sequence")) { - this.sequence = null; - } else if (name.equals("code")) { - this.code = null; - } else if (name.equals("dateOfService")) { - this.dateOfService = null; - } else if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("packageCode")) { - this.getPackageCode().remove(value); - } else if (name.equals("device")) { - this.getDevice().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1349547969: return getSequenceElement(); - case 3059181: return getCode(); - case -328510256: return getDateOfServiceElement(); - case 3575610: return addType(); - case 908444499: return addPackageCode(); - case -1335157162: return addDevice(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; - case 3059181: /*code*/ return new String[] {"CodeableReference"}; - case -328510256: /*dateOfService*/ return new String[] {"dateTime"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case 908444499: /*packageCode*/ return new String[] {"CodeableConcept"}; - case -1335157162: /*device*/ return new String[] {"Reference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.procedure.sequence"); - } - else if (name.equals("code")) { - this.code = new CodeableReference(); - return this.code; - } - else if (name.equals("dateOfService")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.procedure.dateOfService"); - } - else if (name.equals("type")) { - return addType(); - } - else if (name.equals("packageCode")) { - return addPackageCode(); - } - else if (name.equals("device")) { - return addDevice(); - } - else - return super.addChild(name); - } - - public AccountProcedureComponent copy() { - AccountProcedureComponent dst = new AccountProcedureComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AccountProcedureComponent dst) { - super.copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.code = code == null ? null : code.copy(); - dst.dateOfService = dateOfService == null ? null : dateOfService.copy(); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - if (packageCode != null) { - dst.packageCode = new ArrayList(); - for (CodeableConcept i : packageCode) - dst.packageCode.add(i.copy()); - }; - if (device != null) { - dst.device = new ArrayList(); - for (Reference i : device) - dst.device.add(i.copy()); - }; - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AccountProcedureComponent)) - return false; - AccountProcedureComponent o = (AccountProcedureComponent) other_; - return compareDeep(sequence, o.sequence, true) && compareDeep(code, o.code, true) && compareDeep(dateOfService, o.dateOfService, true) - && compareDeep(type, o.type, true) && compareDeep(packageCode, o.packageCode, true) && compareDeep(device, o.device, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AccountProcedureComponent)) - return false; - AccountProcedureComponent o = (AccountProcedureComponent) other_; - return compareValues(sequence, o.sequence, true) && compareValues(dateOfService, o.dateOfService, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, code, dateOfService - , type, packageCode, device); - } - - public String fhirType() { - return "Account.procedure"; - - } - - } - - @Block() - public static class AccountRelatedAccountComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Relationship of the associated Account. - */ - @Child(name = "relationship", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Relationship of the associated Account", formalDefinition="Relationship of the associated Account." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-relationship") - protected CodeableConcept relationship; - - /** - * Reference to an associated Account. - */ - @Child(name = "account", type = {Account.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Reference to an associated Account", formalDefinition="Reference to an associated Account." ) - protected Reference account; - - private static final long serialVersionUID = 1586291361L; - - /** - * Constructor - */ - public AccountRelatedAccountComponent() { - super(); - } - - /** - * Constructor - */ - public AccountRelatedAccountComponent(Reference account) { - super(); - this.setAccount(account); - } - - /** - * @return {@link #relationship} (Relationship of the associated Account.) - */ - public CodeableConcept getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountRelatedAccountComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new CodeableConcept(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (Relationship of the associated Account.) - */ - public AccountRelatedAccountComponent setRelationship(CodeableConcept value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #account} (Reference to an associated Account.) - */ - public Reference getAccount() { - if (this.account == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountRelatedAccountComponent.account"); - else if (Configuration.doAutoCreate()) - this.account = new Reference(); // cc - return this.account; - } - - public boolean hasAccount() { - return this.account != null && !this.account.isEmpty(); - } - - /** - * @param value {@link #account} (Reference to an associated Account.) - */ - public AccountRelatedAccountComponent setAccount(Reference value) { - this.account = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("relationship", "CodeableConcept", "Relationship of the associated Account.", 0, 1, relationship)); - children.add(new Property("account", "Reference(Account)", "Reference to an associated Account.", 0, 1, account)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "Relationship of the associated Account.", 0, 1, relationship); - case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "Reference to an associated Account.", 0, 1, account); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept - case -1177318867: /*account*/ return this.account == null ? new Base[0] : new Base[] {this.account}; // Reference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -261851592: // relationship - this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1177318867: // account - this.account = TypeConvertor.castToReference(value); // Reference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("relationship")) { - this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("account")) { - this.account = TypeConvertor.castToReference(value); // Reference - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("relationship")) { - this.relationship = null; - } else if (name.equals("account")) { - this.account = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -261851592: return getRelationship(); - case -1177318867: return getAccount(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -261851592: /*relationship*/ return new String[] {"CodeableConcept"}; - case -1177318867: /*account*/ return new String[] {"Reference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("relationship")) { - this.relationship = new CodeableConcept(); - return this.relationship; - } - else if (name.equals("account")) { - this.account = new Reference(); - return this.account; - } - else - return super.addChild(name); - } - - public AccountRelatedAccountComponent copy() { - AccountRelatedAccountComponent dst = new AccountRelatedAccountComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AccountRelatedAccountComponent dst) { - super.copyValues(dst); - dst.relationship = relationship == null ? null : relationship.copy(); - dst.account = account == null ? null : account.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AccountRelatedAccountComponent)) - return false; - AccountRelatedAccountComponent o = (AccountRelatedAccountComponent) other_; - return compareDeep(relationship, o.relationship, true) && compareDeep(account, o.account, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AccountRelatedAccountComponent)) - return false; - AccountRelatedAccountComponent o = (AccountRelatedAccountComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationship, account); - } - - public String fhirType() { - return "Account.relatedAccount"; - - } - - } - - @Block() - public static class AccountBalanceComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Who is expected to pay this part of the balance. - */ - @Child(name = "aggregate", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Who is expected to pay this part of the balance", formalDefinition="Who is expected to pay this part of the balance." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-aggregate") - protected CodeableConcept aggregate; - - /** - * The term of the account balances - The balance value is the amount that was outstanding for this age. - */ - @Child(name = "term", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="current | 30 | 60 | 90 | 120", formalDefinition="The term of the account balances - The balance value is the amount that was outstanding for this age." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-balance-term") - protected CodeableConcept term; - - /** - * The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). - */ - @Child(name = "estimate", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Estimated balance", formalDefinition="The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process)." ) - protected BooleanType estimate; - - /** - * The actual balance value calculated for the age defined in the term property. - */ - @Child(name = "amount", type = {Money.class}, order=4, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Calculated amount", formalDefinition="The actual balance value calculated for the age defined in the term property." ) - protected Money amount; - - private static final long serialVersionUID = -338990145L; - - /** - * Constructor - */ - public AccountBalanceComponent() { - super(); - } - - /** - * Constructor - */ - public AccountBalanceComponent(Money amount) { - super(); - this.setAmount(amount); - } - - /** - * @return {@link #aggregate} (Who is expected to pay this part of the balance.) - */ - public CodeableConcept getAggregate() { - if (this.aggregate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountBalanceComponent.aggregate"); - else if (Configuration.doAutoCreate()) - this.aggregate = new CodeableConcept(); // cc - return this.aggregate; - } - - public boolean hasAggregate() { - return this.aggregate != null && !this.aggregate.isEmpty(); - } - - /** - * @param value {@link #aggregate} (Who is expected to pay this part of the balance.) - */ - public AccountBalanceComponent setAggregate(CodeableConcept value) { - this.aggregate = value; - return this; - } - - /** - * @return {@link #term} (The term of the account balances - The balance value is the amount that was outstanding for this age.) - */ - public CodeableConcept getTerm() { - if (this.term == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountBalanceComponent.term"); - else if (Configuration.doAutoCreate()) - this.term = new CodeableConcept(); // cc - return this.term; - } - - public boolean hasTerm() { - return this.term != null && !this.term.isEmpty(); - } - - /** - * @param value {@link #term} (The term of the account balances - The balance value is the amount that was outstanding for this age.) - */ - public AccountBalanceComponent setTerm(CodeableConcept value) { - this.term = value; - return this; - } - - /** - * @return {@link #estimate} (The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).). This is the underlying object with id, value and extensions. The accessor "getEstimate" gives direct access to the value - */ - public BooleanType getEstimateElement() { - if (this.estimate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountBalanceComponent.estimate"); - else if (Configuration.doAutoCreate()) - this.estimate = new BooleanType(); // bb - return this.estimate; - } - - public boolean hasEstimateElement() { - return this.estimate != null && !this.estimate.isEmpty(); - } - - public boolean hasEstimate() { - return this.estimate != null && !this.estimate.isEmpty(); - } - - /** - * @param value {@link #estimate} (The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).). This is the underlying object with id, value and extensions. The accessor "getEstimate" gives direct access to the value - */ - public AccountBalanceComponent setEstimateElement(BooleanType value) { - this.estimate = value; - return this; - } - - /** - * @return The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). - */ - public boolean getEstimate() { - return this.estimate == null || this.estimate.isEmpty() ? false : this.estimate.getValue(); - } - - /** - * @param value The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). - */ - public AccountBalanceComponent setEstimate(boolean value) { - if (this.estimate == null) - this.estimate = new BooleanType(); - this.estimate.setValue(value); - return this; - } - - /** - * @return {@link #amount} (The actual balance value calculated for the age defined in the term property.) - */ - public Money getAmount() { - if (this.amount == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AccountBalanceComponent.amount"); - else if (Configuration.doAutoCreate()) - this.amount = new Money(); // cc - return this.amount; - } - - public boolean hasAmount() { - return this.amount != null && !this.amount.isEmpty(); - } - - /** - * @param value {@link #amount} (The actual balance value calculated for the age defined in the term property.) - */ - public AccountBalanceComponent setAmount(Money value) { - this.amount = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("aggregate", "CodeableConcept", "Who is expected to pay this part of the balance.", 0, 1, aggregate)); - children.add(new Property("term", "CodeableConcept", "The term of the account balances - The balance value is the amount that was outstanding for this age.", 0, 1, term)); - children.add(new Property("estimate", "boolean", "The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).", 0, 1, estimate)); - children.add(new Property("amount", "Money", "The actual balance value calculated for the age defined in the term property.", 0, 1, amount)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 175177151: /*aggregate*/ return new Property("aggregate", "CodeableConcept", "Who is expected to pay this part of the balance.", 0, 1, aggregate); - case 3556460: /*term*/ return new Property("term", "CodeableConcept", "The term of the account balances - The balance value is the amount that was outstanding for this age.", 0, 1, term); - case -1959779032: /*estimate*/ return new Property("estimate", "boolean", "The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).", 0, 1, estimate); - case -1413853096: /*amount*/ return new Property("amount", "Money", "The actual balance value calculated for the age defined in the term property.", 0, 1, amount); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 175177151: /*aggregate*/ return this.aggregate == null ? new Base[0] : new Base[] {this.aggregate}; // CodeableConcept - case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // CodeableConcept - case -1959779032: /*estimate*/ return this.estimate == null ? new Base[0] : new Base[] {this.estimate}; // BooleanType - case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 175177151: // aggregate - this.aggregate = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 3556460: // term - this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1959779032: // estimate - this.estimate = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -1413853096: // amount - this.amount = TypeConvertor.castToMoney(value); // Money - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("aggregate")) { - this.aggregate = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("term")) { - this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("estimate")) { - this.estimate = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("amount")) { - this.amount = TypeConvertor.castToMoney(value); // Money - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("aggregate")) { - this.aggregate = null; - } else if (name.equals("term")) { - this.term = null; - } else if (name.equals("estimate")) { - this.estimate = null; - } else if (name.equals("amount")) { - this.amount = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 175177151: return getAggregate(); - case 3556460: return getTerm(); - case -1959779032: return getEstimateElement(); - case -1413853096: return getAmount(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 175177151: /*aggregate*/ return new String[] {"CodeableConcept"}; - case 3556460: /*term*/ return new String[] {"CodeableConcept"}; - case -1959779032: /*estimate*/ return new String[] {"boolean"}; - case -1413853096: /*amount*/ return new String[] {"Money"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("aggregate")) { - this.aggregate = new CodeableConcept(); - return this.aggregate; - } - else if (name.equals("term")) { - this.term = new CodeableConcept(); - return this.term; - } - else if (name.equals("estimate")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.balance.estimate"); - } - else if (name.equals("amount")) { - this.amount = new Money(); - return this.amount; - } - else - return super.addChild(name); - } - - public AccountBalanceComponent copy() { - AccountBalanceComponent dst = new AccountBalanceComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AccountBalanceComponent dst) { - super.copyValues(dst); - dst.aggregate = aggregate == null ? null : aggregate.copy(); - dst.term = term == null ? null : term.copy(); - dst.estimate = estimate == null ? null : estimate.copy(); - dst.amount = amount == null ? null : amount.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AccountBalanceComponent)) - return false; - AccountBalanceComponent o = (AccountBalanceComponent) other_; - return compareDeep(aggregate, o.aggregate, true) && compareDeep(term, o.term, true) && compareDeep(estimate, o.estimate, true) - && compareDeep(amount, o.amount, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AccountBalanceComponent)) - return false; - AccountBalanceComponent o = (AccountBalanceComponent) other_; - return compareValues(estimate, o.estimate, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(aggregate, term, estimate - , amount); - } - - public String fhirType() { - return "Account.balance"; - - } - - } - - /** - * Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number). - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Account number", formalDefinition="Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number)." ) - protected List identifier; - - /** - * Indicates whether the account is presently used/usable or not. - */ - @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="active | inactive | entered-in-error | on-hold | unknown", formalDefinition="Indicates whether the account is presently used/usable or not." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-status") - protected Enumeration status; - - /** - * The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account. - */ - @Child(name = "billingStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Tracks the lifecycle of the account through the billing process", formalDefinition="The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-billing-status") - protected CodeableConcept billingStatus; - - /** - * Categorizes the account for reporting and searching purposes. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="E.g. patient, expense, depreciation", formalDefinition="Categorizes the account for reporting and searching purposes." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-type") - protected CodeableConcept type; - - /** - * Name used for the account when displaying it to humans in reports, etc. - */ - @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Human-readable label", formalDefinition="Name used for the account when displaying it to humans in reports, etc." ) - protected StringType name; - - /** - * Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account. - */ - @Child(name = "subject", type = {Patient.class, Device.class, Practitioner.class, PractitionerRole.class, Location.class, HealthcareService.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The entity that caused the expenses", formalDefinition="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account." ) - protected List subject; - - /** - * The date range of services associated with this account. - */ - @Child(name = "servicePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Transaction window", formalDefinition="The date range of services associated with this account." ) - protected Period servicePeriod; - - /** - * The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account. - */ - @Child(name = "coverage", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account", formalDefinition="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account." ) - protected List coverage; - - /** - * Indicates the service area, hospital, department, etc. with responsibility for managing the Account. - */ - @Child(name = "owner", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Entity managing the Account", formalDefinition="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." ) - protected Reference owner; - - /** - * Provides additional information about what the account tracks and how it is used. - */ - @Child(name = "description", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Explanation of purpose/use", formalDefinition="Provides additional information about what the account tracks and how it is used." ) - protected MarkdownType description; - - /** - * The parties responsible for balancing the account if other payment options fall short. - */ - @Child(name = "guarantor", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The parties ultimately responsible for balancing the Account", formalDefinition="The parties responsible for balancing the account if other payment options fall short." ) - protected List guarantor; - - /** - * When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s). - */ - @Child(name = "diagnosis", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The list of diagnoses relevant to this account", formalDefinition="When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)." ) - protected List diagnosis; - - /** - * When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s). - */ - @Child(name = "procedure", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The list of procedures relevant to this account", formalDefinition="When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)." ) - protected List procedure; - - /** - * Other associated accounts related to this account. - */ - @Child(name = "relatedAccount", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Other associated accounts related to this account", formalDefinition="Other associated accounts related to this account." ) - protected List relatedAccount; - - /** - * The default currency for the account. - */ - @Child(name = "currency", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The base or default currency", formalDefinition="The default currency for the account." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/currencies") - protected CodeableConcept currency; - - /** - * The calculated account balances - these are calculated and processed by the finance system. The balances with a `term` that is not current are usually generated/updated by an invoicing or similar process. - */ - @Child(name = "balance", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Calculated account balance(s)", formalDefinition="The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process." ) - protected List balance; - - /** - * Time the balance amount was calculated. - */ - @Child(name = "calculatedAt", type = {InstantType.class}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Time the balance amount was calculated", formalDefinition="Time the balance amount was calculated." ) - protected InstantType calculatedAt; - - private static final long serialVersionUID = -924752626L; - - /** - * Constructor - */ - public Account() { - super(); - } - - /** - * Constructor - */ - public Account(AccountStatus status) { - super(); - this.setStatus(status); - } - - /** - * @return {@link #identifier} (Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setIdentifier(List theIdentifier) { - this.identifier = theIdentifier; - return this; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - public Account addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} - */ - public Identifier getIdentifierFirstRep() { - if (getIdentifier().isEmpty()) { - addIdentifier(); - } - return getIdentifier().get(0); - } - - /** - * @return {@link #status} (Indicates whether the account is presently used/usable or not.). 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 Account.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new AccountStatusEnumFactory()); // 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} (Indicates whether the account is presently used/usable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Account setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return Indicates whether the account is presently used/usable or not. - */ - public AccountStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value Indicates whether the account is presently used/usable or not. - */ - public Account setStatus(AccountStatus value) { - if (this.status == null) - this.status = new Enumeration(new AccountStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.) - */ - public CodeableConcept getBillingStatus() { - if (this.billingStatus == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.billingStatus"); - else if (Configuration.doAutoCreate()) - this.billingStatus = new CodeableConcept(); // cc - return this.billingStatus; - } - - public boolean hasBillingStatus() { - return this.billingStatus != null && !this.billingStatus.isEmpty(); - } - - /** - * @param value {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.) - */ - public Account setBillingStatus(CodeableConcept value) { - this.billingStatus = value; - return this; - } - - /** - * @return {@link #type} (Categorizes the account for reporting and searching purposes.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.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} (Categorizes the account for reporting and searching purposes.) - */ - public Account setType(CodeableConcept value) { - this.type = value; - return this; - } - - /** - * @return {@link #name} (Name used for the account when displaying it to humans in reports, etc.). 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 Account.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 used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public Account setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return Name used for the account when displaying it to humans in reports, etc. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value Name used for the account when displaying it to humans in reports, etc. - */ - public Account 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 entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.) - */ - public List getSubject() { - if (this.subject == null) - this.subject = new ArrayList(); - return this.subject; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setSubject(List theSubject) { - this.subject = theSubject; - return this; - } - - public boolean hasSubject() { - if (this.subject == null) - return false; - for (Reference item : this.subject) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addSubject() { //3 - Reference t = new Reference(); - if (this.subject == null) - this.subject = new ArrayList(); - this.subject.add(t); - return t; - } - - public Account addSubject(Reference t) { //3 - if (t == null) - return this; - if (this.subject == null) - this.subject = new ArrayList(); - this.subject.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist {3} - */ - public Reference getSubjectFirstRep() { - if (getSubject().isEmpty()) { - addSubject(); - } - return getSubject().get(0); - } - - /** - * @return {@link #servicePeriod} (The date range of services associated with this account.) - */ - public Period getServicePeriod() { - if (this.servicePeriod == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.servicePeriod"); - else if (Configuration.doAutoCreate()) - this.servicePeriod = new Period(); // cc - return this.servicePeriod; - } - - public boolean hasServicePeriod() { - return this.servicePeriod != null && !this.servicePeriod.isEmpty(); - } - - /** - * @param value {@link #servicePeriod} (The date range of services associated with this account.) - */ - public Account setServicePeriod(Period value) { - this.servicePeriod = value; - return this; - } - - /** - * @return {@link #coverage} (The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.) - */ - public List getCoverage() { - if (this.coverage == null) - this.coverage = new ArrayList(); - return this.coverage; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setCoverage(List theCoverage) { - this.coverage = theCoverage; - return this; - } - - public boolean hasCoverage() { - if (this.coverage == null) - return false; - for (CoverageComponent item : this.coverage) - if (!item.isEmpty()) - return true; - return false; - } - - public CoverageComponent addCoverage() { //3 - CoverageComponent t = new CoverageComponent(); - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return t; - } - - public Account addCoverage(CoverageComponent t) { //3 - if (t == null) - return this; - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #coverage}, creating it if it does not already exist {3} - */ - public CoverageComponent getCoverageFirstRep() { - if (getCoverage().isEmpty()) { - addCoverage(); - } - return getCoverage().get(0); - } - - /** - * @return {@link #owner} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.) - */ - public Reference getOwner() { - if (this.owner == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.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} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.) - */ - public Account setOwner(Reference value) { - this.owner = value; - return this; - } - - /** - * @return {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public MarkdownType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.description"); - else if (Configuration.doAutoCreate()) - this.description = new MarkdownType(); // 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 additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public Account setDescriptionElement(MarkdownType value) { - this.description = value; - return this; - } - - /** - * @return Provides additional information about what the account tracks and how it is used. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value Provides additional information about what the account tracks and how it is used. - */ - public Account setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new MarkdownType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #guarantor} (The parties responsible for balancing the account if other payment options fall short.) - */ - public List getGuarantor() { - if (this.guarantor == null) - this.guarantor = new ArrayList(); - return this.guarantor; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setGuarantor(List theGuarantor) { - this.guarantor = theGuarantor; - return this; - } - - public boolean hasGuarantor() { - if (this.guarantor == null) - return false; - for (GuarantorComponent item : this.guarantor) - if (!item.isEmpty()) - return true; - return false; - } - - public GuarantorComponent addGuarantor() { //3 - GuarantorComponent t = new GuarantorComponent(); - if (this.guarantor == null) - this.guarantor = new ArrayList(); - this.guarantor.add(t); - return t; - } - - public Account addGuarantor(GuarantorComponent t) { //3 - if (t == null) - return this; - if (this.guarantor == null) - this.guarantor = new ArrayList(); - this.guarantor.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #guarantor}, creating it if it does not already exist {3} - */ - public GuarantorComponent getGuarantorFirstRep() { - if (getGuarantor().isEmpty()) { - addGuarantor(); - } - return getGuarantor().get(0); - } - - /** - * @return {@link #diagnosis} (When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setDiagnosis(List theDiagnosis) { - this.diagnosis = theDiagnosis; - return this; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (AccountDiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - public AccountDiagnosisComponent addDiagnosis() { //3 - AccountDiagnosisComponent t = new AccountDiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - public Account addDiagnosis(AccountDiagnosisComponent t) { //3 - if (t == null) - return this; - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3} - */ - public AccountDiagnosisComponent getDiagnosisFirstRep() { - if (getDiagnosis().isEmpty()) { - addDiagnosis(); - } - return getDiagnosis().get(0); - } - - /** - * @return {@link #procedure} (When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).) - */ - public List getProcedure() { - if (this.procedure == null) - this.procedure = new ArrayList(); - return this.procedure; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setProcedure(List theProcedure) { - this.procedure = theProcedure; - return this; - } - - public boolean hasProcedure() { - if (this.procedure == null) - return false; - for (AccountProcedureComponent item : this.procedure) - if (!item.isEmpty()) - return true; - return false; - } - - public AccountProcedureComponent addProcedure() { //3 - AccountProcedureComponent t = new AccountProcedureComponent(); - if (this.procedure == null) - this.procedure = new ArrayList(); - this.procedure.add(t); - return t; - } - - public Account addProcedure(AccountProcedureComponent t) { //3 - if (t == null) - return this; - if (this.procedure == null) - this.procedure = new ArrayList(); - this.procedure.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #procedure}, creating it if it does not already exist {3} - */ - public AccountProcedureComponent getProcedureFirstRep() { - if (getProcedure().isEmpty()) { - addProcedure(); - } - return getProcedure().get(0); - } - - /** - * @return {@link #relatedAccount} (Other associated accounts related to this account.) - */ - public List getRelatedAccount() { - if (this.relatedAccount == null) - this.relatedAccount = new ArrayList(); - return this.relatedAccount; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setRelatedAccount(List theRelatedAccount) { - this.relatedAccount = theRelatedAccount; - return this; - } - - public boolean hasRelatedAccount() { - if (this.relatedAccount == null) - return false; - for (AccountRelatedAccountComponent item : this.relatedAccount) - if (!item.isEmpty()) - return true; - return false; - } - - public AccountRelatedAccountComponent addRelatedAccount() { //3 - AccountRelatedAccountComponent t = new AccountRelatedAccountComponent(); - if (this.relatedAccount == null) - this.relatedAccount = new ArrayList(); - this.relatedAccount.add(t); - return t; - } - - public Account addRelatedAccount(AccountRelatedAccountComponent t) { //3 - if (t == null) - return this; - if (this.relatedAccount == null) - this.relatedAccount = new ArrayList(); - this.relatedAccount.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #relatedAccount}, creating it if it does not already exist {3} - */ - public AccountRelatedAccountComponent getRelatedAccountFirstRep() { - if (getRelatedAccount().isEmpty()) { - addRelatedAccount(); - } - return getRelatedAccount().get(0); - } - - /** - * @return {@link #currency} (The default currency for the account.) - */ - public CodeableConcept getCurrency() { - if (this.currency == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.currency"); - else if (Configuration.doAutoCreate()) - this.currency = new CodeableConcept(); // cc - return this.currency; - } - - public boolean hasCurrency() { - return this.currency != null && !this.currency.isEmpty(); - } - - /** - * @param value {@link #currency} (The default currency for the account.) - */ - public Account setCurrency(CodeableConcept value) { - this.currency = value; - return this; - } - - /** - * @return {@link #balance} (The calculated account balances - these are calculated and processed by the finance system. The balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.) - */ - public List getBalance() { - if (this.balance == null) - this.balance = new ArrayList(); - return this.balance; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Account setBalance(List theBalance) { - this.balance = theBalance; - return this; - } - - public boolean hasBalance() { - if (this.balance == null) - return false; - for (AccountBalanceComponent item : this.balance) - if (!item.isEmpty()) - return true; - return false; - } - - public AccountBalanceComponent addBalance() { //3 - AccountBalanceComponent t = new AccountBalanceComponent(); - if (this.balance == null) - this.balance = new ArrayList(); - this.balance.add(t); - return t; - } - - public Account addBalance(AccountBalanceComponent t) { //3 - if (t == null) - return this; - if (this.balance == null) - this.balance = new ArrayList(); - this.balance.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #balance}, creating it if it does not already exist {3} - */ - public AccountBalanceComponent getBalanceFirstRep() { - if (getBalance().isEmpty()) { - addBalance(); - } - return getBalance().get(0); - } - - /** - * @return {@link #calculatedAt} (Time the balance amount was calculated.). This is the underlying object with id, value and extensions. The accessor "getCalculatedAt" gives direct access to the value - */ - public InstantType getCalculatedAtElement() { - if (this.calculatedAt == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Account.calculatedAt"); - else if (Configuration.doAutoCreate()) - this.calculatedAt = new InstantType(); // bb - return this.calculatedAt; - } - - public boolean hasCalculatedAtElement() { - return this.calculatedAt != null && !this.calculatedAt.isEmpty(); - } - - public boolean hasCalculatedAt() { - return this.calculatedAt != null && !this.calculatedAt.isEmpty(); - } - - /** - * @param value {@link #calculatedAt} (Time the balance amount was calculated.). This is the underlying object with id, value and extensions. The accessor "getCalculatedAt" gives direct access to the value - */ - public Account setCalculatedAtElement(InstantType value) { - this.calculatedAt = value; - return this; - } - - /** - * @return Time the balance amount was calculated. - */ - public Date getCalculatedAt() { - return this.calculatedAt == null ? null : this.calculatedAt.getValue(); - } - - /** - * @param value Time the balance amount was calculated. - */ - public Account setCalculatedAt(Date value) { - if (value == null) - this.calculatedAt = null; - else { - if (this.calculatedAt == null) - this.calculatedAt = new InstantType(); - this.calculatedAt.setValue(value); - } - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("identifier", "Identifier", "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier)); - children.add(new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status)); - children.add(new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus)); - children.add(new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type)); - children.add(new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name)); - children.add(new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 0, java.lang.Integer.MAX_VALUE, subject)); - children.add(new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod)); - children.add(new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage)); - children.add(new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner)); - children.add(new Property("description", "markdown", "Provides additional information about what the account tracks and how it is used.", 0, 1, description)); - children.add(new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor)); - children.add(new Property("diagnosis", "", "When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - children.add(new Property("procedure", "", "When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, procedure)); - children.add(new Property("relatedAccount", "", "Other associated accounts related to this account.", 0, java.lang.Integer.MAX_VALUE, relatedAccount)); - children.add(new Property("currency", "CodeableConcept", "The default currency for the account.", 0, 1, currency)); - children.add(new Property("balance", "", "The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.", 0, java.lang.Integer.MAX_VALUE, balance)); - children.add(new Property("calculatedAt", "instant", "Time the balance amount was calculated.", 0, 1, calculatedAt)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier); - case -892481550: /*status*/ return new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status); - case -1524378035: /*billingStatus*/ return new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type); - case 3373707: /*name*/ return new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name); - case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 0, java.lang.Integer.MAX_VALUE, subject); - case 2129104086: /*servicePeriod*/ return new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod); - case -351767064: /*coverage*/ return new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage); - case 106164915: /*owner*/ return new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner); - case -1724546052: /*description*/ return new Property("description", "markdown", "Provides additional information about what the account tracks and how it is used.", 0, 1, description); - case -188629045: /*guarantor*/ return new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor); - case 1196993265: /*diagnosis*/ return new Property("diagnosis", "", "When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, diagnosis); - case -1095204141: /*procedure*/ return new Property("procedure", "", "When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, procedure); - case 962039682: /*relatedAccount*/ return new Property("relatedAccount", "", "Other associated accounts related to this account.", 0, java.lang.Integer.MAX_VALUE, relatedAccount); - case 575402001: /*currency*/ return new Property("currency", "CodeableConcept", "The default currency for the account.", 0, 1, currency); - case -339185956: /*balance*/ return new Property("balance", "", "The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.", 0, java.lang.Integer.MAX_VALUE, balance); - case 1089469073: /*calculatedAt*/ return new Property("calculatedAt", "instant", "Time the balance amount was calculated.", 0, 1, calculatedAt); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case -1524378035: /*billingStatus*/ return this.billingStatus == null ? new Base[0] : new Base[] {this.billingStatus}; // CodeableConcept - case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept - case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType - case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference - case 2129104086: /*servicePeriod*/ return this.servicePeriod == null ? new Base[0] : new Base[] {this.servicePeriod}; // Period - case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // CoverageComponent - case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference - case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType - case -188629045: /*guarantor*/ return this.guarantor == null ? new Base[0] : this.guarantor.toArray(new Base[this.guarantor.size()]); // GuarantorComponent - case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // AccountDiagnosisComponent - case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // AccountProcedureComponent - case 962039682: /*relatedAccount*/ return this.relatedAccount == null ? new Base[0] : this.relatedAccount.toArray(new Base[this.relatedAccount.size()]); // AccountRelatedAccountComponent - case 575402001: /*currency*/ return this.currency == null ? new Base[0] : new Base[] {this.currency}; // CodeableConcept - case -339185956: /*balance*/ return this.balance == null ? new Base[0] : this.balance.toArray(new Base[this.balance.size()]); // AccountBalanceComponent - case 1089469073: /*calculatedAt*/ return this.calculatedAt == null ? new Base[0] : new Base[] {this.calculatedAt}; // InstantType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1618432855: // identifier - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier - return value; - case -892481550: // status - value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case -1524378035: // billingStatus - this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 3575610: // type - this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 3373707: // name - this.name = TypeConvertor.castToString(value); // StringType - return value; - case -1867885268: // subject - this.getSubject().add(TypeConvertor.castToReference(value)); // Reference - return value; - case 2129104086: // servicePeriod - this.servicePeriod = TypeConvertor.castToPeriod(value); // Period - return value; - case -351767064: // coverage - this.getCoverage().add((CoverageComponent) value); // CoverageComponent - return value; - case 106164915: // owner - this.owner = TypeConvertor.castToReference(value); // Reference - return value; - case -1724546052: // description - this.description = TypeConvertor.castToMarkdown(value); // MarkdownType - return value; - case -188629045: // guarantor - this.getGuarantor().add((GuarantorComponent) value); // GuarantorComponent - return value; - case 1196993265: // diagnosis - this.getDiagnosis().add((AccountDiagnosisComponent) value); // AccountDiagnosisComponent - return value; - case -1095204141: // procedure - this.getProcedure().add((AccountProcedureComponent) value); // AccountProcedureComponent - return value; - case 962039682: // relatedAccount - this.getRelatedAccount().add((AccountRelatedAccountComponent) value); // AccountRelatedAccountComponent - return value; - case 575402001: // currency - this.currency = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -339185956: // balance - this.getBalance().add((AccountBalanceComponent) value); // AccountBalanceComponent - return value; - case 1089469073: // calculatedAt - this.calculatedAt = TypeConvertor.castToInstant(value); // InstantType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); - } else if (name.equals("status")) { - value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("billingStatus")) { - this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("type")) { - this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("name")) { - this.name = TypeConvertor.castToString(value); // StringType - } else if (name.equals("subject")) { - this.getSubject().add(TypeConvertor.castToReference(value)); - } else if (name.equals("servicePeriod")) { - this.servicePeriod = TypeConvertor.castToPeriod(value); // Period - } else if (name.equals("coverage")) { - this.getCoverage().add((CoverageComponent) value); - } else if (name.equals("owner")) { - this.owner = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("description")) { - this.description = TypeConvertor.castToMarkdown(value); // MarkdownType - } else if (name.equals("guarantor")) { - this.getGuarantor().add((GuarantorComponent) value); - } else if (name.equals("diagnosis")) { - this.getDiagnosis().add((AccountDiagnosisComponent) value); - } else if (name.equals("procedure")) { - this.getProcedure().add((AccountProcedureComponent) value); - } else if (name.equals("relatedAccount")) { - this.getRelatedAccount().add((AccountRelatedAccountComponent) value); - } else if (name.equals("currency")) { - this.currency = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("balance")) { - this.getBalance().add((AccountBalanceComponent) value); - } else if (name.equals("calculatedAt")) { - this.calculatedAt = TypeConvertor.castToInstant(value); // InstantType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().remove(value); - } else if (name.equals("status")) { - value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("billingStatus")) { - this.billingStatus = null; - } else if (name.equals("type")) { - this.type = null; - } else if (name.equals("name")) { - this.name = null; - } else if (name.equals("subject")) { - this.getSubject().remove(value); - } else if (name.equals("servicePeriod")) { - this.servicePeriod = null; - } else if (name.equals("coverage")) { - this.getCoverage().remove((CoverageComponent) value); - } else if (name.equals("owner")) { - this.owner = null; - } else if (name.equals("description")) { - this.description = null; - } else if (name.equals("guarantor")) { - this.getGuarantor().remove((GuarantorComponent) value); - } else if (name.equals("diagnosis")) { - this.getDiagnosis().remove((AccountDiagnosisComponent) value); - } else if (name.equals("procedure")) { - this.getProcedure().remove((AccountProcedureComponent) value); - } else if (name.equals("relatedAccount")) { - this.getRelatedAccount().remove((AccountRelatedAccountComponent) value); - } else if (name.equals("currency")) { - this.currency = null; - } else if (name.equals("balance")) { - this.getBalance().remove((AccountBalanceComponent) value); - } else if (name.equals("calculatedAt")) { - this.calculatedAt = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: return addIdentifier(); - case -892481550: return getStatusElement(); - case -1524378035: return getBillingStatus(); - case 3575610: return getType(); - case 3373707: return getNameElement(); - case -1867885268: return addSubject(); - case 2129104086: return getServicePeriod(); - case -351767064: return addCoverage(); - case 106164915: return getOwner(); - case -1724546052: return getDescriptionElement(); - case -188629045: return addGuarantor(); - case 1196993265: return addDiagnosis(); - case -1095204141: return addProcedure(); - case 962039682: return addRelatedAccount(); - case 575402001: return getCurrency(); - case -339185956: return addBalance(); - case 1089469073: return getCalculatedAtElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case -892481550: /*status*/ return new String[] {"code"}; - case -1524378035: /*billingStatus*/ return new String[] {"CodeableConcept"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case 3373707: /*name*/ return new String[] {"string"}; - case -1867885268: /*subject*/ return new String[] {"Reference"}; - case 2129104086: /*servicePeriod*/ return new String[] {"Period"}; - case -351767064: /*coverage*/ return new String[] {}; - case 106164915: /*owner*/ return new String[] {"Reference"}; - case -1724546052: /*description*/ return new String[] {"markdown"}; - case -188629045: /*guarantor*/ return new String[] {}; - case 1196993265: /*diagnosis*/ return new String[] {}; - case -1095204141: /*procedure*/ return new String[] {}; - case 962039682: /*relatedAccount*/ return new String[] {}; - case 575402001: /*currency*/ return new String[] {"CodeableConcept"}; - case -339185956: /*balance*/ return new String[] {}; - case 1089469073: /*calculatedAt*/ return new String[] {"instant"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.status"); - } - else if (name.equals("billingStatus")) { - this.billingStatus = new CodeableConcept(); - return this.billingStatus; - } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; - } - else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.name"); - } - else if (name.equals("subject")) { - return addSubject(); - } - else if (name.equals("servicePeriod")) { - this.servicePeriod = new Period(); - return this.servicePeriod; - } - else if (name.equals("coverage")) { - return addCoverage(); - } - else if (name.equals("owner")) { - this.owner = new Reference(); - return this.owner; - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.description"); - } - else if (name.equals("guarantor")) { - return addGuarantor(); - } - else if (name.equals("diagnosis")) { - return addDiagnosis(); - } - else if (name.equals("procedure")) { - return addProcedure(); - } - else if (name.equals("relatedAccount")) { - return addRelatedAccount(); - } - else if (name.equals("currency")) { - this.currency = new CodeableConcept(); - return this.currency; - } - else if (name.equals("balance")) { - return addBalance(); - } - else if (name.equals("calculatedAt")) { - throw new FHIRException("Cannot call addChild on a singleton property Account.calculatedAt"); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Account"; - - } - - public Account copy() { - Account dst = new Account(); - copyValues(dst); - return dst; - } - - public void copyValues(Account dst) { - super.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(); - dst.billingStatus = billingStatus == null ? null : billingStatus.copy(); - dst.type = type == null ? null : type.copy(); - dst.name = name == null ? null : name.copy(); - if (subject != null) { - dst.subject = new ArrayList(); - for (Reference i : subject) - dst.subject.add(i.copy()); - }; - dst.servicePeriod = servicePeriod == null ? null : servicePeriod.copy(); - if (coverage != null) { - dst.coverage = new ArrayList(); - for (CoverageComponent i : coverage) - dst.coverage.add(i.copy()); - }; - dst.owner = owner == null ? null : owner.copy(); - dst.description = description == null ? null : description.copy(); - if (guarantor != null) { - dst.guarantor = new ArrayList(); - for (GuarantorComponent i : guarantor) - dst.guarantor.add(i.copy()); - }; - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (AccountDiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (procedure != null) { - dst.procedure = new ArrayList(); - for (AccountProcedureComponent i : procedure) - dst.procedure.add(i.copy()); - }; - if (relatedAccount != null) { - dst.relatedAccount = new ArrayList(); - for (AccountRelatedAccountComponent i : relatedAccount) - dst.relatedAccount.add(i.copy()); - }; - dst.currency = currency == null ? null : currency.copy(); - if (balance != null) { - dst.balance = new ArrayList(); - for (AccountBalanceComponent i : balance) - dst.balance.add(i.copy()); - }; - dst.calculatedAt = calculatedAt == null ? null : calculatedAt.copy(); - } - - protected Account typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof Account)) - return false; - Account o = (Account) other_; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(billingStatus, o.billingStatus, true) - && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) - && compareDeep(servicePeriod, o.servicePeriod, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(owner, o.owner, true) && compareDeep(description, o.description, true) && compareDeep(guarantor, o.guarantor, true) - && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(procedure, o.procedure, true) && compareDeep(relatedAccount, o.relatedAccount, true) - && compareDeep(currency, o.currency, true) && compareDeep(balance, o.balance, true) && compareDeep(calculatedAt, o.calculatedAt, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof Account)) - return false; - Account o = (Account) other_; - return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) - && compareValues(calculatedAt, o.calculatedAt, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, billingStatus - , type, name, subject, servicePeriod, coverage, owner, description, guarantor - , diagnosis, procedure, relatedAccount, currency, balance, calculatedAt); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Account; - } - - /** - * Search parameter: guarantor - *

- * Description: The parties ultimately responsible for balancing the Account
- * Type: reference
- * Path: Account.guarantor.party
- *

- */ - @SearchParamDefinition(name="guarantor", path="Account.guarantor.party", description="The parties ultimately responsible for balancing the Account", type="reference", target={Organization.class, Patient.class, RelatedPerson.class } ) - public static final String SP_GUARANTOR = "guarantor"; - /** - * Fluent Client search parameter constant for guarantor - *

- * Description: The parties ultimately responsible for balancing the Account
- * Type: reference
- * Path: Account.guarantor.party
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GUARANTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GUARANTOR); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Account:guarantor". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_GUARANTOR = new ca.uhn.fhir.model.api.Include("Account:guarantor").toLocked(); - - /** - * Search parameter: name - *

- * Description: Human-readable label
- * Type: string
- * Path: Account.name
- *

- */ - @SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" ) - public static final String SP_NAME = "name"; - /** - * Fluent Client search parameter constant for name - *

- * Description: Human-readable label
- * Type: string
- * Path: Account.name
- *

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

- * Description: Entity managing the Account
- * Type: reference
- * Path: Account.owner
- *

- */ - @SearchParamDefinition(name="owner", path="Account.owner", description="Entity managing the Account", type="reference", target={Organization.class } ) - public static final String SP_OWNER = "owner"; - /** - * Fluent Client search parameter constant for owner - *

- * Description: Entity managing the Account
- * Type: reference
- * Path: Account.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 "Account:owner". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Account:owner").toLocked(); - - /** - * Search parameter: period - *

- * Description: Transaction window
- * Type: date
- * Path: Account.servicePeriod
- *

- */ - @SearchParamDefinition(name="period", path="Account.servicePeriod", description="Transaction window", type="date" ) - public static final String SP_PERIOD = "period"; - /** - * Fluent Client search parameter constant for period - *

- * Description: Transaction window
- * Type: date
- * Path: Account.servicePeriod
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); - - /** - * Search parameter: relatedaccount - *

- * Description: Parent and other related accounts
- * Type: reference
- * Path: Account.relatedAccount.account
- *

- */ - @SearchParamDefinition(name="relatedaccount", path="Account.relatedAccount.account", description="Parent and other related accounts", type="reference", target={Account.class } ) - public static final String SP_RELATEDACCOUNT = "relatedaccount"; - /** - * Fluent Client search parameter constant for relatedaccount - *

- * Description: Parent and other related accounts
- * Type: reference
- * Path: Account.relatedAccount.account
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATEDACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATEDACCOUNT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Account:relatedaccount". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATEDACCOUNT = new ca.uhn.fhir.model.api.Include("Account:relatedaccount").toLocked(); - - /** - * Search parameter: status - *

- * Description: active | inactive | entered-in-error | on-hold | unknown
- * Type: token
- * Path: Account.status
- *

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

- * Description: active | inactive | entered-in-error | on-hold | unknown
- * Type: token
- * Path: Account.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - - /** - * Search parameter: subject - *

- * Description: The entity that caused the expenses
- * Type: reference
- * Path: Account.subject
- *

- */ - @SearchParamDefinition(name="subject", path="Account.subject", description="The entity that caused the expenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } ) - public static final String SP_SUBJECT = "subject"; - /** - * Fluent Client search parameter constant for subject - *

- * Description: The entity that caused the expenses
- * Type: reference
- * Path: Account.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 "Account:subject". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Account:subject").toLocked(); - - /** - * Search parameter: identifier - *

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
- *

- */ - @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Account:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Account:patient").toLocked(); - - /** - * Search parameter: type - *

- * Description: Multiple Resources: - -* [Account](account.html): E.g. patient, expense, depreciation -* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) -* [Composition](composition.html): Kind of composition (LOINC if possible) -* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) -* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) -* [Encounter](encounter.html): Specific type of encounter -* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management -* [Invoice](invoice.html): Type of Invoice -* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type -* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence -* [Specimen](specimen.html): The specimen type -
- * Type: token
- * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
- *

- */ - @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" ) - public static final String SP_TYPE = "type"; - /** - * Fluent Client search parameter constant for type - *

- * Description: Multiple Resources: - -* [Account](account.html): E.g. patient, expense, depreciation -* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) -* [Composition](composition.html): Kind of composition (LOINC if possible) -* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) -* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) -* [Encounter](encounter.html): Specific type of encounter -* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management -* [Invoice](invoice.html): Type of Invoice -* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type -* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence -* [Specimen](specimen.html): The specimen type -
- * Type: token
- * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); - - -} - +A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.) + */ + public CoverageComponent setCoverage(Reference value) { + this.coverage = value; + return this; + } + + /** + * @return {@link #priority} (The priority of the coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public PositiveIntType getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CoverageComponent.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new PositiveIntType(); // 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 coverage in the context of this account.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public CoverageComponent setPriorityElement(PositiveIntType value) { + this.priority = value; + return this; + } + + /** + * @return The priority of the coverage in the context of this account. + */ + public int getPriority() { + return this.priority == null || this.priority.isEmpty() ? 0 : this.priority.getValue(); + } + + /** + * @param value The priority of the coverage in the context of this account. + */ + public CoverageComponent setPriority(int value) { + if (this.priority == null) + this.priority = new PositiveIntType(); + this.priority.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("coverage", "Reference(Coverage)", "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 0, 1, coverage)); + children.add(new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).\n\nA coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing.", 0, 1, coverage); + case -1165461084: /*priority*/ return new Property("priority", "positiveInt", "The priority of the coverage in the context of this account.", 0, 1, priority); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference + case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // PositiveIntType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -351767064: // coverage + this.coverage = TypeConvertor.castToReference(value); // Reference + return value; + case -1165461084: // priority + this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("coverage")) { + this.coverage = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("priority")) { + this.priority = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("coverage")) { + this.coverage = null; + } else if (name.equals("priority")) { + this.priority = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -351767064: return getCoverage(); + case -1165461084: return getPriorityElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -351767064: /*coverage*/ return new String[] {"Reference"}; + case -1165461084: /*priority*/ return new String[] {"positiveInt"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("coverage")) { + this.coverage = new Reference(); + return this.coverage; + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.coverage.priority"); + } + else + return super.addChild(name); + } + + public CoverageComponent copy() { + CoverageComponent dst = new CoverageComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(CoverageComponent dst) { + super.copyValues(dst); + dst.coverage = coverage == null ? null : coverage.copy(); + dst.priority = priority == null ? null : priority.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other_; + return compareDeep(coverage, o.coverage, true) && compareDeep(priority, o.priority, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof CoverageComponent)) + return false; + CoverageComponent o = (CoverageComponent) other_; + return compareValues(priority, o.priority, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, priority); + } + + public String fhirType() { + return "Account.coverage"; + + } + + } + + @Block() + public static class GuarantorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The entity who is responsible. + */ + @Child(name = "party", type = {Patient.class, RelatedPerson.class, Organization.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Responsible entity", formalDefinition="The entity who is responsible." ) + protected Reference party; + + /** + * A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. + */ + @Child(name = "onHold", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Credit or other hold applied", formalDefinition="A guarantor may be placed on credit hold or otherwise have their role temporarily suspended." ) + protected BooleanType onHold; + + /** + * The timeframe during which the guarantor accepts responsibility for the account. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Guarantee account during", formalDefinition="The timeframe during which the guarantor accepts responsibility for the account." ) + protected Period period; + + private static final long serialVersionUID = -523056773L; + + /** + * Constructor + */ + public GuarantorComponent() { + super(); + } + + /** + * Constructor + */ + public GuarantorComponent(Reference party) { + super(); + this.setParty(party); + } + + /** + * @return {@link #party} (The entity who is responsible.) + */ + public Reference getParty() { + if (this.party == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuarantorComponent.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} (The entity who is responsible.) + */ + public GuarantorComponent setParty(Reference value) { + this.party = value; + return this; + } + + /** + * @return {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value + */ + public BooleanType getOnHoldElement() { + if (this.onHold == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuarantorComponent.onHold"); + else if (Configuration.doAutoCreate()) + this.onHold = new BooleanType(); // bb + return this.onHold; + } + + public boolean hasOnHoldElement() { + return this.onHold != null && !this.onHold.isEmpty(); + } + + public boolean hasOnHold() { + return this.onHold != null && !this.onHold.isEmpty(); + } + + /** + * @param value {@link #onHold} (A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.). This is the underlying object with id, value and extensions. The accessor "getOnHold" gives direct access to the value + */ + public GuarantorComponent setOnHoldElement(BooleanType value) { + this.onHold = value; + return this; + } + + /** + * @return A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. + */ + public boolean getOnHold() { + return this.onHold == null || this.onHold.isEmpty() ? false : this.onHold.getValue(); + } + + /** + * @param value A guarantor may be placed on credit hold or otherwise have their role temporarily suspended. + */ + public GuarantorComponent setOnHold(boolean value) { + if (this.onHold == null) + this.onHold = new BooleanType(); + this.onHold.setValue(value); + return this; + } + + /** + * @return {@link #period} (The timeframe during which the guarantor accepts responsibility for the account.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuarantorComponent.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 timeframe during which the guarantor accepts responsibility for the account.) + */ + public GuarantorComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party)); + children.add(new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold)); + children.add(new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 106437350: /*party*/ return new Property("party", "Reference(Patient|RelatedPerson|Organization)", "The entity who is responsible.", 0, 1, party); + case -1013289154: /*onHold*/ return new Property("onHold", "boolean", "A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.", 0, 1, onHold); + case -991726143: /*period*/ return new Property("period", "Period", "The timeframe during which the guarantor accepts responsibility for the account.", 0, 1, period); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference + case -1013289154: /*onHold*/ return this.onHold == null ? new Base[0] : new Base[] {this.onHold}; // BooleanType + case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 106437350: // party + this.party = TypeConvertor.castToReference(value); // Reference + return value; + case -1013289154: // onHold + this.onHold = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -991726143: // period + this.period = TypeConvertor.castToPeriod(value); // Period + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("party")) { + this.party = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("onHold")) { + this.onHold = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("period")) { + this.period = TypeConvertor.castToPeriod(value); // Period + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("party")) { + this.party = null; + } else if (name.equals("onHold")) { + this.onHold = null; + } else if (name.equals("period")) { + this.period = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 106437350: return getParty(); + case -1013289154: return getOnHoldElement(); + case -991726143: return getPeriod(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 106437350: /*party*/ return new String[] {"Reference"}; + case -1013289154: /*onHold*/ return new String[] {"boolean"}; + case -991726143: /*period*/ return new String[] {"Period"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("party")) { + this.party = new Reference(); + return this.party; + } + else if (name.equals("onHold")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.guarantor.onHold"); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public GuarantorComponent copy() { + GuarantorComponent dst = new GuarantorComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(GuarantorComponent dst) { + super.copyValues(dst); + dst.party = party == null ? null : party.copy(); + dst.onHold = onHold == null ? null : onHold.copy(); + dst.period = period == null ? null : period.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof GuarantorComponent)) + return false; + GuarantorComponent o = (GuarantorComponent) other_; + return compareDeep(party, o.party, true) && compareDeep(onHold, o.onHold, true) && compareDeep(period, o.period, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof GuarantorComponent)) + return false; + GuarantorComponent o = (GuarantorComponent) other_; + return compareValues(onHold, o.onHold, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(party, onHold, period); + } + + public String fhirType() { + return "Account.guarantor"; + + } + + } + + @Block() + public static class AccountDiagnosisComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Ranking of the diagnosis (for each type). + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Ranking of the diagnosis (for each type)", formalDefinition="Ranking of the diagnosis (for each type)." ) + protected PositiveIntType sequence; + + /** + * The diagnosis relevant to the account. + */ + @Child(name = "condition", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The diagnosis relevant to the account", formalDefinition="The diagnosis relevant to the account." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") + protected CodeableReference condition; + + /** + * Ranking of the diagnosis (for each type). + */ + @Child(name = "dateOfDiagnosis", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Date of the diagnosis (when coded diagnosis)", formalDefinition="Ranking of the diagnosis (for each type)." ) + protected DateTimeType dateOfDiagnosis; + + /** + * Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …). + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …)", formalDefinition="Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diagnosis-use") + protected List type; + + /** + * Was the Diagnosis present on Admission in the related Encounter. + */ + @Child(name = "onAdmission", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Diagnosis present on Admission", formalDefinition="Was the Diagnosis present on Admission in the related Encounter." ) + protected BooleanType onAdmission; + + /** + * The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs. + */ + @Child(name = "packageCode", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Package Code specific for billing", formalDefinition="The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs." ) + protected List packageCode; + + private static final long serialVersionUID = 57125500L; + + /** + * Constructor + */ + public AccountDiagnosisComponent() { + super(); + } + + /** + * Constructor + */ + public AccountDiagnosisComponent(CodeableReference condition) { + super(); + this.setCondition(condition); + } + + /** + * @return {@link #sequence} (Ranking of the diagnosis (for each type).). 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 AccountDiagnosisComponent.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} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public AccountDiagnosisComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return Ranking of the diagnosis (for each type). + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value Ranking of the diagnosis (for each type). + */ + public AccountDiagnosisComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #condition} (The diagnosis relevant to the account.) + */ + public CodeableReference getCondition() { + if (this.condition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountDiagnosisComponent.condition"); + else if (Configuration.doAutoCreate()) + this.condition = new CodeableReference(); // cc + return this.condition; + } + + public boolean hasCondition() { + return this.condition != null && !this.condition.isEmpty(); + } + + /** + * @param value {@link #condition} (The diagnosis relevant to the account.) + */ + public AccountDiagnosisComponent setCondition(CodeableReference value) { + this.condition = value; + return this; + } + + /** + * @return {@link #dateOfDiagnosis} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getDateOfDiagnosis" gives direct access to the value + */ + public DateTimeType getDateOfDiagnosisElement() { + if (this.dateOfDiagnosis == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountDiagnosisComponent.dateOfDiagnosis"); + else if (Configuration.doAutoCreate()) + this.dateOfDiagnosis = new DateTimeType(); // bb + return this.dateOfDiagnosis; + } + + public boolean hasDateOfDiagnosisElement() { + return this.dateOfDiagnosis != null && !this.dateOfDiagnosis.isEmpty(); + } + + public boolean hasDateOfDiagnosis() { + return this.dateOfDiagnosis != null && !this.dateOfDiagnosis.isEmpty(); + } + + /** + * @param value {@link #dateOfDiagnosis} (Ranking of the diagnosis (for each type).). This is the underlying object with id, value and extensions. The accessor "getDateOfDiagnosis" gives direct access to the value + */ + public AccountDiagnosisComponent setDateOfDiagnosisElement(DateTimeType value) { + this.dateOfDiagnosis = value; + return this; + } + + /** + * @return Ranking of the diagnosis (for each type). + */ + public Date getDateOfDiagnosis() { + return this.dateOfDiagnosis == null ? null : this.dateOfDiagnosis.getValue(); + } + + /** + * @param value Ranking of the diagnosis (for each type). + */ + public AccountDiagnosisComponent setDateOfDiagnosis(Date value) { + if (value == null) + this.dateOfDiagnosis = null; + else { + if (this.dateOfDiagnosis == null) + this.dateOfDiagnosis = new DateTimeType(); + this.dateOfDiagnosis.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AccountDiagnosisComponent setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public AccountDiagnosisComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #onAdmission} (Was the Diagnosis present on Admission in the related Encounter.). This is the underlying object with id, value and extensions. The accessor "getOnAdmission" gives direct access to the value + */ + public BooleanType getOnAdmissionElement() { + if (this.onAdmission == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountDiagnosisComponent.onAdmission"); + else if (Configuration.doAutoCreate()) + this.onAdmission = new BooleanType(); // bb + return this.onAdmission; + } + + public boolean hasOnAdmissionElement() { + return this.onAdmission != null && !this.onAdmission.isEmpty(); + } + + public boolean hasOnAdmission() { + return this.onAdmission != null && !this.onAdmission.isEmpty(); + } + + /** + * @param value {@link #onAdmission} (Was the Diagnosis present on Admission in the related Encounter.). This is the underlying object with id, value and extensions. The accessor "getOnAdmission" gives direct access to the value + */ + public AccountDiagnosisComponent setOnAdmissionElement(BooleanType value) { + this.onAdmission = value; + return this; + } + + /** + * @return Was the Diagnosis present on Admission in the related Encounter. + */ + public boolean getOnAdmission() { + return this.onAdmission == null || this.onAdmission.isEmpty() ? false : this.onAdmission.getValue(); + } + + /** + * @param value Was the Diagnosis present on Admission in the related Encounter. + */ + public AccountDiagnosisComponent setOnAdmission(boolean value) { + if (this.onAdmission == null) + this.onAdmission = new BooleanType(); + this.onAdmission.setValue(value); + return this; + } + + /** + * @return {@link #packageCode} (The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.) + */ + public List getPackageCode() { + if (this.packageCode == null) + this.packageCode = new ArrayList(); + return this.packageCode; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AccountDiagnosisComponent setPackageCode(List thePackageCode) { + this.packageCode = thePackageCode; + return this; + } + + public boolean hasPackageCode() { + if (this.packageCode == null) + return false; + for (CodeableConcept item : this.packageCode) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addPackageCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.packageCode == null) + this.packageCode = new ArrayList(); + this.packageCode.add(t); + return t; + } + + public AccountDiagnosisComponent addPackageCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.packageCode == null) + this.packageCode = new ArrayList(); + this.packageCode.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #packageCode}, creating it if it does not already exist {3} + */ + public CodeableConcept getPackageCodeFirstRep() { + if (getPackageCode().isEmpty()) { + addPackageCode(); + } + return getPackageCode().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("sequence", "positiveInt", "Ranking of the diagnosis (for each type).", 0, 1, sequence)); + children.add(new Property("condition", "CodeableReference(Condition)", "The diagnosis relevant to the account.", 0, 1, condition)); + children.add(new Property("dateOfDiagnosis", "dateTime", "Ranking of the diagnosis (for each type).", 0, 1, dateOfDiagnosis)); + children.add(new Property("type", "CodeableConcept", "Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("onAdmission", "boolean", "Was the Diagnosis present on Admission in the related Encounter.", 0, 1, onAdmission)); + children.add(new Property("packageCode", "CodeableConcept", "The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Ranking of the diagnosis (for each type).", 0, 1, sequence); + case -861311717: /*condition*/ return new Property("condition", "CodeableReference(Condition)", "The diagnosis relevant to the account.", 0, 1, condition); + case -774562228: /*dateOfDiagnosis*/ return new Property("dateOfDiagnosis", "dateTime", "Ranking of the diagnosis (for each type).", 0, 1, dateOfDiagnosis); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type that this diagnosis has relevant to the account (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, type); + case -3386134: /*onAdmission*/ return new Property("onAdmission", "boolean", "Was the Diagnosis present on Admission in the related Encounter.", 0, 1, onAdmission); + case 908444499: /*packageCode*/ return new Property("packageCode", "CodeableConcept", "The package code can be used to group diagnoses that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType + case -861311717: /*condition*/ return this.condition == null ? new Base[0] : new Base[] {this.condition}; // CodeableReference + case -774562228: /*dateOfDiagnosis*/ return this.dateOfDiagnosis == null ? new Base[0] : new Base[] {this.dateOfDiagnosis}; // DateTimeType + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case -3386134: /*onAdmission*/ return this.onAdmission == null ? new Base[0] : new Base[] {this.onAdmission}; // BooleanType + case 908444499: /*packageCode*/ return this.packageCode == null ? new Base[0] : this.packageCode.toArray(new Base[this.packageCode.size()]); // CodeableConcept + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 1349547969: // sequence + this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case -861311717: // condition + this.condition = TypeConvertor.castToCodeableReference(value); // CodeableReference + return value; + case -774562228: // dateOfDiagnosis + this.dateOfDiagnosis = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -3386134: // onAdmission + this.onAdmission = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case 908444499: // packageCode + this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) { + this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("condition")) { + this.condition = TypeConvertor.castToCodeableReference(value); // CodeableReference + } else if (name.equals("dateOfDiagnosis")) { + this.dateOfDiagnosis = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("onAdmission")) { + this.onAdmission = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("packageCode")) { + this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("sequence")) { + this.sequence = null; + } else if (name.equals("condition")) { + this.condition = null; + } else if (name.equals("dateOfDiagnosis")) { + this.dateOfDiagnosis = null; + } else if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("onAdmission")) { + this.onAdmission = null; + } else if (name.equals("packageCode")) { + this.getPackageCode().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1349547969: return getSequenceElement(); + case -861311717: return getCondition(); + case -774562228: return getDateOfDiagnosisElement(); + case 3575610: return addType(); + case -3386134: return getOnAdmissionElement(); + case 908444499: return addPackageCode(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; + case -861311717: /*condition*/ return new String[] {"CodeableReference"}; + case -774562228: /*dateOfDiagnosis*/ return new String[] {"dateTime"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -3386134: /*onAdmission*/ return new String[] {"boolean"}; + case 908444499: /*packageCode*/ return new String[] {"CodeableConcept"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.sequence"); + } + else if (name.equals("condition")) { + this.condition = new CodeableReference(); + return this.condition; + } + else if (name.equals("dateOfDiagnosis")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.dateOfDiagnosis"); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("onAdmission")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.diagnosis.onAdmission"); + } + else if (name.equals("packageCode")) { + return addPackageCode(); + } + else + return super.addChild(name); + } + + public AccountDiagnosisComponent copy() { + AccountDiagnosisComponent dst = new AccountDiagnosisComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AccountDiagnosisComponent dst) { + super.copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.condition = condition == null ? null : condition.copy(); + dst.dateOfDiagnosis = dateOfDiagnosis == null ? null : dateOfDiagnosis.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.onAdmission = onAdmission == null ? null : onAdmission.copy(); + if (packageCode != null) { + dst.packageCode = new ArrayList(); + for (CodeableConcept i : packageCode) + dst.packageCode.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AccountDiagnosisComponent)) + return false; + AccountDiagnosisComponent o = (AccountDiagnosisComponent) other_; + return compareDeep(sequence, o.sequence, true) && compareDeep(condition, o.condition, true) && compareDeep(dateOfDiagnosis, o.dateOfDiagnosis, true) + && compareDeep(type, o.type, true) && compareDeep(onAdmission, o.onAdmission, true) && compareDeep(packageCode, o.packageCode, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AccountDiagnosisComponent)) + return false; + AccountDiagnosisComponent o = (AccountDiagnosisComponent) other_; + return compareValues(sequence, o.sequence, true) && compareValues(dateOfDiagnosis, o.dateOfDiagnosis, true) + && compareValues(onAdmission, o.onAdmission, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, condition, dateOfDiagnosis + , type, onAdmission, packageCode); + } + + public String fhirType() { + return "Account.diagnosis"; + + } + + } + + @Block() + public static class AccountProcedureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Ranking of the procedure (for each type). + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Ranking of the procedure (for each type)", formalDefinition="Ranking of the procedure (for each type)." ) + protected PositiveIntType sequence; + + /** + * The procedure relevant to the account. + */ + @Child(name = "code", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The procedure relevant to the account", formalDefinition="The procedure relevant to the account." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code") + protected CodeableReference code; + + /** + * Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. + */ + @Child(name = "dateOfService", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Date of the procedure (when coded procedure)", formalDefinition="Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used." ) + protected DateTimeType dateOfService; + + /** + * How this procedure value should be used in charging the account. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="How this procedure value should be used in charging the account", formalDefinition="How this procedure value should be used in charging the account." ) + protected List type; + + /** + * The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs. + */ + @Child(name = "packageCode", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Package Code specific for billing", formalDefinition="The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs." ) + protected List packageCode; + + /** + * Any devices that were associated with the procedure relevant to the account. + */ + @Child(name = "device", type = {Device.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Any devices that were associated with the procedure", formalDefinition="Any devices that were associated with the procedure relevant to the account." ) + protected List device; + + private static final long serialVersionUID = -797201673L; + + /** + * Constructor + */ + public AccountProcedureComponent() { + super(); + } + + /** + * Constructor + */ + public AccountProcedureComponent(CodeableReference code) { + super(); + this.setCode(code); + } + + /** + * @return {@link #sequence} (Ranking of the procedure (for each type).). 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 AccountProcedureComponent.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} (Ranking of the procedure (for each type).). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public AccountProcedureComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return Ranking of the procedure (for each type). + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value Ranking of the procedure (for each type). + */ + public AccountProcedureComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #code} (The procedure relevant to the account.) + */ + public CodeableReference getCode() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountProcedureComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeableReference(); // cc + return this.code; + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The procedure relevant to the account.) + */ + public AccountProcedureComponent setCode(CodeableReference value) { + this.code = value; + return this; + } + + /** + * @return {@link #dateOfService} (Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.). This is the underlying object with id, value and extensions. The accessor "getDateOfService" gives direct access to the value + */ + public DateTimeType getDateOfServiceElement() { + if (this.dateOfService == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountProcedureComponent.dateOfService"); + else if (Configuration.doAutoCreate()) + this.dateOfService = new DateTimeType(); // bb + return this.dateOfService; + } + + public boolean hasDateOfServiceElement() { + return this.dateOfService != null && !this.dateOfService.isEmpty(); + } + + public boolean hasDateOfService() { + return this.dateOfService != null && !this.dateOfService.isEmpty(); + } + + /** + * @param value {@link #dateOfService} (Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.). This is the underlying object with id, value and extensions. The accessor "getDateOfService" gives direct access to the value + */ + public AccountProcedureComponent setDateOfServiceElement(DateTimeType value) { + this.dateOfService = value; + return this; + } + + /** + * @return Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. + */ + public Date getDateOfService() { + return this.dateOfService == null ? null : this.dateOfService.getValue(); + } + + /** + * @param value Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used. + */ + public AccountProcedureComponent setDateOfService(Date value) { + if (value == null) + this.dateOfService = null; + else { + if (this.dateOfService == null) + this.dateOfService = new DateTimeType(); + this.dateOfService.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (How this procedure value should be used in charging the account.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AccountProcedureComponent setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public AccountProcedureComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #packageCode} (The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.) + */ + public List getPackageCode() { + if (this.packageCode == null) + this.packageCode = new ArrayList(); + return this.packageCode; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AccountProcedureComponent setPackageCode(List thePackageCode) { + this.packageCode = thePackageCode; + return this; + } + + public boolean hasPackageCode() { + if (this.packageCode == null) + return false; + for (CodeableConcept item : this.packageCode) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addPackageCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.packageCode == null) + this.packageCode = new ArrayList(); + this.packageCode.add(t); + return t; + } + + public AccountProcedureComponent addPackageCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.packageCode == null) + this.packageCode = new ArrayList(); + this.packageCode.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #packageCode}, creating it if it does not already exist {3} + */ + public CodeableConcept getPackageCodeFirstRep() { + if (getPackageCode().isEmpty()) { + addPackageCode(); + } + return getPackageCode().get(0); + } + + /** + * @return {@link #device} (Any devices that were associated with the procedure relevant to the account.) + */ + public List getDevice() { + if (this.device == null) + this.device = new ArrayList(); + return this.device; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AccountProcedureComponent setDevice(List theDevice) { + this.device = theDevice; + return this; + } + + public boolean hasDevice() { + if (this.device == null) + return false; + for (Reference item : this.device) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addDevice() { //3 + Reference t = new Reference(); + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return t; + } + + public AccountProcedureComponent addDevice(Reference t) { //3 + if (t == null) + return this; + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #device}, creating it if it does not already exist {3} + */ + public Reference getDeviceFirstRep() { + if (getDevice().isEmpty()) { + addDevice(); + } + return getDevice().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("sequence", "positiveInt", "Ranking of the procedure (for each type).", 0, 1, sequence)); + children.add(new Property("code", "CodeableReference(Procedure)", "The procedure relevant to the account.", 0, 1, code)); + children.add(new Property("dateOfService", "dateTime", "Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.", 0, 1, dateOfService)); + children.add(new Property("type", "CodeableConcept", "How this procedure value should be used in charging the account.", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("packageCode", "CodeableConcept", "The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode)); + children.add(new Property("device", "Reference(Device)", "Any devices that were associated with the procedure relevant to the account.", 0, java.lang.Integer.MAX_VALUE, device)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "Ranking of the procedure (for each type).", 0, 1, sequence); + case 3059181: /*code*/ return new Property("code", "CodeableReference(Procedure)", "The procedure relevant to the account.", 0, 1, code); + case -328510256: /*dateOfService*/ return new Property("dateOfService", "dateTime", "Date of the procedure when using a coded procedure. If using a reference to a procedure, then the date on the procedure should be used.", 0, 1, dateOfService); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "How this procedure value should be used in charging the account.", 0, java.lang.Integer.MAX_VALUE, type); + case 908444499: /*packageCode*/ return new Property("packageCode", "CodeableConcept", "The package code can be used to group procedures that may be priced or delivered as a single product. Such as DRGs.", 0, java.lang.Integer.MAX_VALUE, packageCode); + case -1335157162: /*device*/ return new Property("device", "Reference(Device)", "Any devices that were associated with the procedure relevant to the account.", 0, java.lang.Integer.MAX_VALUE, device); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType + case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableReference + case -328510256: /*dateOfService*/ return this.dateOfService == null ? new Base[0] : new Base[] {this.dateOfService}; // DateTimeType + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case 908444499: /*packageCode*/ return this.packageCode == null ? new Base[0] : this.packageCode.toArray(new Base[this.packageCode.size()]); // CodeableConcept + case -1335157162: /*device*/ return this.device == null ? new Base[0] : this.device.toArray(new Base[this.device.size()]); // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 1349547969: // sequence + this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case 3059181: // code + this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference + return value; + case -328510256: // dateOfService + this.dateOfService = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 908444499: // packageCode + this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1335157162: // device + this.getDevice().add(TypeConvertor.castToReference(value)); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) { + this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("code")) { + this.code = TypeConvertor.castToCodeableReference(value); // CodeableReference + } else if (name.equals("dateOfService")) { + this.dateOfService = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("packageCode")) { + this.getPackageCode().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("device")) { + this.getDevice().add(TypeConvertor.castToReference(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("sequence")) { + this.sequence = null; + } else if (name.equals("code")) { + this.code = null; + } else if (name.equals("dateOfService")) { + this.dateOfService = null; + } else if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("packageCode")) { + this.getPackageCode().remove(value); + } else if (name.equals("device")) { + this.getDevice().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1349547969: return getSequenceElement(); + case 3059181: return getCode(); + case -328510256: return getDateOfServiceElement(); + case 3575610: return addType(); + case 908444499: return addPackageCode(); + case -1335157162: return addDevice(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1349547969: /*sequence*/ return new String[] {"positiveInt"}; + case 3059181: /*code*/ return new String[] {"CodeableReference"}; + case -328510256: /*dateOfService*/ return new String[] {"dateTime"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 908444499: /*packageCode*/ return new String[] {"CodeableConcept"}; + case -1335157162: /*device*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.procedure.sequence"); + } + else if (name.equals("code")) { + this.code = new CodeableReference(); + return this.code; + } + else if (name.equals("dateOfService")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.procedure.dateOfService"); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("packageCode")) { + return addPackageCode(); + } + else if (name.equals("device")) { + return addDevice(); + } + else + return super.addChild(name); + } + + public AccountProcedureComponent copy() { + AccountProcedureComponent dst = new AccountProcedureComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AccountProcedureComponent dst) { + super.copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.code = code == null ? null : code.copy(); + dst.dateOfService = dateOfService == null ? null : dateOfService.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + if (packageCode != null) { + dst.packageCode = new ArrayList(); + for (CodeableConcept i : packageCode) + dst.packageCode.add(i.copy()); + }; + if (device != null) { + dst.device = new ArrayList(); + for (Reference i : device) + dst.device.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AccountProcedureComponent)) + return false; + AccountProcedureComponent o = (AccountProcedureComponent) other_; + return compareDeep(sequence, o.sequence, true) && compareDeep(code, o.code, true) && compareDeep(dateOfService, o.dateOfService, true) + && compareDeep(type, o.type, true) && compareDeep(packageCode, o.packageCode, true) && compareDeep(device, o.device, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AccountProcedureComponent)) + return false; + AccountProcedureComponent o = (AccountProcedureComponent) other_; + return compareValues(sequence, o.sequence, true) && compareValues(dateOfService, o.dateOfService, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, code, dateOfService + , type, packageCode, device); + } + + public String fhirType() { + return "Account.procedure"; + + } + + } + + @Block() + public static class AccountRelatedAccountComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Relationship of the associated Account. + */ + @Child(name = "relationship", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Relationship of the associated Account", formalDefinition="Relationship of the associated Account." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-relationship") + protected CodeableConcept relationship; + + /** + * Reference to an associated Account. + */ + @Child(name = "account", type = {Account.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reference to an associated Account", formalDefinition="Reference to an associated Account." ) + protected Reference account; + + private static final long serialVersionUID = 1586291361L; + + /** + * Constructor + */ + public AccountRelatedAccountComponent() { + super(); + } + + /** + * Constructor + */ + public AccountRelatedAccountComponent(Reference account) { + super(); + this.setAccount(account); + } + + /** + * @return {@link #relationship} (Relationship of the associated Account.) + */ + public CodeableConcept getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountRelatedAccountComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new CodeableConcept(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (Relationship of the associated Account.) + */ + public AccountRelatedAccountComponent setRelationship(CodeableConcept value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #account} (Reference to an associated Account.) + */ + public Reference getAccount() { + if (this.account == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountRelatedAccountComponent.account"); + else if (Configuration.doAutoCreate()) + this.account = new Reference(); // cc + return this.account; + } + + public boolean hasAccount() { + return this.account != null && !this.account.isEmpty(); + } + + /** + * @param value {@link #account} (Reference to an associated Account.) + */ + public AccountRelatedAccountComponent setAccount(Reference value) { + this.account = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("relationship", "CodeableConcept", "Relationship of the associated Account.", 0, 1, relationship)); + children.add(new Property("account", "Reference(Account)", "Reference to an associated Account.", 0, 1, account)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "Relationship of the associated Account.", 0, 1, relationship); + case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "Reference to an associated Account.", 0, 1, account); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept + case -1177318867: /*account*/ return this.account == null ? new Base[0] : new Base[] {this.account}; // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -261851592: // relationship + this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1177318867: // account + this.account = TypeConvertor.castToReference(value); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("relationship")) { + this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("account")) { + this.account = TypeConvertor.castToReference(value); // Reference + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("relationship")) { + this.relationship = null; + } else if (name.equals("account")) { + this.account = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -261851592: return getRelationship(); + case -1177318867: return getAccount(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -261851592: /*relationship*/ return new String[] {"CodeableConcept"}; + case -1177318867: /*account*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("relationship")) { + this.relationship = new CodeableConcept(); + return this.relationship; + } + else if (name.equals("account")) { + this.account = new Reference(); + return this.account; + } + else + return super.addChild(name); + } + + public AccountRelatedAccountComponent copy() { + AccountRelatedAccountComponent dst = new AccountRelatedAccountComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AccountRelatedAccountComponent dst) { + super.copyValues(dst); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.account = account == null ? null : account.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AccountRelatedAccountComponent)) + return false; + AccountRelatedAccountComponent o = (AccountRelatedAccountComponent) other_; + return compareDeep(relationship, o.relationship, true) && compareDeep(account, o.account, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AccountRelatedAccountComponent)) + return false; + AccountRelatedAccountComponent o = (AccountRelatedAccountComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relationship, account); + } + + public String fhirType() { + return "Account.relatedAccount"; + + } + + } + + @Block() + public static class AccountBalanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Who is expected to pay this part of the balance. + */ + @Child(name = "aggregate", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Who is expected to pay this part of the balance", formalDefinition="Who is expected to pay this part of the balance." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-aggregate") + protected CodeableConcept aggregate; + + /** + * The term of the account balances - The balance value is the amount that was outstanding for this age. + */ + @Child(name = "term", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="current | 30 | 60 | 90 | 120", formalDefinition="The term of the account balances - The balance value is the amount that was outstanding for this age." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-balance-term") + protected CodeableConcept term; + + /** + * The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). + */ + @Child(name = "estimate", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Estimated balance", formalDefinition="The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process)." ) + protected BooleanType estimate; + + /** + * The actual balance value calculated for the age defined in the term property. + */ + @Child(name = "amount", type = {Money.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Calculated amount", formalDefinition="The actual balance value calculated for the age defined in the term property." ) + protected Money amount; + + private static final long serialVersionUID = -338990145L; + + /** + * Constructor + */ + public AccountBalanceComponent() { + super(); + } + + /** + * Constructor + */ + public AccountBalanceComponent(Money amount) { + super(); + this.setAmount(amount); + } + + /** + * @return {@link #aggregate} (Who is expected to pay this part of the balance.) + */ + public CodeableConcept getAggregate() { + if (this.aggregate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountBalanceComponent.aggregate"); + else if (Configuration.doAutoCreate()) + this.aggregate = new CodeableConcept(); // cc + return this.aggregate; + } + + public boolean hasAggregate() { + return this.aggregate != null && !this.aggregate.isEmpty(); + } + + /** + * @param value {@link #aggregate} (Who is expected to pay this part of the balance.) + */ + public AccountBalanceComponent setAggregate(CodeableConcept value) { + this.aggregate = value; + return this; + } + + /** + * @return {@link #term} (The term of the account balances - The balance value is the amount that was outstanding for this age.) + */ + public CodeableConcept getTerm() { + if (this.term == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountBalanceComponent.term"); + else if (Configuration.doAutoCreate()) + this.term = new CodeableConcept(); // cc + return this.term; + } + + public boolean hasTerm() { + return this.term != null && !this.term.isEmpty(); + } + + /** + * @param value {@link #term} (The term of the account balances - The balance value is the amount that was outstanding for this age.) + */ + public AccountBalanceComponent setTerm(CodeableConcept value) { + this.term = value; + return this; + } + + /** + * @return {@link #estimate} (The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).). This is the underlying object with id, value and extensions. The accessor "getEstimate" gives direct access to the value + */ + public BooleanType getEstimateElement() { + if (this.estimate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountBalanceComponent.estimate"); + else if (Configuration.doAutoCreate()) + this.estimate = new BooleanType(); // bb + return this.estimate; + } + + public boolean hasEstimateElement() { + return this.estimate != null && !this.estimate.isEmpty(); + } + + public boolean hasEstimate() { + return this.estimate != null && !this.estimate.isEmpty(); + } + + /** + * @param value {@link #estimate} (The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).). This is the underlying object with id, value and extensions. The accessor "getEstimate" gives direct access to the value + */ + public AccountBalanceComponent setEstimateElement(BooleanType value) { + this.estimate = value; + return this; + } + + /** + * @return The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). + */ + public boolean getEstimate() { + return this.estimate == null || this.estimate.isEmpty() ? false : this.estimate.getValue(); + } + + /** + * @param value The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process). + */ + public AccountBalanceComponent setEstimate(boolean value) { + if (this.estimate == null) + this.estimate = new BooleanType(); + this.estimate.setValue(value); + return this; + } + + /** + * @return {@link #amount} (The actual balance value calculated for the age defined in the term property.) + */ + public Money getAmount() { + if (this.amount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AccountBalanceComponent.amount"); + else if (Configuration.doAutoCreate()) + this.amount = new Money(); // cc + return this.amount; + } + + public boolean hasAmount() { + return this.amount != null && !this.amount.isEmpty(); + } + + /** + * @param value {@link #amount} (The actual balance value calculated for the age defined in the term property.) + */ + public AccountBalanceComponent setAmount(Money value) { + this.amount = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("aggregate", "CodeableConcept", "Who is expected to pay this part of the balance.", 0, 1, aggregate)); + children.add(new Property("term", "CodeableConcept", "The term of the account balances - The balance value is the amount that was outstanding for this age.", 0, 1, term)); + children.add(new Property("estimate", "boolean", "The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).", 0, 1, estimate)); + children.add(new Property("amount", "Money", "The actual balance value calculated for the age defined in the term property.", 0, 1, amount)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 175177151: /*aggregate*/ return new Property("aggregate", "CodeableConcept", "Who is expected to pay this part of the balance.", 0, 1, aggregate); + case 3556460: /*term*/ return new Property("term", "CodeableConcept", "The term of the account balances - The balance value is the amount that was outstanding for this age.", 0, 1, term); + case -1959779032: /*estimate*/ return new Property("estimate", "boolean", "The amount is only an estimated value - this is likely common for `current` term balances, but not with known terms (that were generated by a backend process).", 0, 1, estimate); + case -1413853096: /*amount*/ return new Property("amount", "Money", "The actual balance value calculated for the age defined in the term property.", 0, 1, amount); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 175177151: /*aggregate*/ return this.aggregate == null ? new Base[0] : new Base[] {this.aggregate}; // CodeableConcept + case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // CodeableConcept + case -1959779032: /*estimate*/ return this.estimate == null ? new Base[0] : new Base[] {this.estimate}; // BooleanType + case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 175177151: // aggregate + this.aggregate = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 3556460: // term + this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1959779032: // estimate + this.estimate = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -1413853096: // amount + this.amount = TypeConvertor.castToMoney(value); // Money + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("aggregate")) { + this.aggregate = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("term")) { + this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("estimate")) { + this.estimate = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("amount")) { + this.amount = TypeConvertor.castToMoney(value); // Money + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("aggregate")) { + this.aggregate = null; + } else if (name.equals("term")) { + this.term = null; + } else if (name.equals("estimate")) { + this.estimate = null; + } else if (name.equals("amount")) { + this.amount = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 175177151: return getAggregate(); + case 3556460: return getTerm(); + case -1959779032: return getEstimateElement(); + case -1413853096: return getAmount(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 175177151: /*aggregate*/ return new String[] {"CodeableConcept"}; + case 3556460: /*term*/ return new String[] {"CodeableConcept"}; + case -1959779032: /*estimate*/ return new String[] {"boolean"}; + case -1413853096: /*amount*/ return new String[] {"Money"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("aggregate")) { + this.aggregate = new CodeableConcept(); + return this.aggregate; + } + else if (name.equals("term")) { + this.term = new CodeableConcept(); + return this.term; + } + else if (name.equals("estimate")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.balance.estimate"); + } + else if (name.equals("amount")) { + this.amount = new Money(); + return this.amount; + } + else + return super.addChild(name); + } + + public AccountBalanceComponent copy() { + AccountBalanceComponent dst = new AccountBalanceComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AccountBalanceComponent dst) { + super.copyValues(dst); + dst.aggregate = aggregate == null ? null : aggregate.copy(); + dst.term = term == null ? null : term.copy(); + dst.estimate = estimate == null ? null : estimate.copy(); + dst.amount = amount == null ? null : amount.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AccountBalanceComponent)) + return false; + AccountBalanceComponent o = (AccountBalanceComponent) other_; + return compareDeep(aggregate, o.aggregate, true) && compareDeep(term, o.term, true) && compareDeep(estimate, o.estimate, true) + && compareDeep(amount, o.amount, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AccountBalanceComponent)) + return false; + AccountBalanceComponent o = (AccountBalanceComponent) other_; + return compareValues(estimate, o.estimate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(aggregate, term, estimate + , amount); + } + + public String fhirType() { + return "Account.balance"; + + } + + } + + /** + * Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Account number", formalDefinition="Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number)." ) + protected List identifier; + + /** + * Indicates whether the account is presently used/usable or not. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | inactive | entered-in-error | on-hold | unknown", formalDefinition="Indicates whether the account is presently used/usable or not." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-status") + protected Enumeration status; + + /** + * The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account. + */ + @Child(name = "billingStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Tracks the lifecycle of the account through the billing process", formalDefinition="The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-billing-status") + protected CodeableConcept billingStatus; + + /** + * Categorizes the account for reporting and searching purposes. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="E.g. patient, expense, depreciation", formalDefinition="Categorizes the account for reporting and searching purposes." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/account-type") + protected CodeableConcept type; + + /** + * Name used for the account when displaying it to humans in reports, etc. + */ + @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Human-readable label", formalDefinition="Name used for the account when displaying it to humans in reports, etc." ) + protected StringType name; + + /** + * Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account. + */ + @Child(name = "subject", type = {Patient.class, Device.class, Practitioner.class, PractitionerRole.class, Location.class, HealthcareService.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The entity that caused the expenses", formalDefinition="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account." ) + protected List subject; + + /** + * The date range of services associated with this account. + */ + @Child(name = "servicePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Transaction window", formalDefinition="The date range of services associated with this account." ) + protected Period servicePeriod; + + /** + * The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account. + */ + @Child(name = "coverage", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account", formalDefinition="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account." ) + protected List coverage; + + /** + * Indicates the service area, hospital, department, etc. with responsibility for managing the Account. + */ + @Child(name = "owner", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Entity managing the Account", formalDefinition="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." ) + protected Reference owner; + + /** + * Provides additional information about what the account tracks and how it is used. + */ + @Child(name = "description", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Explanation of purpose/use", formalDefinition="Provides additional information about what the account tracks and how it is used." ) + protected MarkdownType description; + + /** + * The parties responsible for balancing the account if other payment options fall short. + */ + @Child(name = "guarantor", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The parties ultimately responsible for balancing the Account", formalDefinition="The parties responsible for balancing the account if other payment options fall short." ) + protected List guarantor; + + /** + * When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s). + */ + @Child(name = "diagnosis", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The list of diagnoses relevant to this account", formalDefinition="When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)." ) + protected List diagnosis; + + /** + * When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s). + */ + @Child(name = "procedure", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The list of procedures relevant to this account", formalDefinition="When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s)." ) + protected List procedure; + + /** + * Other associated accounts related to this account. + */ + @Child(name = "relatedAccount", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Other associated accounts related to this account", formalDefinition="Other associated accounts related to this account." ) + protected List relatedAccount; + + /** + * The default currency for the account. + */ + @Child(name = "currency", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The base or default currency", formalDefinition="The default currency for the account." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/currencies") + protected CodeableConcept currency; + + /** + * The calculated account balances - these are calculated and processed by the finance system. + +The balances with a `term` that is not current are usually generated/updated by an invoicing or similar process. + */ + @Child(name = "balance", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Calculated account balance(s)", formalDefinition="The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process." ) + protected List balance; + + /** + * Time the balance amount was calculated. + */ + @Child(name = "calculatedAt", type = {InstantType.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time the balance amount was calculated", formalDefinition="Time the balance amount was calculated." ) + protected InstantType calculatedAt; + + private static final long serialVersionUID = -924752626L; + + /** + * Constructor + */ + public Account() { + super(); + } + + /** + * Constructor + */ + public Account(AccountStatus status) { + super(); + this.setStatus(status); + } + + /** + * @return {@link #identifier} (Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public Account addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #status} (Indicates whether the account is presently used/usable or not.). 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 Account.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new AccountStatusEnumFactory()); // 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} (Indicates whether the account is presently used/usable or not.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Account setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Indicates whether the account is presently used/usable or not. + */ + public AccountStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Indicates whether the account is presently used/usable or not. + */ + public Account setStatus(AccountStatus value) { + if (this.status == null) + this.status = new Enumeration(new AccountStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.) + */ + public CodeableConcept getBillingStatus() { + if (this.billingStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.billingStatus"); + else if (Configuration.doAutoCreate()) + this.billingStatus = new CodeableConcept(); // cc + return this.billingStatus; + } + + public boolean hasBillingStatus() { + return this.billingStatus != null && !this.billingStatus.isEmpty(); + } + + /** + * @param value {@link #billingStatus} (The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.) + */ + public Account setBillingStatus(CodeableConcept value) { + this.billingStatus = value; + return this; + } + + /** + * @return {@link #type} (Categorizes the account for reporting and searching purposes.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.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} (Categorizes the account for reporting and searching purposes.) + */ + public Account setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #name} (Name used for the account when displaying it to humans in reports, etc.). 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 Account.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 used for the account when displaying it to humans in reports, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Account setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name used for the account when displaying it to humans in reports, etc. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name used for the account when displaying it to humans in reports, etc. + */ + public Account 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 entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.) + */ + public List getSubject() { + if (this.subject == null) + this.subject = new ArrayList(); + return this.subject; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setSubject(List theSubject) { + this.subject = theSubject; + return this; + } + + public boolean hasSubject() { + if (this.subject == null) + return false; + for (Reference item : this.subject) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addSubject() { //3 + Reference t = new Reference(); + if (this.subject == null) + this.subject = new ArrayList(); + this.subject.add(t); + return t; + } + + public Account addSubject(Reference t) { //3 + if (t == null) + return this; + if (this.subject == null) + this.subject = new ArrayList(); + this.subject.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist {3} + */ + public Reference getSubjectFirstRep() { + if (getSubject().isEmpty()) { + addSubject(); + } + return getSubject().get(0); + } + + /** + * @return {@link #servicePeriod} (The date range of services associated with this account.) + */ + public Period getServicePeriod() { + if (this.servicePeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.servicePeriod"); + else if (Configuration.doAutoCreate()) + this.servicePeriod = new Period(); // cc + return this.servicePeriod; + } + + public boolean hasServicePeriod() { + return this.servicePeriod != null && !this.servicePeriod.isEmpty(); + } + + /** + * @param value {@link #servicePeriod} (The date range of services associated with this account.) + */ + public Account setServicePeriod(Period value) { + this.servicePeriod = value; + return this; + } + + /** + * @return {@link #coverage} (The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.) + */ + public List getCoverage() { + if (this.coverage == null) + this.coverage = new ArrayList(); + return this.coverage; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setCoverage(List theCoverage) { + this.coverage = theCoverage; + return this; + } + + public boolean hasCoverage() { + if (this.coverage == null) + return false; + for (CoverageComponent item : this.coverage) + if (!item.isEmpty()) + return true; + return false; + } + + public CoverageComponent addCoverage() { //3 + CoverageComponent t = new CoverageComponent(); + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return t; + } + + public Account addCoverage(CoverageComponent t) { //3 + if (t == null) + return this; + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #coverage}, creating it if it does not already exist {3} + */ + public CoverageComponent getCoverageFirstRep() { + if (getCoverage().isEmpty()) { + addCoverage(); + } + return getCoverage().get(0); + } + + /** + * @return {@link #owner} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.) + */ + public Reference getOwner() { + if (this.owner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.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} (Indicates the service area, hospital, department, etc. with responsibility for managing the Account.) + */ + public Account setOwner(Reference value) { + this.owner = value; + return this; + } + + /** + * @return {@link #description} (Provides additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // 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 additional information about what the account tracks and how it is used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Account setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return Provides additional information about what the account tracks and how it is used. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Provides additional information about what the account tracks and how it is used. + */ + public Account setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #guarantor} (The parties responsible for balancing the account if other payment options fall short.) + */ + public List getGuarantor() { + if (this.guarantor == null) + this.guarantor = new ArrayList(); + return this.guarantor; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setGuarantor(List theGuarantor) { + this.guarantor = theGuarantor; + return this; + } + + public boolean hasGuarantor() { + if (this.guarantor == null) + return false; + for (GuarantorComponent item : this.guarantor) + if (!item.isEmpty()) + return true; + return false; + } + + public GuarantorComponent addGuarantor() { //3 + GuarantorComponent t = new GuarantorComponent(); + if (this.guarantor == null) + this.guarantor = new ArrayList(); + this.guarantor.add(t); + return t; + } + + public Account addGuarantor(GuarantorComponent t) { //3 + if (t == null) + return this; + if (this.guarantor == null) + this.guarantor = new ArrayList(); + this.guarantor.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #guarantor}, creating it if it does not already exist {3} + */ + public GuarantorComponent getGuarantorFirstRep() { + if (getGuarantor().isEmpty()) { + addGuarantor(); + } + return getGuarantor().get(0); + } + + /** + * @return {@link #diagnosis} (When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).) + */ + public List getDiagnosis() { + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + return this.diagnosis; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setDiagnosis(List theDiagnosis) { + this.diagnosis = theDiagnosis; + return this; + } + + public boolean hasDiagnosis() { + if (this.diagnosis == null) + return false; + for (AccountDiagnosisComponent item : this.diagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + public AccountDiagnosisComponent addDiagnosis() { //3 + AccountDiagnosisComponent t = new AccountDiagnosisComponent(); + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return t; + } + + public Account addDiagnosis(AccountDiagnosisComponent t) { //3 + if (t == null) + return this; + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3} + */ + public AccountDiagnosisComponent getDiagnosisFirstRep() { + if (getDiagnosis().isEmpty()) { + addDiagnosis(); + } + return getDiagnosis().get(0); + } + + /** + * @return {@link #procedure} (When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).) + */ + public List getProcedure() { + if (this.procedure == null) + this.procedure = new ArrayList(); + return this.procedure; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setProcedure(List theProcedure) { + this.procedure = theProcedure; + return this; + } + + public boolean hasProcedure() { + if (this.procedure == null) + return false; + for (AccountProcedureComponent item : this.procedure) + if (!item.isEmpty()) + return true; + return false; + } + + public AccountProcedureComponent addProcedure() { //3 + AccountProcedureComponent t = new AccountProcedureComponent(); + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return t; + } + + public Account addProcedure(AccountProcedureComponent t) { //3 + if (t == null) + return this; + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #procedure}, creating it if it does not already exist {3} + */ + public AccountProcedureComponent getProcedureFirstRep() { + if (getProcedure().isEmpty()) { + addProcedure(); + } + return getProcedure().get(0); + } + + /** + * @return {@link #relatedAccount} (Other associated accounts related to this account.) + */ + public List getRelatedAccount() { + if (this.relatedAccount == null) + this.relatedAccount = new ArrayList(); + return this.relatedAccount; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setRelatedAccount(List theRelatedAccount) { + this.relatedAccount = theRelatedAccount; + return this; + } + + public boolean hasRelatedAccount() { + if (this.relatedAccount == null) + return false; + for (AccountRelatedAccountComponent item : this.relatedAccount) + if (!item.isEmpty()) + return true; + return false; + } + + public AccountRelatedAccountComponent addRelatedAccount() { //3 + AccountRelatedAccountComponent t = new AccountRelatedAccountComponent(); + if (this.relatedAccount == null) + this.relatedAccount = new ArrayList(); + this.relatedAccount.add(t); + return t; + } + + public Account addRelatedAccount(AccountRelatedAccountComponent t) { //3 + if (t == null) + return this; + if (this.relatedAccount == null) + this.relatedAccount = new ArrayList(); + this.relatedAccount.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #relatedAccount}, creating it if it does not already exist {3} + */ + public AccountRelatedAccountComponent getRelatedAccountFirstRep() { + if (getRelatedAccount().isEmpty()) { + addRelatedAccount(); + } + return getRelatedAccount().get(0); + } + + /** + * @return {@link #currency} (The default currency for the account.) + */ + public CodeableConcept getCurrency() { + if (this.currency == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.currency"); + else if (Configuration.doAutoCreate()) + this.currency = new CodeableConcept(); // cc + return this.currency; + } + + public boolean hasCurrency() { + return this.currency != null && !this.currency.isEmpty(); + } + + /** + * @param value {@link #currency} (The default currency for the account.) + */ + public Account setCurrency(CodeableConcept value) { + this.currency = value; + return this; + } + + /** + * @return {@link #balance} (The calculated account balances - these are calculated and processed by the finance system. + +The balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.) + */ + public List getBalance() { + if (this.balance == null) + this.balance = new ArrayList(); + return this.balance; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Account setBalance(List theBalance) { + this.balance = theBalance; + return this; + } + + public boolean hasBalance() { + if (this.balance == null) + return false; + for (AccountBalanceComponent item : this.balance) + if (!item.isEmpty()) + return true; + return false; + } + + public AccountBalanceComponent addBalance() { //3 + AccountBalanceComponent t = new AccountBalanceComponent(); + if (this.balance == null) + this.balance = new ArrayList(); + this.balance.add(t); + return t; + } + + public Account addBalance(AccountBalanceComponent t) { //3 + if (t == null) + return this; + if (this.balance == null) + this.balance = new ArrayList(); + this.balance.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #balance}, creating it if it does not already exist {3} + */ + public AccountBalanceComponent getBalanceFirstRep() { + if (getBalance().isEmpty()) { + addBalance(); + } + return getBalance().get(0); + } + + /** + * @return {@link #calculatedAt} (Time the balance amount was calculated.). This is the underlying object with id, value and extensions. The accessor "getCalculatedAt" gives direct access to the value + */ + public InstantType getCalculatedAtElement() { + if (this.calculatedAt == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Account.calculatedAt"); + else if (Configuration.doAutoCreate()) + this.calculatedAt = new InstantType(); // bb + return this.calculatedAt; + } + + public boolean hasCalculatedAtElement() { + return this.calculatedAt != null && !this.calculatedAt.isEmpty(); + } + + public boolean hasCalculatedAt() { + return this.calculatedAt != null && !this.calculatedAt.isEmpty(); + } + + /** + * @param value {@link #calculatedAt} (Time the balance amount was calculated.). This is the underlying object with id, value and extensions. The accessor "getCalculatedAt" gives direct access to the value + */ + public Account setCalculatedAtElement(InstantType value) { + this.calculatedAt = value; + return this; + } + + /** + * @return Time the balance amount was calculated. + */ + public Date getCalculatedAt() { + return this.calculatedAt == null ? null : this.calculatedAt.getValue(); + } + + /** + * @param value Time the balance amount was calculated. + */ + public Account setCalculatedAt(Date value) { + if (value == null) + this.calculatedAt = null; + else { + if (this.calculatedAt == null) + this.calculatedAt = new InstantType(); + this.calculatedAt.setValue(value); + } + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("identifier", "Identifier", "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier)); + children.add(new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status)); + children.add(new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus)); + children.add(new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type)); + children.add(new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name)); + children.add(new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 0, java.lang.Integer.MAX_VALUE, subject)); + children.add(new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod)); + children.add(new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage)); + children.add(new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner)); + children.add(new Property("description", "markdown", "Provides additional information about what the account tracks and how it is used.", 0, 1, description)); + children.add(new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor)); + children.add(new Property("diagnosis", "", "When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + children.add(new Property("procedure", "", "When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, procedure)); + children.add(new Property("relatedAccount", "", "Other associated accounts related to this account.", 0, java.lang.Integer.MAX_VALUE, relatedAccount)); + children.add(new Property("currency", "CodeableConcept", "The default currency for the account.", 0, 1, currency)); + children.add(new Property("balance", "", "The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.", 0, java.lang.Integer.MAX_VALUE, balance)); + children.add(new Property("calculatedAt", "instant", "Time the balance amount was calculated.", 0, 1, calculatedAt)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number).", 0, java.lang.Integer.MAX_VALUE, identifier); + case -892481550: /*status*/ return new Property("status", "code", "Indicates whether the account is presently used/usable or not.", 0, 1, status); + case -1524378035: /*billingStatus*/ return new Property("billingStatus", "CodeableConcept", "The BillingStatus tracks the lifecycle of the account through the billing process. It indicates how transactions are treated when they are allocated to the account.", 0, 1, billingStatus); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Categorizes the account for reporting and searching purposes.", 0, 1, type); + case 3373707: /*name*/ return new Property("name", "string", "Name used for the account when displaying it to humans in reports, etc.", 0, 1, name); + case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Device|Practitioner|PractitionerRole|Location|HealthcareService|Organization)", "Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account.", 0, java.lang.Integer.MAX_VALUE, subject); + case 2129104086: /*servicePeriod*/ return new Property("servicePeriod", "Period", "The date range of services associated with this account.", 0, 1, servicePeriod); + case -351767064: /*coverage*/ return new Property("coverage", "", "The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account.", 0, java.lang.Integer.MAX_VALUE, coverage); + case 106164915: /*owner*/ return new Property("owner", "Reference(Organization)", "Indicates the service area, hospital, department, etc. with responsibility for managing the Account.", 0, 1, owner); + case -1724546052: /*description*/ return new Property("description", "markdown", "Provides additional information about what the account tracks and how it is used.", 0, 1, description); + case -188629045: /*guarantor*/ return new Property("guarantor", "", "The parties responsible for balancing the account if other payment options fall short.", 0, java.lang.Integer.MAX_VALUE, guarantor); + case 1196993265: /*diagnosis*/ return new Property("diagnosis", "", "When using an account for billing a specific Encounter the set of diagnoses that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, diagnosis); + case -1095204141: /*procedure*/ return new Property("procedure", "", "When using an account for billing a specific Encounter the set of procedures that are relevant for billing are stored here on the account where they are able to be sequenced appropriately prior to processing to produce claim(s).", 0, java.lang.Integer.MAX_VALUE, procedure); + case 962039682: /*relatedAccount*/ return new Property("relatedAccount", "", "Other associated accounts related to this account.", 0, java.lang.Integer.MAX_VALUE, relatedAccount); + case 575402001: /*currency*/ return new Property("currency", "CodeableConcept", "The default currency for the account.", 0, 1, currency); + case -339185956: /*balance*/ return new Property("balance", "", "The calculated account balances - these are calculated and processed by the finance system.\r\rThe balances with a `term` that is not current are usually generated/updated by an invoicing or similar process.", 0, java.lang.Integer.MAX_VALUE, balance); + case 1089469073: /*calculatedAt*/ return new Property("calculatedAt", "instant", "Time the balance amount was calculated.", 0, 1, calculatedAt); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case -1524378035: /*billingStatus*/ return this.billingStatus == null ? new Base[0] : new Base[] {this.billingStatus}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference + case 2129104086: /*servicePeriod*/ return this.servicePeriod == null ? new Base[0] : new Base[] {this.servicePeriod}; // Period + case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // CoverageComponent + case 106164915: /*owner*/ return this.owner == null ? new Base[0] : new Base[] {this.owner}; // Reference + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case -188629045: /*guarantor*/ return this.guarantor == null ? new Base[0] : this.guarantor.toArray(new Base[this.guarantor.size()]); // GuarantorComponent + case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // AccountDiagnosisComponent + case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // AccountProcedureComponent + case 962039682: /*relatedAccount*/ return this.relatedAccount == null ? new Base[0] : this.relatedAccount.toArray(new Base[this.relatedAccount.size()]); // AccountRelatedAccountComponent + case 575402001: /*currency*/ return this.currency == null ? new Base[0] : new Base[] {this.currency}; // CodeableConcept + case -339185956: /*balance*/ return this.balance == null ? new Base[0] : this.balance.toArray(new Base[this.balance.size()]); // AccountBalanceComponent + case 1089469073: /*calculatedAt*/ return this.calculatedAt == null ? new Base[0] : new Base[] {this.calculatedAt}; // InstantType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier + return value; + case -892481550: // status + value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case -1524378035: // billingStatus + this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 3575610: // type + this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 3373707: // name + this.name = TypeConvertor.castToString(value); // StringType + return value; + case -1867885268: // subject + this.getSubject().add(TypeConvertor.castToReference(value)); // Reference + return value; + case 2129104086: // servicePeriod + this.servicePeriod = TypeConvertor.castToPeriod(value); // Period + return value; + case -351767064: // coverage + this.getCoverage().add((CoverageComponent) value); // CoverageComponent + return value; + case 106164915: // owner + this.owner = TypeConvertor.castToReference(value); // Reference + return value; + case -1724546052: // description + this.description = TypeConvertor.castToMarkdown(value); // MarkdownType + return value; + case -188629045: // guarantor + this.getGuarantor().add((GuarantorComponent) value); // GuarantorComponent + return value; + case 1196993265: // diagnosis + this.getDiagnosis().add((AccountDiagnosisComponent) value); // AccountDiagnosisComponent + return value; + case -1095204141: // procedure + this.getProcedure().add((AccountProcedureComponent) value); // AccountProcedureComponent + return value; + case 962039682: // relatedAccount + this.getRelatedAccount().add((AccountRelatedAccountComponent) value); // AccountRelatedAccountComponent + return value; + case 575402001: // currency + this.currency = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -339185956: // balance + this.getBalance().add((AccountBalanceComponent) value); // AccountBalanceComponent + return value; + case 1089469073: // calculatedAt + this.calculatedAt = TypeConvertor.castToInstant(value); // InstantType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); + } else if (name.equals("status")) { + value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("billingStatus")) { + this.billingStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("type")) { + this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("name")) { + this.name = TypeConvertor.castToString(value); // StringType + } else if (name.equals("subject")) { + this.getSubject().add(TypeConvertor.castToReference(value)); + } else if (name.equals("servicePeriod")) { + this.servicePeriod = TypeConvertor.castToPeriod(value); // Period + } else if (name.equals("coverage")) { + this.getCoverage().add((CoverageComponent) value); + } else if (name.equals("owner")) { + this.owner = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("description")) { + this.description = TypeConvertor.castToMarkdown(value); // MarkdownType + } else if (name.equals("guarantor")) { + this.getGuarantor().add((GuarantorComponent) value); + } else if (name.equals("diagnosis")) { + this.getDiagnosis().add((AccountDiagnosisComponent) value); + } else if (name.equals("procedure")) { + this.getProcedure().add((AccountProcedureComponent) value); + } else if (name.equals("relatedAccount")) { + this.getRelatedAccount().add((AccountRelatedAccountComponent) value); + } else if (name.equals("currency")) { + this.currency = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("balance")) { + this.getBalance().add((AccountBalanceComponent) value); + } else if (name.equals("calculatedAt")) { + this.calculatedAt = TypeConvertor.castToInstant(value); // InstantType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().remove(value); + } else if (name.equals("status")) { + value = new AccountStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("billingStatus")) { + this.billingStatus = null; + } else if (name.equals("type")) { + this.type = null; + } else if (name.equals("name")) { + this.name = null; + } else if (name.equals("subject")) { + this.getSubject().remove(value); + } else if (name.equals("servicePeriod")) { + this.servicePeriod = null; + } else if (name.equals("coverage")) { + this.getCoverage().remove((CoverageComponent) value); + } else if (name.equals("owner")) { + this.owner = null; + } else if (name.equals("description")) { + this.description = null; + } else if (name.equals("guarantor")) { + this.getGuarantor().remove((GuarantorComponent) value); + } else if (name.equals("diagnosis")) { + this.getDiagnosis().remove((AccountDiagnosisComponent) value); + } else if (name.equals("procedure")) { + this.getProcedure().remove((AccountProcedureComponent) value); + } else if (name.equals("relatedAccount")) { + this.getRelatedAccount().remove((AccountRelatedAccountComponent) value); + } else if (name.equals("currency")) { + this.currency = null; + } else if (name.equals("balance")) { + this.getBalance().remove((AccountBalanceComponent) value); + } else if (name.equals("calculatedAt")) { + this.calculatedAt = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return addIdentifier(); + case -892481550: return getStatusElement(); + case -1524378035: return getBillingStatus(); + case 3575610: return getType(); + case 3373707: return getNameElement(); + case -1867885268: return addSubject(); + case 2129104086: return getServicePeriod(); + case -351767064: return addCoverage(); + case 106164915: return getOwner(); + case -1724546052: return getDescriptionElement(); + case -188629045: return addGuarantor(); + case 1196993265: return addDiagnosis(); + case -1095204141: return addProcedure(); + case 962039682: return addRelatedAccount(); + case 575402001: return getCurrency(); + case -339185956: return addBalance(); + case 1089469073: return getCalculatedAtElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case -892481550: /*status*/ return new String[] {"code"}; + case -1524378035: /*billingStatus*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 3373707: /*name*/ return new String[] {"string"}; + case -1867885268: /*subject*/ return new String[] {"Reference"}; + case 2129104086: /*servicePeriod*/ return new String[] {"Period"}; + case -351767064: /*coverage*/ return new String[] {}; + case 106164915: /*owner*/ return new String[] {"Reference"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case -188629045: /*guarantor*/ return new String[] {}; + case 1196993265: /*diagnosis*/ return new String[] {}; + case -1095204141: /*procedure*/ return new String[] {}; + case 962039682: /*relatedAccount*/ return new String[] {}; + case 575402001: /*currency*/ return new String[] {"CodeableConcept"}; + case -339185956: /*balance*/ return new String[] {}; + case 1089469073: /*calculatedAt*/ return new String[] {"instant"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.status"); + } + else if (name.equals("billingStatus")) { + this.billingStatus = new CodeableConcept(); + return this.billingStatus; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.name"); + } + else if (name.equals("subject")) { + return addSubject(); + } + else if (name.equals("servicePeriod")) { + this.servicePeriod = new Period(); + return this.servicePeriod; + } + else if (name.equals("coverage")) { + return addCoverage(); + } + else if (name.equals("owner")) { + this.owner = new Reference(); + return this.owner; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.description"); + } + else if (name.equals("guarantor")) { + return addGuarantor(); + } + else if (name.equals("diagnosis")) { + return addDiagnosis(); + } + else if (name.equals("procedure")) { + return addProcedure(); + } + else if (name.equals("relatedAccount")) { + return addRelatedAccount(); + } + else if (name.equals("currency")) { + this.currency = new CodeableConcept(); + return this.currency; + } + else if (name.equals("balance")) { + return addBalance(); + } + else if (name.equals("calculatedAt")) { + throw new FHIRException("Cannot call addChild on a singleton property Account.calculatedAt"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Account"; + + } + + public Account copy() { + Account dst = new Account(); + copyValues(dst); + return dst; + } + + public void copyValues(Account dst) { + super.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(); + dst.billingStatus = billingStatus == null ? null : billingStatus.copy(); + dst.type = type == null ? null : type.copy(); + dst.name = name == null ? null : name.copy(); + if (subject != null) { + dst.subject = new ArrayList(); + for (Reference i : subject) + dst.subject.add(i.copy()); + }; + dst.servicePeriod = servicePeriod == null ? null : servicePeriod.copy(); + if (coverage != null) { + dst.coverage = new ArrayList(); + for (CoverageComponent i : coverage) + dst.coverage.add(i.copy()); + }; + dst.owner = owner == null ? null : owner.copy(); + dst.description = description == null ? null : description.copy(); + if (guarantor != null) { + dst.guarantor = new ArrayList(); + for (GuarantorComponent i : guarantor) + dst.guarantor.add(i.copy()); + }; + if (diagnosis != null) { + dst.diagnosis = new ArrayList(); + for (AccountDiagnosisComponent i : diagnosis) + dst.diagnosis.add(i.copy()); + }; + if (procedure != null) { + dst.procedure = new ArrayList(); + for (AccountProcedureComponent i : procedure) + dst.procedure.add(i.copy()); + }; + if (relatedAccount != null) { + dst.relatedAccount = new ArrayList(); + for (AccountRelatedAccountComponent i : relatedAccount) + dst.relatedAccount.add(i.copy()); + }; + dst.currency = currency == null ? null : currency.copy(); + if (balance != null) { + dst.balance = new ArrayList(); + for (AccountBalanceComponent i : balance) + dst.balance.add(i.copy()); + }; + dst.calculatedAt = calculatedAt == null ? null : calculatedAt.copy(); + } + + protected Account typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof Account)) + return false; + Account o = (Account) other_; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(billingStatus, o.billingStatus, true) + && compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) + && compareDeep(servicePeriod, o.servicePeriod, true) && compareDeep(coverage, o.coverage, true) + && compareDeep(owner, o.owner, true) && compareDeep(description, o.description, true) && compareDeep(guarantor, o.guarantor, true) + && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(procedure, o.procedure, true) && compareDeep(relatedAccount, o.relatedAccount, true) + && compareDeep(currency, o.currency, true) && compareDeep(balance, o.balance, true) && compareDeep(calculatedAt, o.calculatedAt, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof Account)) + return false; + Account o = (Account) other_; + return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) + && compareValues(calculatedAt, o.calculatedAt, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, billingStatus + , type, name, subject, servicePeriod, coverage, owner, description, guarantor + , diagnosis, procedure, relatedAccount, currency, balance, calculatedAt); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Account; + } + + /** + * Search parameter: guarantor + *

+ * Description: The parties ultimately responsible for balancing the Account
+ * Type: reference
+ * Path: Account.guarantor.party
+ *

+ */ + @SearchParamDefinition(name="guarantor", path="Account.guarantor.party", description="The parties ultimately responsible for balancing the Account", type="reference", target={Organization.class, Patient.class, RelatedPerson.class } ) + public static final String SP_GUARANTOR = "guarantor"; + /** + * Fluent Client search parameter constant for guarantor + *

+ * Description: The parties ultimately responsible for balancing the Account
+ * Type: reference
+ * Path: Account.guarantor.party
+ *

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

+ * Description: Human-readable label
+ * Type: string
+ * Path: Account.name
+ *

+ */ + @SearchParamDefinition(name="name", path="Account.name", description="Human-readable label", type="string" ) + public static final String SP_NAME = "name"; + /** + * Fluent Client search parameter constant for name + *

+ * Description: Human-readable label
+ * Type: string
+ * Path: Account.name
+ *

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

+ * Description: Entity managing the Account
+ * Type: reference
+ * Path: Account.owner
+ *

+ */ + @SearchParamDefinition(name="owner", path="Account.owner", description="Entity managing the Account", type="reference", target={Organization.class } ) + public static final String SP_OWNER = "owner"; + /** + * Fluent Client search parameter constant for owner + *

+ * Description: Entity managing the Account
+ * Type: reference
+ * Path: Account.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 "Account:owner". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Account:owner").toLocked(); + + /** + * Search parameter: period + *

+ * Description: Transaction window
+ * Type: date
+ * Path: Account.servicePeriod
+ *

+ */ + @SearchParamDefinition(name="period", path="Account.servicePeriod", description="Transaction window", type="date" ) + public static final String SP_PERIOD = "period"; + /** + * Fluent Client search parameter constant for period + *

+ * Description: Transaction window
+ * Type: date
+ * Path: Account.servicePeriod
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD); + + /** + * Search parameter: relatedaccount + *

+ * Description: Parent and other related accounts
+ * Type: reference
+ * Path: Account.relatedAccount.account
+ *

+ */ + @SearchParamDefinition(name="relatedaccount", path="Account.relatedAccount.account", description="Parent and other related accounts", type="reference", target={Account.class } ) + public static final String SP_RELATEDACCOUNT = "relatedaccount"; + /** + * Fluent Client search parameter constant for relatedaccount + *

+ * Description: Parent and other related accounts
+ * Type: reference
+ * Path: Account.relatedAccount.account
+ *

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

+ * Description: active | inactive | entered-in-error | on-hold | unknown
+ * Type: token
+ * Path: Account.status
+ *

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

+ * Description: active | inactive | entered-in-error | on-hold | unknown
+ * Type: token
+ * Path: Account.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + /** + * Search parameter: subject + *

+ * Description: The entity that caused the expenses
+ * Type: reference
+ * Path: Account.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="Account.subject", description="The entity that caused the expenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class } ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: The entity that caused the expenses
+ * Type: reference
+ * Path: Account.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 "Account:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Account:subject").toLocked(); + + /** + * Search parameter: identifier + *

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Account:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Account:patient").toLocked(); + + /** + * Search parameter: type + *

+ * Description: Multiple Resources: + +* [Account](account.html): E.g. patient, expense, depreciation +* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) +* [Composition](composition.html): Kind of composition (LOINC if possible) +* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) +* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) +* [Encounter](encounter.html): Specific type of encounter +* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management +* [Invoice](invoice.html): Type of Invoice +* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type +* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence +* [Specimen](specimen.html): The specimen type +
+ * Type: token
+ * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
+ *

+ */ + @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: Multiple Resources: + +* [Account](account.html): E.g. patient, expense, depreciation +* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) +* [Composition](composition.html): Kind of composition (LOINC if possible) +* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) +* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) +* [Encounter](encounter.html): Specific type of encounter +* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management +* [Invoice](invoice.html): Type of Invoice +* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type +* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence +* [Specimen](specimen.html): The specimen type +
+ * Type: token
+ * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ActivityDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ActivityDefinition.java index 3a8ff861b..6d9e545c8 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ActivityDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ActivityDefinition.java @@ -348,7 +348,9 @@ public class ActivityDefinition extends MetadataResource { throw new FHIRException("Unknown RequestResourceTypes code '"+codeString+"'"); } public String toCode(RequestResourceTypes code) { - if (code == RequestResourceTypes.APPOINTMENT) + if (code == RequestResourceTypes.NULL) + return null; + if (code == RequestResourceTypes.APPOINTMENT) return "Appointment"; if (code == RequestResourceTypes.APPOINTMENTRESPONSE) return "AppointmentResponse"; @@ -383,7 +385,7 @@ public class ActivityDefinition extends MetadataResource { if (code == RequestResourceTypes.VISIONPRESCRIPTION) return "VisionPrescription"; return "?"; - } + } public String toSystem(RequestResourceTypes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Address.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Address.java index c4d230b7f..2c1af3131 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Address.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Address.java @@ -46,7 +46,7 @@ import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; /** - * Address Type: 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 which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. + * Address Type: 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 which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. The ISO21090-codedString may be used to provide a coded representation of the contents of strings in an Address. */ @DatatypeDef(name="Address") @@ -151,14 +151,16 @@ public class Address extends DataType implements ICompositeType { throw new FHIRException("Unknown AddressType code '"+codeString+"'"); } public String toCode(AddressType code) { - if (code == AddressType.POSTAL) + if (code == AddressType.NULL) + return null; + if (code == AddressType.POSTAL) return "postal"; if (code == AddressType.PHYSICAL) return "physical"; if (code == AddressType.BOTH) return "both"; return "?"; - } + } public String toSystem(AddressType code) { return code.getSystem(); } @@ -291,7 +293,9 @@ public class Address extends DataType implements ICompositeType { throw new FHIRException("Unknown AddressUse code '"+codeString+"'"); } public String toCode(AddressUse code) { - if (code == AddressUse.HOME) + if (code == AddressUse.NULL) + return null; + if (code == AddressUse.HOME) return "home"; if (code == AddressUse.WORK) return "work"; @@ -302,7 +306,7 @@ public class Address extends DataType implements ICompositeType { if (code == AddressUse.BILLING) return "billing"; return "?"; - } + } public String toSystem(AddressUse code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AdverseEvent.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AdverseEvent.java index dca99e2d8..4258957dd 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AdverseEvent.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AdverseEvent.java @@ -138,12 +138,14 @@ public class AdverseEvent extends DomainResource { throw new FHIRException("Unknown AdverseEventActuality code '"+codeString+"'"); } public String toCode(AdverseEventActuality code) { - if (code == AdverseEventActuality.ACTUAL) + if (code == AdverseEventActuality.NULL) + return null; + if (code == AdverseEventActuality.ACTUAL) return "actual"; if (code == AdverseEventActuality.POTENTIAL) return "potential"; return "?"; - } + } public String toSystem(AdverseEventActuality code) { return code.getSystem(); } @@ -262,7 +264,9 @@ public class AdverseEvent extends DomainResource { throw new FHIRException("Unknown AdverseEventStatus code '"+codeString+"'"); } public String toCode(AdverseEventStatus code) { - if (code == AdverseEventStatus.INPROGRESS) + if (code == AdverseEventStatus.NULL) + return null; + if (code == AdverseEventStatus.INPROGRESS) return "in-progress"; if (code == AdverseEventStatus.COMPLETED) return "completed"; @@ -271,7 +275,7 @@ public class AdverseEvent extends DomainResource { if (code == AdverseEventStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(AdverseEventStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AllergyIntolerance.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AllergyIntolerance.java index b0e187ff6..82a798db1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AllergyIntolerance.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AllergyIntolerance.java @@ -166,7 +166,9 @@ public class AllergyIntolerance extends DomainResource { throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); } public String toCode(AllergyIntoleranceCategory code) { - if (code == AllergyIntoleranceCategory.FOOD) + if (code == AllergyIntoleranceCategory.NULL) + return null; + if (code == AllergyIntoleranceCategory.FOOD) return "food"; if (code == AllergyIntoleranceCategory.MEDICATION) return "medication"; @@ -175,7 +177,7 @@ public class AllergyIntolerance extends DomainResource { if (code == AllergyIntoleranceCategory.BIOLOGIC) return "biologic"; return "?"; - } + } public String toSystem(AllergyIntoleranceCategory code) { return code.getSystem(); } @@ -280,14 +282,16 @@ public class AllergyIntolerance extends DomainResource { throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); } public String toCode(AllergyIntoleranceCriticality code) { - if (code == AllergyIntoleranceCriticality.LOW) + if (code == AllergyIntoleranceCriticality.NULL) + return null; + 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(); } @@ -392,14 +396,16 @@ public class AllergyIntolerance extends DomainResource { throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); } public String toCode(AllergyIntoleranceSeverity code) { - if (code == AllergyIntoleranceSeverity.MILD) + if (code == AllergyIntoleranceSeverity.NULL) + return null; + if (code == AllergyIntoleranceSeverity.MILD) return "mild"; if (code == AllergyIntoleranceSeverity.MODERATE) return "moderate"; if (code == AllergyIntoleranceSeverity.SEVERE) return "severe"; return "?"; - } + } public String toSystem(AllergyIntoleranceSeverity code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Appointment.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Appointment.java index 2c357932e..f2c29bae1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Appointment.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Appointment.java @@ -1,6111 +1,6125 @@ -package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.r5.model.Enumerations.*; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Block; - -/** - * 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). - */ -@ResourceDef(name="Appointment", profile="http://hl7.org/fhir/StructureDefinition/Appointment") -public class Appointment extends DomainResource { - - public enum AppointmentStatus { - /** - * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet. - */ - PROPOSED, - /** - * Some or all of the participant(s) have not finalized their acceptance of the appointment request. - */ - PENDING, - /** - * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. - */ - BOOKED, - /** - * The patient/patients has/have arrived and is/are waiting to be seen. - */ - ARRIVED, - /** - * The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons. - */ - FULFILLED, - /** - * The appointment has been cancelled. - */ - CANCELLED, - /** - * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). - */ - NOSHOW, - /** - * This instance should not have been part of this patient's medical record. - */ - ENTEREDINERROR, - /** - * When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present). - */ - CHECKEDIN, - /** - * The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated. - */ - WAITLIST, - /** - * added to help the parsers with the generic types - */ - NULL; - public static AppointmentStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("pending".equals(codeString)) - return PENDING; - if ("booked".equals(codeString)) - return BOOKED; - if ("arrived".equals(codeString)) - return ARRIVED; - if ("fulfilled".equals(codeString)) - return FULFILLED; - if ("cancelled".equals(codeString)) - return CANCELLED; - if ("noshow".equals(codeString)) - return NOSHOW; - if ("entered-in-error".equals(codeString)) - return ENTEREDINERROR; - if ("checked-in".equals(codeString)) - return CHECKEDIN; - if ("waitlist".equals(codeString)) - return WAITLIST; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PROPOSED: return "proposed"; - case PENDING: return "pending"; - case BOOKED: return "booked"; - case ARRIVED: return "arrived"; - case FULFILLED: return "fulfilled"; - case CANCELLED: return "cancelled"; - case NOSHOW: return "noshow"; - case ENTEREDINERROR: return "entered-in-error"; - case CHECKEDIN: return "checked-in"; - case WAITLIST: return "waitlist"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PROPOSED: return "http://hl7.org/fhir/appointmentstatus"; - case PENDING: return "http://hl7.org/fhir/appointmentstatus"; - case BOOKED: return "http://hl7.org/fhir/appointmentstatus"; - case ARRIVED: return "http://hl7.org/fhir/appointmentstatus"; - case FULFILLED: return "http://hl7.org/fhir/appointmentstatus"; - case CANCELLED: return "http://hl7.org/fhir/appointmentstatus"; - case NOSHOW: return "http://hl7.org/fhir/appointmentstatus"; - case ENTEREDINERROR: return "http://hl7.org/fhir/appointmentstatus"; - case CHECKEDIN: return "http://hl7.org/fhir/appointmentstatus"; - case WAITLIST: return "http://hl7.org/fhir/appointmentstatus"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet."; - case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; - case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; - case ARRIVED: return "The patient/patients has/have arrived and is/are waiting to be seen."; - case FULFILLED: return "The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons."; - case CANCELLED: return "The appointment has been cancelled."; - case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; - case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; - case CHECKEDIN: return "When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present)."; - case WAITLIST: return "The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PROPOSED: return "Proposed"; - case PENDING: return "Pending"; - case BOOKED: return "Booked"; - case ARRIVED: return "Arrived"; - case FULFILLED: return "Fulfilled"; - case CANCELLED: return "Cancelled"; - case NOSHOW: return "No Show"; - case ENTEREDINERROR: return "Entered in error"; - case CHECKEDIN: return "Checked In"; - case WAITLIST: return "Waitlisted"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class AppointmentStatusEnumFactory implements EnumFactory { - public AppointmentStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("proposed".equals(codeString)) - return AppointmentStatus.PROPOSED; - if ("pending".equals(codeString)) - return AppointmentStatus.PENDING; - if ("booked".equals(codeString)) - return AppointmentStatus.BOOKED; - if ("arrived".equals(codeString)) - return AppointmentStatus.ARRIVED; - if ("fulfilled".equals(codeString)) - return AppointmentStatus.FULFILLED; - if ("cancelled".equals(codeString)) - return AppointmentStatus.CANCELLED; - if ("noshow".equals(codeString)) - return AppointmentStatus.NOSHOW; - if ("entered-in-error".equals(codeString)) - return AppointmentStatus.ENTEREDINERROR; - if ("checked-in".equals(codeString)) - return AppointmentStatus.CHECKEDIN; - if ("waitlist".equals(codeString)) - return AppointmentStatus.WAITLIST; - throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, AppointmentStatus.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, AppointmentStatus.NULL, code); - if ("proposed".equals(codeString)) - return new Enumeration(this, AppointmentStatus.PROPOSED, code); - if ("pending".equals(codeString)) - return new Enumeration(this, AppointmentStatus.PENDING, code); - if ("booked".equals(codeString)) - return new Enumeration(this, AppointmentStatus.BOOKED, code); - if ("arrived".equals(codeString)) - return new Enumeration(this, AppointmentStatus.ARRIVED, code); - if ("fulfilled".equals(codeString)) - return new Enumeration(this, AppointmentStatus.FULFILLED, code); - if ("cancelled".equals(codeString)) - return new Enumeration(this, AppointmentStatus.CANCELLED, code); - if ("noshow".equals(codeString)) - return new Enumeration(this, AppointmentStatus.NOSHOW, code); - if ("entered-in-error".equals(codeString)) - return new Enumeration(this, AppointmentStatus.ENTEREDINERROR, code); - if ("checked-in".equals(codeString)) - return new Enumeration(this, AppointmentStatus.CHECKEDIN, code); - if ("waitlist".equals(codeString)) - return new Enumeration(this, AppointmentStatus.WAITLIST, code); - throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); - } - public String toCode(AppointmentStatus code) { - if (code == AppointmentStatus.PROPOSED) - return "proposed"; - if (code == AppointmentStatus.PENDING) - return "pending"; - if (code == AppointmentStatus.BOOKED) - return "booked"; - if (code == AppointmentStatus.ARRIVED) - return "arrived"; - if (code == AppointmentStatus.FULFILLED) - return "fulfilled"; - if (code == AppointmentStatus.CANCELLED) - return "cancelled"; - if (code == AppointmentStatus.NOSHOW) - return "noshow"; - if (code == AppointmentStatus.ENTEREDINERROR) - return "entered-in-error"; - if (code == AppointmentStatus.CHECKEDIN) - return "checked-in"; - if (code == AppointmentStatus.WAITLIST) - return "waitlist"; - return "?"; - } - public String toSystem(AppointmentStatus code) { - return code.getSystem(); - } - } - - public enum ParticipationStatus { - /** - * The participant has accepted the appointment. - */ - ACCEPTED, - /** - * The participant has declined the appointment and will not participate in the appointment. - */ - DECLINED, - /** - * The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur. - */ - TENTATIVE, - /** - * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses. - */ - NEEDSACTION, - /** - * added to help the parsers with the generic types - */ - NULL; - public static ParticipationStatus 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 ("needs-action".equals(codeString)) - return NEEDSACTION; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACCEPTED: return "accepted"; - case DECLINED: return "declined"; - case TENTATIVE: return "tentative"; - case NEEDSACTION: return "needs-action"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ACCEPTED: return "http://hl7.org/fhir/participationstatus"; - case DECLINED: return "http://hl7.org/fhir/participationstatus"; - case TENTATIVE: return "http://hl7.org/fhir/participationstatus"; - case NEEDSACTION: return "http://hl7.org/fhir/participationstatus"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ACCEPTED: return "The participant has accepted the appointment."; - case DECLINED: return "The participant has declined the appointment and will not participate in the appointment."; - case TENTATIVE: return "The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur."; - case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACCEPTED: return "Accepted"; - case DECLINED: return "Declined"; - case TENTATIVE: return "Tentative"; - case NEEDSACTION: return "Needs Action"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class ParticipationStatusEnumFactory implements EnumFactory { - public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("accepted".equals(codeString)) - return ParticipationStatus.ACCEPTED; - if ("declined".equals(codeString)) - return ParticipationStatus.DECLINED; - if ("tentative".equals(codeString)) - return ParticipationStatus.TENTATIVE; - if ("needs-action".equals(codeString)) - return ParticipationStatus.NEEDSACTION; - throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, ParticipationStatus.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, ParticipationStatus.NULL, code); - if ("accepted".equals(codeString)) - return new Enumeration(this, ParticipationStatus.ACCEPTED, code); - if ("declined".equals(codeString)) - return new Enumeration(this, ParticipationStatus.DECLINED, code); - if ("tentative".equals(codeString)) - return new Enumeration(this, ParticipationStatus.TENTATIVE, code); - if ("needs-action".equals(codeString)) - return new Enumeration(this, ParticipationStatus.NEEDSACTION, code); - throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); - } - public String toCode(ParticipationStatus code) { - if (code == ParticipationStatus.ACCEPTED) - return "accepted"; - if (code == ParticipationStatus.DECLINED) - return "declined"; - if (code == ParticipationStatus.TENTATIVE) - return "tentative"; - if (code == ParticipationStatus.NEEDSACTION) - return "needs-action"; - return "?"; - } - public String toSystem(ParticipationStatus code) { - return code.getSystem(); - } - } - - @Block() - public static class AppointmentParticipantComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Role of participant in the appointment. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-participant-type") - protected List type; - - /** - * Participation period of the actor. - */ - @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Participation period of the actor", formalDefinition="Participation period of the actor." ) - protected Period period; - - /** - * The individual, device, location, or service participating in the appointment. - */ - @Child(name = "actor", type = {Patient.class, Group.class, Practitioner.class, PractitionerRole.class, CareTeam.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The individual, device, location, or service participating in the appointment", formalDefinition="The individual, device, location, or service participating in the appointment." ) - protected Reference actor; - - /** - * Whether this participant is required to be present at the meeting. If false, the participant is optional. - */ - @Child(name = "required", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The participant is required to attend (optional when false)", formalDefinition="Whether this participant is required to be present at the meeting. If false, the participant is optional." ) - protected BooleanType required; - - /** - * Participation status of the actor. - */ - @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="accepted | declined | tentative | needs-action", formalDefinition="Participation status of the actor." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participationstatus") - protected Enumeration status; - - private static final long serialVersionUID = 1537536134L; - - /** - * Constructor - */ - public AppointmentParticipantComponent() { - super(); - } - - /** - * Constructor - */ - public AppointmentParticipantComponent(ParticipationStatus status) { - super(); - this.setStatus(status); - } - - /** - * @return {@link #type} (Role of participant in the appointment.) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AppointmentParticipantComponent setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public AppointmentParticipantComponent addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #period} (Participation period of the actor.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentParticipantComponent.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} (Participation period of the actor.) - */ - public AppointmentParticipantComponent setPeriod(Period value) { - this.period = value; - return this; - } - - /** - * @return {@link #actor} (The individual, device, location, or service participating in the appointment.) - */ - public Reference getActor() { - if (this.actor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentParticipantComponent.actor"); - else if (Configuration.doAutoCreate()) - this.actor = new Reference(); // cc - return this.actor; - } - - public boolean hasActor() { - return this.actor != null && !this.actor.isEmpty(); - } - - /** - * @param value {@link #actor} (The individual, device, location, or service participating in the appointment.) - */ - public AppointmentParticipantComponent setActor(Reference value) { - this.actor = value; - return this; - } - - /** - * @return {@link #required} (Whether this participant is required to be present at the meeting. If false, the participant is optional.). 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 AppointmentParticipantComponent.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 participant is required to be present at the meeting. If false, the participant is optional.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value - */ - public AppointmentParticipantComponent setRequiredElement(BooleanType value) { - this.required = value; - return this; - } - - /** - * @return Whether this participant is required to be present at the meeting. If false, the participant is optional. - */ - public boolean getRequired() { - return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); - } - - /** - * @param value Whether this participant is required to be present at the meeting. If false, the participant is optional. - */ - public AppointmentParticipantComponent setRequired(boolean value) { - if (this.required == null) - this.required = new BooleanType(); - this.required.setValue(value); - return this; - } - - /** - * @return {@link #status} (Participation status of the actor.). 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 AppointmentParticipantComponent.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ParticipationStatusEnumFactory()); // 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} (Participation status of the actor.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public AppointmentParticipantComponent setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return Participation status of the actor. - */ - public ParticipationStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value Participation status of the actor. - */ - public AppointmentParticipantComponent setStatus(ParticipationStatus value) { - if (this.status == null) - this.status = new Enumeration(new ParticipationStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("period", "Period", "Participation period of the actor.", 0, 1, period)); - children.add(new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor)); - children.add(new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required)); - children.add(new Property("status", "code", "Participation status of the actor.", 0, 1, status)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type); - case -991726143: /*period*/ return new Property("period", "Period", "Participation period of the actor.", 0, 1, period); - case 92645877: /*actor*/ return new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor); - case -393139297: /*required*/ return new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required); - case -892481550: /*status*/ return new Property("status", "code", "Participation status of the actor.", 0, 1, status); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period - case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference - case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -991726143: // period - this.period = TypeConvertor.castToPeriod(value); // Period - return value; - case 92645877: // actor - this.actor = TypeConvertor.castToReference(value); // Reference - return value; - case -393139297: // required - this.required = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -892481550: // status - value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("period")) { - this.period = TypeConvertor.castToPeriod(value); // Period - } else if (name.equals("actor")) { - this.actor = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("required")) { - this.required = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("status")) { - value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("period")) { - this.period = null; - } else if (name.equals("actor")) { - this.actor = null; - } else if (name.equals("required")) { - this.required = null; - } else if (name.equals("status")) { - value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3575610: return addType(); - case -991726143: return getPeriod(); - case 92645877: return getActor(); - case -393139297: return getRequiredElement(); - case -892481550: return getStatusElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case -991726143: /*period*/ return new String[] {"Period"}; - case 92645877: /*actor*/ return new String[] {"Reference"}; - case -393139297: /*required*/ return new String[] {"boolean"}; - case -892481550: /*status*/ return new String[] {"code"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("type")) { - return addType(); - } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; - } - else if (name.equals("actor")) { - this.actor = new Reference(); - return this.actor; - } - else if (name.equals("required")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.participant.required"); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.participant.status"); - } - else - return super.addChild(name); - } - - public AppointmentParticipantComponent copy() { - AppointmentParticipantComponent dst = new AppointmentParticipantComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AppointmentParticipantComponent dst) { - super.copyValues(dst); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - dst.period = period == null ? null : period.copy(); - dst.actor = actor == null ? null : actor.copy(); - dst.required = required == null ? null : required.copy(); - dst.status = status == null ? null : status.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AppointmentParticipantComponent)) - return false; - AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; - return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) - && compareDeep(required, o.required, true) && compareDeep(status, o.status, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AppointmentParticipantComponent)) - return false; - AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; - return compareValues(required, o.required, true) && compareValues(status, o.status, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor, required - , status); - } - - public String fhirType() { - return "Appointment.participant"; - - } - - } - - @Block() - public static class AppointmentRecurrenceTemplateComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The timezone of the recurring appointment occurrences. - */ - @Child(name = "timezone", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The timezone of the occurrences", formalDefinition="The timezone of the recurring appointment occurrences." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/timezones") - protected CodeableConcept timezone; - - /** - * How often the appointment series should recur. - */ - @Child(name = "recurrenceType", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The frequency of the recurrence", formalDefinition="How often the appointment series should recur." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-recurrrence-type") - protected CodeableConcept recurrenceType; - - /** - * Recurring appointments will not occur after this date. - */ - @Child(name = "lastOccurrenceDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The date when the recurrence should end", formalDefinition="Recurring appointments will not occur after this date." ) - protected DateType lastOccurrenceDate; - - /** - * How many appointments are planned in the recurrence. - */ - @Child(name = "occurrenceCount", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The number of planned occurrences", formalDefinition="How many appointments are planned in the recurrence." ) - protected PositiveIntType occurrenceCount; - - /** - * The list of specific dates that will have appointments generated. - */ - @Child(name = "occurrenceDate", type = {DateType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Specific dates for a recurring set of appointments (no template)", formalDefinition="The list of specific dates that will have appointments generated." ) - protected List occurrenceDate; - - /** - * Information about weekly recurring appointments. - */ - @Child(name = "weeklyTemplate", type = {}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Information about weekly recurring appointments", formalDefinition="Information about weekly recurring appointments." ) - protected AppointmentRecurrenceTemplateWeeklyTemplateComponent weeklyTemplate; - - /** - * Information about monthly recurring appointments. - */ - @Child(name = "monthlyTemplate", type = {}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Information about monthly recurring appointments", formalDefinition="Information about monthly recurring appointments." ) - protected AppointmentRecurrenceTemplateMonthlyTemplateComponent monthlyTemplate; - - /** - * Information about yearly recurring appointments. - */ - @Child(name = "yearlyTemplate", type = {}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Information about yearly recurring appointments", formalDefinition="Information about yearly recurring appointments." ) - protected AppointmentRecurrenceTemplateYearlyTemplateComponent yearlyTemplate; - - /** - * Any dates, such as holidays, that should be excluded from the recurrence. - */ - @Child(name = "excludingDate", type = {DateType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Any dates that should be excluded from the series", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) - protected List excludingDate; - - /** - * Any dates, such as holidays, that should be excluded from the recurrence. - */ - @Child(name = "excludingRecurrenceId", type = {PositiveIntType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Any recurrence IDs that should be excluded from the recurrence", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) - protected List excludingRecurrenceId; - - private static final long serialVersionUID = -1582999176L; - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateComponent() { - super(); - } - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateComponent(CodeableConcept recurrenceType) { - super(); - this.setRecurrenceType(recurrenceType); - } - - /** - * @return {@link #timezone} (The timezone of the recurring appointment occurrences.) - */ - public CodeableConcept getTimezone() { - if (this.timezone == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.timezone"); - else if (Configuration.doAutoCreate()) - this.timezone = new CodeableConcept(); // cc - return this.timezone; - } - - public boolean hasTimezone() { - return this.timezone != null && !this.timezone.isEmpty(); - } - - /** - * @param value {@link #timezone} (The timezone of the recurring appointment occurrences.) - */ - public AppointmentRecurrenceTemplateComponent setTimezone(CodeableConcept value) { - this.timezone = value; - return this; - } - - /** - * @return {@link #recurrenceType} (How often the appointment series should recur.) - */ - public CodeableConcept getRecurrenceType() { - if (this.recurrenceType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.recurrenceType"); - else if (Configuration.doAutoCreate()) - this.recurrenceType = new CodeableConcept(); // cc - return this.recurrenceType; - } - - public boolean hasRecurrenceType() { - return this.recurrenceType != null && !this.recurrenceType.isEmpty(); - } - - /** - * @param value {@link #recurrenceType} (How often the appointment series should recur.) - */ - public AppointmentRecurrenceTemplateComponent setRecurrenceType(CodeableConcept value) { - this.recurrenceType = value; - return this; - } - - /** - * @return {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value - */ - public DateType getLastOccurrenceDateElement() { - if (this.lastOccurrenceDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.lastOccurrenceDate"); - else if (Configuration.doAutoCreate()) - this.lastOccurrenceDate = new DateType(); // bb - return this.lastOccurrenceDate; - } - - public boolean hasLastOccurrenceDateElement() { - return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); - } - - public boolean hasLastOccurrenceDate() { - return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); - } - - /** - * @param value {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value - */ - public AppointmentRecurrenceTemplateComponent setLastOccurrenceDateElement(DateType value) { - this.lastOccurrenceDate = value; - return this; - } - - /** - * @return Recurring appointments will not occur after this date. - */ - public Date getLastOccurrenceDate() { - return this.lastOccurrenceDate == null ? null : this.lastOccurrenceDate.getValue(); - } - - /** - * @param value Recurring appointments will not occur after this date. - */ - public AppointmentRecurrenceTemplateComponent setLastOccurrenceDate(Date value) { - if (value == null) - this.lastOccurrenceDate = null; - else { - if (this.lastOccurrenceDate == null) - this.lastOccurrenceDate = new DateType(); - this.lastOccurrenceDate.setValue(value); - } - return this; - } - - /** - * @return {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value - */ - public PositiveIntType getOccurrenceCountElement() { - if (this.occurrenceCount == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.occurrenceCount"); - else if (Configuration.doAutoCreate()) - this.occurrenceCount = new PositiveIntType(); // bb - return this.occurrenceCount; - } - - public boolean hasOccurrenceCountElement() { - return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); - } - - public boolean hasOccurrenceCount() { - return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); - } - - /** - * @param value {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value - */ - public AppointmentRecurrenceTemplateComponent setOccurrenceCountElement(PositiveIntType value) { - this.occurrenceCount = value; - return this; - } - - /** - * @return How many appointments are planned in the recurrence. - */ - public int getOccurrenceCount() { - return this.occurrenceCount == null || this.occurrenceCount.isEmpty() ? 0 : this.occurrenceCount.getValue(); - } - - /** - * @param value How many appointments are planned in the recurrence. - */ - public AppointmentRecurrenceTemplateComponent setOccurrenceCount(int value) { - if (this.occurrenceCount == null) - this.occurrenceCount = new PositiveIntType(); - this.occurrenceCount.setValue(value); - return this; - } - - /** - * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) - */ - public List getOccurrenceDate() { - if (this.occurrenceDate == null) - this.occurrenceDate = new ArrayList(); - return this.occurrenceDate; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AppointmentRecurrenceTemplateComponent setOccurrenceDate(List theOccurrenceDate) { - this.occurrenceDate = theOccurrenceDate; - return this; - } - - public boolean hasOccurrenceDate() { - if (this.occurrenceDate == null) - return false; - for (DateType item : this.occurrenceDate) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) - */ - public DateType addOccurrenceDateElement() {//2 - DateType t = new DateType(); - if (this.occurrenceDate == null) - this.occurrenceDate = new ArrayList(); - this.occurrenceDate.add(t); - return t; - } - - /** - * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) - */ - public AppointmentRecurrenceTemplateComponent addOccurrenceDate(Date value) { //1 - DateType t = new DateType(); - t.setValue(value); - if (this.occurrenceDate == null) - this.occurrenceDate = new ArrayList(); - this.occurrenceDate.add(t); - return this; - } - - /** - * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) - */ - public boolean hasOccurrenceDate(Date value) { - if (this.occurrenceDate == null) - return false; - for (DateType v : this.occurrenceDate) - if (v.getValue().equals(value)) // date - return true; - return false; - } - - /** - * @return {@link #weeklyTemplate} (Information about weekly recurring appointments.) - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent getWeeklyTemplate() { - if (this.weeklyTemplate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.weeklyTemplate"); - else if (Configuration.doAutoCreate()) - this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); // cc - return this.weeklyTemplate; - } - - public boolean hasWeeklyTemplate() { - return this.weeklyTemplate != null && !this.weeklyTemplate.isEmpty(); - } - - /** - * @param value {@link #weeklyTemplate} (Information about weekly recurring appointments.) - */ - public AppointmentRecurrenceTemplateComponent setWeeklyTemplate(AppointmentRecurrenceTemplateWeeklyTemplateComponent value) { - this.weeklyTemplate = value; - return this; - } - - /** - * @return {@link #monthlyTemplate} (Information about monthly recurring appointments.) - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent getMonthlyTemplate() { - if (this.monthlyTemplate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.monthlyTemplate"); - else if (Configuration.doAutoCreate()) - this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); // cc - return this.monthlyTemplate; - } - - public boolean hasMonthlyTemplate() { - return this.monthlyTemplate != null && !this.monthlyTemplate.isEmpty(); - } - - /** - * @param value {@link #monthlyTemplate} (Information about monthly recurring appointments.) - */ - public AppointmentRecurrenceTemplateComponent setMonthlyTemplate(AppointmentRecurrenceTemplateMonthlyTemplateComponent value) { - this.monthlyTemplate = value; - return this; - } - - /** - * @return {@link #yearlyTemplate} (Information about yearly recurring appointments.) - */ - public AppointmentRecurrenceTemplateYearlyTemplateComponent getYearlyTemplate() { - if (this.yearlyTemplate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.yearlyTemplate"); - else if (Configuration.doAutoCreate()) - this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); // cc - return this.yearlyTemplate; - } - - public boolean hasYearlyTemplate() { - return this.yearlyTemplate != null && !this.yearlyTemplate.isEmpty(); - } - - /** - * @param value {@link #yearlyTemplate} (Information about yearly recurring appointments.) - */ - public AppointmentRecurrenceTemplateComponent setYearlyTemplate(AppointmentRecurrenceTemplateYearlyTemplateComponent value) { - this.yearlyTemplate = value; - return this; - } - - /** - * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public List getExcludingDate() { - if (this.excludingDate == null) - this.excludingDate = new ArrayList(); - return this.excludingDate; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AppointmentRecurrenceTemplateComponent setExcludingDate(List theExcludingDate) { - this.excludingDate = theExcludingDate; - return this; - } - - public boolean hasExcludingDate() { - if (this.excludingDate == null) - return false; - for (DateType item : this.excludingDate) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public DateType addExcludingDateElement() {//2 - DateType t = new DateType(); - if (this.excludingDate == null) - this.excludingDate = new ArrayList(); - this.excludingDate.add(t); - return t; - } - - /** - * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public AppointmentRecurrenceTemplateComponent addExcludingDate(Date value) { //1 - DateType t = new DateType(); - t.setValue(value); - if (this.excludingDate == null) - this.excludingDate = new ArrayList(); - this.excludingDate.add(t); - return this; - } - - /** - * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public boolean hasExcludingDate(Date value) { - if (this.excludingDate == null) - return false; - for (DateType v : this.excludingDate) - if (v.getValue().equals(value)) // date - return true; - return false; - } - - /** - * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public List getExcludingRecurrenceId() { - if (this.excludingRecurrenceId == null) - this.excludingRecurrenceId = new ArrayList(); - return this.excludingRecurrenceId; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public AppointmentRecurrenceTemplateComponent setExcludingRecurrenceId(List theExcludingRecurrenceId) { - this.excludingRecurrenceId = theExcludingRecurrenceId; - return this; - } - - public boolean hasExcludingRecurrenceId() { - if (this.excludingRecurrenceId == null) - return false; - for (PositiveIntType item : this.excludingRecurrenceId) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public PositiveIntType addExcludingRecurrenceIdElement() {//2 - PositiveIntType t = new PositiveIntType(); - if (this.excludingRecurrenceId == null) - this.excludingRecurrenceId = new ArrayList(); - this.excludingRecurrenceId.add(t); - return t; - } - - /** - * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public AppointmentRecurrenceTemplateComponent addExcludingRecurrenceId(int value) { //1 - PositiveIntType t = new PositiveIntType(); - t.setValue(value); - if (this.excludingRecurrenceId == null) - this.excludingRecurrenceId = new ArrayList(); - this.excludingRecurrenceId.add(t); - return this; - } - - /** - * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) - */ - public boolean hasExcludingRecurrenceId(int value) { - if (this.excludingRecurrenceId == null) - return false; - for (PositiveIntType v : this.excludingRecurrenceId) - if (v.getValue().equals(value)) // positiveInt - return true; - return false; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone)); - children.add(new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType)); - children.add(new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate)); - children.add(new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount)); - children.add(new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate)); - children.add(new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate)); - children.add(new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate)); - children.add(new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate)); - children.add(new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate)); - children.add(new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -2076227591: /*timezone*/ return new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone); - case -381221238: /*recurrenceType*/ return new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType); - case -1262346923: /*lastOccurrenceDate*/ return new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate); - case 1834480062: /*occurrenceCount*/ return new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount); - case 1721761055: /*occurrenceDate*/ return new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate); - case 887136283: /*weeklyTemplate*/ return new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate); - case 2142528423: /*monthlyTemplate*/ return new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate); - case -334069468: /*yearlyTemplate*/ return new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate); - case 596601957: /*excludingDate*/ return new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate); - case -797577694: /*excludingRecurrenceId*/ return new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -2076227591: /*timezone*/ return this.timezone == null ? new Base[0] : new Base[] {this.timezone}; // CodeableConcept - case -381221238: /*recurrenceType*/ return this.recurrenceType == null ? new Base[0] : new Base[] {this.recurrenceType}; // CodeableConcept - case -1262346923: /*lastOccurrenceDate*/ return this.lastOccurrenceDate == null ? new Base[0] : new Base[] {this.lastOccurrenceDate}; // DateType - case 1834480062: /*occurrenceCount*/ return this.occurrenceCount == null ? new Base[0] : new Base[] {this.occurrenceCount}; // PositiveIntType - case 1721761055: /*occurrenceDate*/ return this.occurrenceDate == null ? new Base[0] : this.occurrenceDate.toArray(new Base[this.occurrenceDate.size()]); // DateType - case 887136283: /*weeklyTemplate*/ return this.weeklyTemplate == null ? new Base[0] : new Base[] {this.weeklyTemplate}; // AppointmentRecurrenceTemplateWeeklyTemplateComponent - case 2142528423: /*monthlyTemplate*/ return this.monthlyTemplate == null ? new Base[0] : new Base[] {this.monthlyTemplate}; // AppointmentRecurrenceTemplateMonthlyTemplateComponent - case -334069468: /*yearlyTemplate*/ return this.yearlyTemplate == null ? new Base[0] : new Base[] {this.yearlyTemplate}; // AppointmentRecurrenceTemplateYearlyTemplateComponent - case 596601957: /*excludingDate*/ return this.excludingDate == null ? new Base[0] : this.excludingDate.toArray(new Base[this.excludingDate.size()]); // DateType - case -797577694: /*excludingRecurrenceId*/ return this.excludingRecurrenceId == null ? new Base[0] : this.excludingRecurrenceId.toArray(new Base[this.excludingRecurrenceId.size()]); // PositiveIntType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -2076227591: // timezone - this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -381221238: // recurrenceType - this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1262346923: // lastOccurrenceDate - this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType - return value; - case 1834480062: // occurrenceCount - this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case 1721761055: // occurrenceDate - this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); // DateType - return value; - case 887136283: // weeklyTemplate - this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent - return value; - case 2142528423: // monthlyTemplate - this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent - return value; - case -334069468: // yearlyTemplate - this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent - return value; - case 596601957: // excludingDate - this.getExcludingDate().add(TypeConvertor.castToDate(value)); // DateType - return value; - case -797577694: // excludingRecurrenceId - this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("timezone")) { - this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("recurrenceType")) { - this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("lastOccurrenceDate")) { - this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType - } else if (name.equals("occurrenceCount")) { - this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("occurrenceDate")) { - this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); - } else if (name.equals("weeklyTemplate")) { - this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent - } else if (name.equals("monthlyTemplate")) { - this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent - } else if (name.equals("yearlyTemplate")) { - this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent - } else if (name.equals("excludingDate")) { - this.getExcludingDate().add(TypeConvertor.castToDate(value)); - } else if (name.equals("excludingRecurrenceId")) { - this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("timezone")) { - this.timezone = null; - } else if (name.equals("recurrenceType")) { - this.recurrenceType = null; - } else if (name.equals("lastOccurrenceDate")) { - this.lastOccurrenceDate = null; - } else if (name.equals("occurrenceCount")) { - this.occurrenceCount = null; - } else if (name.equals("occurrenceDate")) { - this.getOccurrenceDate().remove(value); - } else if (name.equals("weeklyTemplate")) { - this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent - } else if (name.equals("monthlyTemplate")) { - this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent - } else if (name.equals("yearlyTemplate")) { - this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent - } else if (name.equals("excludingDate")) { - this.getExcludingDate().remove(value); - } else if (name.equals("excludingRecurrenceId")) { - this.getExcludingRecurrenceId().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -2076227591: return getTimezone(); - case -381221238: return getRecurrenceType(); - case -1262346923: return getLastOccurrenceDateElement(); - case 1834480062: return getOccurrenceCountElement(); - case 1721761055: return addOccurrenceDateElement(); - case 887136283: return getWeeklyTemplate(); - case 2142528423: return getMonthlyTemplate(); - case -334069468: return getYearlyTemplate(); - case 596601957: return addExcludingDateElement(); - case -797577694: return addExcludingRecurrenceIdElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -2076227591: /*timezone*/ return new String[] {"CodeableConcept"}; - case -381221238: /*recurrenceType*/ return new String[] {"CodeableConcept"}; - case -1262346923: /*lastOccurrenceDate*/ return new String[] {"date"}; - case 1834480062: /*occurrenceCount*/ return new String[] {"positiveInt"}; - case 1721761055: /*occurrenceDate*/ return new String[] {"date"}; - case 887136283: /*weeklyTemplate*/ return new String[] {}; - case 2142528423: /*monthlyTemplate*/ return new String[] {}; - case -334069468: /*yearlyTemplate*/ return new String[] {}; - case 596601957: /*excludingDate*/ return new String[] {"date"}; - case -797577694: /*excludingRecurrenceId*/ return new String[] {"positiveInt"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("timezone")) { - this.timezone = new CodeableConcept(); - return this.timezone; - } - else if (name.equals("recurrenceType")) { - this.recurrenceType = new CodeableConcept(); - return this.recurrenceType; - } - else if (name.equals("lastOccurrenceDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.lastOccurrenceDate"); - } - else if (name.equals("occurrenceCount")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.occurrenceCount"); - } - else if (name.equals("occurrenceDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.occurrenceDate"); - } - else if (name.equals("weeklyTemplate")) { - this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); - return this.weeklyTemplate; - } - else if (name.equals("monthlyTemplate")) { - this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); - return this.monthlyTemplate; - } - else if (name.equals("yearlyTemplate")) { - this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); - return this.yearlyTemplate; - } - else if (name.equals("excludingDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.excludingDate"); - } - else if (name.equals("excludingRecurrenceId")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.excludingRecurrenceId"); - } - else - return super.addChild(name); - } - - public AppointmentRecurrenceTemplateComponent copy() { - AppointmentRecurrenceTemplateComponent dst = new AppointmentRecurrenceTemplateComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AppointmentRecurrenceTemplateComponent dst) { - super.copyValues(dst); - dst.timezone = timezone == null ? null : timezone.copy(); - dst.recurrenceType = recurrenceType == null ? null : recurrenceType.copy(); - dst.lastOccurrenceDate = lastOccurrenceDate == null ? null : lastOccurrenceDate.copy(); - dst.occurrenceCount = occurrenceCount == null ? null : occurrenceCount.copy(); - if (occurrenceDate != null) { - dst.occurrenceDate = new ArrayList(); - for (DateType i : occurrenceDate) - dst.occurrenceDate.add(i.copy()); - }; - dst.weeklyTemplate = weeklyTemplate == null ? null : weeklyTemplate.copy(); - dst.monthlyTemplate = monthlyTemplate == null ? null : monthlyTemplate.copy(); - dst.yearlyTemplate = yearlyTemplate == null ? null : yearlyTemplate.copy(); - if (excludingDate != null) { - dst.excludingDate = new ArrayList(); - for (DateType i : excludingDate) - dst.excludingDate.add(i.copy()); - }; - if (excludingRecurrenceId != null) { - dst.excludingRecurrenceId = new ArrayList(); - for (PositiveIntType i : excludingRecurrenceId) - dst.excludingRecurrenceId.add(i.copy()); - }; - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) - return false; - AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; - return compareDeep(timezone, o.timezone, true) && compareDeep(recurrenceType, o.recurrenceType, true) - && compareDeep(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareDeep(occurrenceCount, o.occurrenceCount, true) - && compareDeep(occurrenceDate, o.occurrenceDate, true) && compareDeep(weeklyTemplate, o.weeklyTemplate, true) - && compareDeep(monthlyTemplate, o.monthlyTemplate, true) && compareDeep(yearlyTemplate, o.yearlyTemplate, true) - && compareDeep(excludingDate, o.excludingDate, true) && compareDeep(excludingRecurrenceId, o.excludingRecurrenceId, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) - return false; - AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; - return compareValues(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareValues(occurrenceCount, o.occurrenceCount, true) - && compareValues(occurrenceDate, o.occurrenceDate, true) && compareValues(excludingDate, o.excludingDate, true) - && compareValues(excludingRecurrenceId, o.excludingRecurrenceId, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timezone, recurrenceType, lastOccurrenceDate - , occurrenceCount, occurrenceDate, weeklyTemplate, monthlyTemplate, yearlyTemplate - , excludingDate, excludingRecurrenceId); - } - - public String fhirType() { - return "Appointment.recurrenceTemplate"; - - } - - } - - @Block() - public static class AppointmentRecurrenceTemplateWeeklyTemplateComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Indicates that recurring appointments should occur on Mondays. - */ - @Child(name = "monday", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Mondays", formalDefinition="Indicates that recurring appointments should occur on Mondays." ) - protected BooleanType monday; - - /** - * Indicates that recurring appointments should occur on Tuesdays. - */ - @Child(name = "tuesday", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Tuesday", formalDefinition="Indicates that recurring appointments should occur on Tuesdays." ) - protected BooleanType tuesday; - - /** - * Indicates that recurring appointments should occur on Wednesdays. - */ - @Child(name = "wednesday", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Wednesday", formalDefinition="Indicates that recurring appointments should occur on Wednesdays." ) - protected BooleanType wednesday; - - /** - * Indicates that recurring appointments should occur on Thursdays. - */ - @Child(name = "thursday", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Thursday", formalDefinition="Indicates that recurring appointments should occur on Thursdays." ) - protected BooleanType thursday; - - /** - * Indicates that recurring appointments should occur on Fridays. - */ - @Child(name = "friday", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Friday", formalDefinition="Indicates that recurring appointments should occur on Fridays." ) - protected BooleanType friday; - - /** - * Indicates that recurring appointments should occur on Saturdays. - */ - @Child(name = "saturday", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Saturday", formalDefinition="Indicates that recurring appointments should occur on Saturdays." ) - protected BooleanType saturday; - - /** - * Indicates that recurring appointments should occur on Sundays. - */ - @Child(name = "sunday", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on Sunday", formalDefinition="Indicates that recurring appointments should occur on Sundays." ) - protected BooleanType sunday; - - /** - * The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. - */ - @Child(name = "weekInterval", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs every nth week", formalDefinition="The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3." ) - protected PositiveIntType weekInterval; - - private static final long serialVersionUID = 588795188L; - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent() { - super(); - } - - /** - * @return {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value - */ - public BooleanType getMondayElement() { - if (this.monday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.monday"); - else if (Configuration.doAutoCreate()) - this.monday = new BooleanType(); // bb - return this.monday; - } - - public boolean hasMondayElement() { - return this.monday != null && !this.monday.isEmpty(); - } - - public boolean hasMonday() { - return this.monday != null && !this.monday.isEmpty(); - } - - /** - * @param value {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMondayElement(BooleanType value) { - this.monday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Mondays. - */ - public boolean getMonday() { - return this.monday == null || this.monday.isEmpty() ? false : this.monday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Mondays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMonday(boolean value) { - if (this.monday == null) - this.monday = new BooleanType(); - this.monday.setValue(value); - return this; - } - - /** - * @return {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value - */ - public BooleanType getTuesdayElement() { - if (this.tuesday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.tuesday"); - else if (Configuration.doAutoCreate()) - this.tuesday = new BooleanType(); // bb - return this.tuesday; - } - - public boolean hasTuesdayElement() { - return this.tuesday != null && !this.tuesday.isEmpty(); - } - - public boolean hasTuesday() { - return this.tuesday != null && !this.tuesday.isEmpty(); - } - - /** - * @param value {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesdayElement(BooleanType value) { - this.tuesday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Tuesdays. - */ - public boolean getTuesday() { - return this.tuesday == null || this.tuesday.isEmpty() ? false : this.tuesday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Tuesdays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesday(boolean value) { - if (this.tuesday == null) - this.tuesday = new BooleanType(); - this.tuesday.setValue(value); - return this; - } - - /** - * @return {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value - */ - public BooleanType getWednesdayElement() { - if (this.wednesday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.wednesday"); - else if (Configuration.doAutoCreate()) - this.wednesday = new BooleanType(); // bb - return this.wednesday; - } - - public boolean hasWednesdayElement() { - return this.wednesday != null && !this.wednesday.isEmpty(); - } - - public boolean hasWednesday() { - return this.wednesday != null && !this.wednesday.isEmpty(); - } - - /** - * @param value {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesdayElement(BooleanType value) { - this.wednesday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Wednesdays. - */ - public boolean getWednesday() { - return this.wednesday == null || this.wednesday.isEmpty() ? false : this.wednesday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Wednesdays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesday(boolean value) { - if (this.wednesday == null) - this.wednesday = new BooleanType(); - this.wednesday.setValue(value); - return this; - } - - /** - * @return {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value - */ - public BooleanType getThursdayElement() { - if (this.thursday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.thursday"); - else if (Configuration.doAutoCreate()) - this.thursday = new BooleanType(); // bb - return this.thursday; - } - - public boolean hasThursdayElement() { - return this.thursday != null && !this.thursday.isEmpty(); - } - - public boolean hasThursday() { - return this.thursday != null && !this.thursday.isEmpty(); - } - - /** - * @param value {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursdayElement(BooleanType value) { - this.thursday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Thursdays. - */ - public boolean getThursday() { - return this.thursday == null || this.thursday.isEmpty() ? false : this.thursday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Thursdays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursday(boolean value) { - if (this.thursday == null) - this.thursday = new BooleanType(); - this.thursday.setValue(value); - return this; - } - - /** - * @return {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value - */ - public BooleanType getFridayElement() { - if (this.friday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.friday"); - else if (Configuration.doAutoCreate()) - this.friday = new BooleanType(); // bb - return this.friday; - } - - public boolean hasFridayElement() { - return this.friday != null && !this.friday.isEmpty(); - } - - public boolean hasFriday() { - return this.friday != null && !this.friday.isEmpty(); - } - - /** - * @param value {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFridayElement(BooleanType value) { - this.friday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Fridays. - */ - public boolean getFriday() { - return this.friday == null || this.friday.isEmpty() ? false : this.friday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Fridays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFriday(boolean value) { - if (this.friday == null) - this.friday = new BooleanType(); - this.friday.setValue(value); - return this; - } - - /** - * @return {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value - */ - public BooleanType getSaturdayElement() { - if (this.saturday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.saturday"); - else if (Configuration.doAutoCreate()) - this.saturday = new BooleanType(); // bb - return this.saturday; - } - - public boolean hasSaturdayElement() { - return this.saturday != null && !this.saturday.isEmpty(); - } - - public boolean hasSaturday() { - return this.saturday != null && !this.saturday.isEmpty(); - } - - /** - * @param value {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturdayElement(BooleanType value) { - this.saturday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Saturdays. - */ - public boolean getSaturday() { - return this.saturday == null || this.saturday.isEmpty() ? false : this.saturday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Saturdays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturday(boolean value) { - if (this.saturday == null) - this.saturday = new BooleanType(); - this.saturday.setValue(value); - return this; - } - - /** - * @return {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value - */ - public BooleanType getSundayElement() { - if (this.sunday == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.sunday"); - else if (Configuration.doAutoCreate()) - this.sunday = new BooleanType(); // bb - return this.sunday; - } - - public boolean hasSundayElement() { - return this.sunday != null && !this.sunday.isEmpty(); - } - - public boolean hasSunday() { - return this.sunday != null && !this.sunday.isEmpty(); - } - - /** - * @param value {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSundayElement(BooleanType value) { - this.sunday = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur on Sundays. - */ - public boolean getSunday() { - return this.sunday == null || this.sunday.isEmpty() ? false : this.sunday.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur on Sundays. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSunday(boolean value) { - if (this.sunday == null) - this.sunday = new BooleanType(); - this.sunday.setValue(value); - return this; - } - - /** - * @return {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value - */ - public PositiveIntType getWeekIntervalElement() { - if (this.weekInterval == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.weekInterval"); - else if (Configuration.doAutoCreate()) - this.weekInterval = new PositiveIntType(); // bb - return this.weekInterval; - } - - public boolean hasWeekIntervalElement() { - return this.weekInterval != null && !this.weekInterval.isEmpty(); - } - - public boolean hasWeekInterval() { - return this.weekInterval != null && !this.weekInterval.isEmpty(); - } - - /** - * @param value {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekIntervalElement(PositiveIntType value) { - this.weekInterval = value; - return this; - } - - /** - * @return The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. - */ - public int getWeekInterval() { - return this.weekInterval == null || this.weekInterval.isEmpty() ? 0 : this.weekInterval.getValue(); - } - - /** - * @param value The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. - */ - public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekInterval(int value) { - if (this.weekInterval == null) - this.weekInterval = new PositiveIntType(); - this.weekInterval.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday)); - children.add(new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday)); - children.add(new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday)); - children.add(new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday)); - children.add(new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday)); - children.add(new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday)); - children.add(new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday)); - children.add(new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1068502768: /*monday*/ return new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday); - case -977343923: /*tuesday*/ return new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday); - case 1393530710: /*wednesday*/ return new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday); - case 1572055514: /*thursday*/ return new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday); - case -1266285217: /*friday*/ return new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday); - case -2114201671: /*saturday*/ return new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday); - case -891186736: /*sunday*/ return new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday); - case -784550695: /*weekInterval*/ return new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1068502768: /*monday*/ return this.monday == null ? new Base[0] : new Base[] {this.monday}; // BooleanType - case -977343923: /*tuesday*/ return this.tuesday == null ? new Base[0] : new Base[] {this.tuesday}; // BooleanType - case 1393530710: /*wednesday*/ return this.wednesday == null ? new Base[0] : new Base[] {this.wednesday}; // BooleanType - case 1572055514: /*thursday*/ return this.thursday == null ? new Base[0] : new Base[] {this.thursday}; // BooleanType - case -1266285217: /*friday*/ return this.friday == null ? new Base[0] : new Base[] {this.friday}; // BooleanType - case -2114201671: /*saturday*/ return this.saturday == null ? new Base[0] : new Base[] {this.saturday}; // BooleanType - case -891186736: /*sunday*/ return this.sunday == null ? new Base[0] : new Base[] {this.sunday}; // BooleanType - case -784550695: /*weekInterval*/ return this.weekInterval == null ? new Base[0] : new Base[] {this.weekInterval}; // PositiveIntType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1068502768: // monday - this.monday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -977343923: // tuesday - this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case 1393530710: // wednesday - this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case 1572055514: // thursday - this.thursday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -1266285217: // friday - this.friday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -2114201671: // saturday - this.saturday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -891186736: // sunday - this.sunday = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case -784550695: // weekInterval - this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("monday")) { - this.monday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("tuesday")) { - this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("wednesday")) { - this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("thursday")) { - this.thursday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("friday")) { - this.friday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("saturday")) { - this.saturday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("sunday")) { - this.sunday = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("weekInterval")) { - this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("monday")) { - this.monday = null; - } else if (name.equals("tuesday")) { - this.tuesday = null; - } else if (name.equals("wednesday")) { - this.wednesday = null; - } else if (name.equals("thursday")) { - this.thursday = null; - } else if (name.equals("friday")) { - this.friday = null; - } else if (name.equals("saturday")) { - this.saturday = null; - } else if (name.equals("sunday")) { - this.sunday = null; - } else if (name.equals("weekInterval")) { - this.weekInterval = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1068502768: return getMondayElement(); - case -977343923: return getTuesdayElement(); - case 1393530710: return getWednesdayElement(); - case 1572055514: return getThursdayElement(); - case -1266285217: return getFridayElement(); - case -2114201671: return getSaturdayElement(); - case -891186736: return getSundayElement(); - case -784550695: return getWeekIntervalElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1068502768: /*monday*/ return new String[] {"boolean"}; - case -977343923: /*tuesday*/ return new String[] {"boolean"}; - case 1393530710: /*wednesday*/ return new String[] {"boolean"}; - case 1572055514: /*thursday*/ return new String[] {"boolean"}; - case -1266285217: /*friday*/ return new String[] {"boolean"}; - case -2114201671: /*saturday*/ return new String[] {"boolean"}; - case -891186736: /*sunday*/ return new String[] {"boolean"}; - case -784550695: /*weekInterval*/ return new String[] {"positiveInt"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("monday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.monday"); - } - else if (name.equals("tuesday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.tuesday"); - } - else if (name.equals("wednesday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.wednesday"); - } - else if (name.equals("thursday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.thursday"); - } - else if (name.equals("friday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.friday"); - } - else if (name.equals("saturday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.saturday"); - } - else if (name.equals("sunday")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.sunday"); - } - else if (name.equals("weekInterval")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.weekInterval"); - } - else - return super.addChild(name); - } - - public AppointmentRecurrenceTemplateWeeklyTemplateComponent copy() { - AppointmentRecurrenceTemplateWeeklyTemplateComponent dst = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AppointmentRecurrenceTemplateWeeklyTemplateComponent dst) { - super.copyValues(dst); - dst.monday = monday == null ? null : monday.copy(); - dst.tuesday = tuesday == null ? null : tuesday.copy(); - dst.wednesday = wednesday == null ? null : wednesday.copy(); - dst.thursday = thursday == null ? null : thursday.copy(); - dst.friday = friday == null ? null : friday.copy(); - dst.saturday = saturday == null ? null : saturday.copy(); - dst.sunday = sunday == null ? null : sunday.copy(); - dst.weekInterval = weekInterval == null ? null : weekInterval.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; - return compareDeep(monday, o.monday, true) && compareDeep(tuesday, o.tuesday, true) && compareDeep(wednesday, o.wednesday, true) - && compareDeep(thursday, o.thursday, true) && compareDeep(friday, o.friday, true) && compareDeep(saturday, o.saturday, true) - && compareDeep(sunday, o.sunday, true) && compareDeep(weekInterval, o.weekInterval, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; - return compareValues(monday, o.monday, true) && compareValues(tuesday, o.tuesday, true) && compareValues(wednesday, o.wednesday, true) - && compareValues(thursday, o.thursday, true) && compareValues(friday, o.friday, true) && compareValues(saturday, o.saturday, true) - && compareValues(sunday, o.sunday, true) && compareValues(weekInterval, o.weekInterval, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(monday, tuesday, wednesday - , thursday, friday, saturday, sunday, weekInterval); - } - - public String fhirType() { - return "Appointment.recurrenceTemplate.weeklyTemplate"; - - } - - } - - @Block() - public static class AppointmentRecurrenceTemplateMonthlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. - */ - @Child(name = "dayOfMonth", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs on a specific day of the month", formalDefinition="Indicates that appointments in the series of recurring appointments should occur on a specific day of the month." ) - protected PositiveIntType dayOfMonth; - - /** - * Indicates which week within a month the appointments in the series of recurring appointments should occur on. - */ - @Child(name = "nthWeekOfMonth", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Indicates which week of the month the appointment should occur", formalDefinition="Indicates which week within a month the appointments in the series of recurring appointments should occur on." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/week-of-month") - protected Coding nthWeekOfMonth; - - /** - * Indicates which day of the week the recurring appointments should occur each nth week. - */ - @Child(name = "dayOfWeek", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Indicates which day of the week the appointment should occur", formalDefinition="Indicates which day of the week the recurring appointments should occur each nth week." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week") - protected Coding dayOfWeek; - - /** - * Indicates that recurring appointments should occur every nth month. - */ - @Child(name = "monthInterval", type = {PositiveIntType.class}, order=4, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs every nth month", formalDefinition="Indicates that recurring appointments should occur every nth month." ) - protected PositiveIntType monthInterval; - - private static final long serialVersionUID = -1234046272L; - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent() { - super(); - } - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent(int monthInterval) { - super(); - this.setMonthInterval(monthInterval); - } - - /** - * @return {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value - */ - public PositiveIntType getDayOfMonthElement() { - if (this.dayOfMonth == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfMonth"); - else if (Configuration.doAutoCreate()) - this.dayOfMonth = new PositiveIntType(); // bb - return this.dayOfMonth; - } - - public boolean hasDayOfMonthElement() { - return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); - } - - public boolean hasDayOfMonth() { - return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); - } - - /** - * @param value {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonthElement(PositiveIntType value) { - this.dayOfMonth = value; - return this; - } - - /** - * @return Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. - */ - public int getDayOfMonth() { - return this.dayOfMonth == null || this.dayOfMonth.isEmpty() ? 0 : this.dayOfMonth.getValue(); - } - - /** - * @param value Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonth(int value) { - if (this.dayOfMonth == null) - this.dayOfMonth = new PositiveIntType(); - this.dayOfMonth.setValue(value); - return this; - } - - /** - * @return {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) - */ - public Coding getNthWeekOfMonth() { - if (this.nthWeekOfMonth == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.nthWeekOfMonth"); - else if (Configuration.doAutoCreate()) - this.nthWeekOfMonth = new Coding(); // cc - return this.nthWeekOfMonth; - } - - public boolean hasNthWeekOfMonth() { - return this.nthWeekOfMonth != null && !this.nthWeekOfMonth.isEmpty(); - } - - /** - * @param value {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setNthWeekOfMonth(Coding value) { - this.nthWeekOfMonth = value; - return this; - } - - /** - * @return {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) - */ - public Coding getDayOfWeek() { - if (this.dayOfWeek == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfWeek"); - else if (Configuration.doAutoCreate()) - this.dayOfWeek = new Coding(); // cc - return this.dayOfWeek; - } - - public boolean hasDayOfWeek() { - return this.dayOfWeek != null && !this.dayOfWeek.isEmpty(); - } - - /** - * @param value {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfWeek(Coding value) { - this.dayOfWeek = value; - return this; - } - - /** - * @return {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value - */ - public PositiveIntType getMonthIntervalElement() { - if (this.monthInterval == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.monthInterval"); - else if (Configuration.doAutoCreate()) - this.monthInterval = new PositiveIntType(); // bb - return this.monthInterval; - } - - public boolean hasMonthIntervalElement() { - return this.monthInterval != null && !this.monthInterval.isEmpty(); - } - - public boolean hasMonthInterval() { - return this.monthInterval != null && !this.monthInterval.isEmpty(); - } - - /** - * @param value {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthIntervalElement(PositiveIntType value) { - this.monthInterval = value; - return this; - } - - /** - * @return Indicates that recurring appointments should occur every nth month. - */ - public int getMonthInterval() { - return this.monthInterval == null || this.monthInterval.isEmpty() ? 0 : this.monthInterval.getValue(); - } - - /** - * @param value Indicates that recurring appointments should occur every nth month. - */ - public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthInterval(int value) { - if (this.monthInterval == null) - this.monthInterval = new PositiveIntType(); - this.monthInterval.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth)); - children.add(new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth)); - children.add(new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek)); - children.add(new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1181204563: /*dayOfMonth*/ return new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth); - case 724728723: /*nthWeekOfMonth*/ return new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth); - case -730552025: /*dayOfWeek*/ return new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek); - case -251401371: /*monthInterval*/ return new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1181204563: /*dayOfMonth*/ return this.dayOfMonth == null ? new Base[0] : new Base[] {this.dayOfMonth}; // PositiveIntType - case 724728723: /*nthWeekOfMonth*/ return this.nthWeekOfMonth == null ? new Base[0] : new Base[] {this.nthWeekOfMonth}; // Coding - case -730552025: /*dayOfWeek*/ return this.dayOfWeek == null ? new Base[0] : new Base[] {this.dayOfWeek}; // Coding - case -251401371: /*monthInterval*/ return this.monthInterval == null ? new Base[0] : new Base[] {this.monthInterval}; // PositiveIntType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1181204563: // dayOfMonth - this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case 724728723: // nthWeekOfMonth - this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding - return value; - case -730552025: // dayOfWeek - this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding - return value; - case -251401371: // monthInterval - this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("dayOfMonth")) { - this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("nthWeekOfMonth")) { - this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding - } else if (name.equals("dayOfWeek")) { - this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding - } else if (name.equals("monthInterval")) { - this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("dayOfMonth")) { - this.dayOfMonth = null; - } else if (name.equals("nthWeekOfMonth")) { - this.nthWeekOfMonth = null; - } else if (name.equals("dayOfWeek")) { - this.dayOfWeek = null; - } else if (name.equals("monthInterval")) { - this.monthInterval = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1181204563: return getDayOfMonthElement(); - case 724728723: return getNthWeekOfMonth(); - case -730552025: return getDayOfWeek(); - case -251401371: return getMonthIntervalElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1181204563: /*dayOfMonth*/ return new String[] {"positiveInt"}; - case 724728723: /*nthWeekOfMonth*/ return new String[] {"Coding"}; - case -730552025: /*dayOfWeek*/ return new String[] {"Coding"}; - case -251401371: /*monthInterval*/ return new String[] {"positiveInt"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("dayOfMonth")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.monthlyTemplate.dayOfMonth"); - } - else if (name.equals("nthWeekOfMonth")) { - this.nthWeekOfMonth = new Coding(); - return this.nthWeekOfMonth; - } - else if (name.equals("dayOfWeek")) { - this.dayOfWeek = new Coding(); - return this.dayOfWeek; - } - else if (name.equals("monthInterval")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.monthlyTemplate.monthInterval"); - } - else - return super.addChild(name); - } - - public AppointmentRecurrenceTemplateMonthlyTemplateComponent copy() { - AppointmentRecurrenceTemplateMonthlyTemplateComponent dst = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AppointmentRecurrenceTemplateMonthlyTemplateComponent dst) { - super.copyValues(dst); - dst.dayOfMonth = dayOfMonth == null ? null : dayOfMonth.copy(); - dst.nthWeekOfMonth = nthWeekOfMonth == null ? null : nthWeekOfMonth.copy(); - dst.dayOfWeek = dayOfWeek == null ? null : dayOfWeek.copy(); - dst.monthInterval = monthInterval == null ? null : monthInterval.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; - return compareDeep(dayOfMonth, o.dayOfMonth, true) && compareDeep(nthWeekOfMonth, o.nthWeekOfMonth, true) - && compareDeep(dayOfWeek, o.dayOfWeek, true) && compareDeep(monthInterval, o.monthInterval, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; - return compareValues(dayOfMonth, o.dayOfMonth, true) && compareValues(monthInterval, o.monthInterval, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(dayOfMonth, nthWeekOfMonth - , dayOfWeek, monthInterval); - } - - public String fhirType() { - return "Appointment.recurrenceTemplate.monthlyTemplate"; - - } - - } - - @Block() - public static class AppointmentRecurrenceTemplateYearlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Appointment recurs every nth year. - */ - @Child(name = "yearInterval", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Recurs every nth year", formalDefinition="Appointment recurs every nth year." ) - protected PositiveIntType yearInterval; - - private static final long serialVersionUID = -120794476L; - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateYearlyTemplateComponent() { - super(); - } - - /** - * Constructor - */ - public AppointmentRecurrenceTemplateYearlyTemplateComponent(int yearInterval) { - super(); - this.setYearInterval(yearInterval); - } - - /** - * @return {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value - */ - public PositiveIntType getYearIntervalElement() { - if (this.yearInterval == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateYearlyTemplateComponent.yearInterval"); - else if (Configuration.doAutoCreate()) - this.yearInterval = new PositiveIntType(); // bb - return this.yearInterval; - } - - public boolean hasYearIntervalElement() { - return this.yearInterval != null && !this.yearInterval.isEmpty(); - } - - public boolean hasYearInterval() { - return this.yearInterval != null && !this.yearInterval.isEmpty(); - } - - /** - * @param value {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value - */ - public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearIntervalElement(PositiveIntType value) { - this.yearInterval = value; - return this; - } - - /** - * @return Appointment recurs every nth year. - */ - public int getYearInterval() { - return this.yearInterval == null || this.yearInterval.isEmpty() ? 0 : this.yearInterval.getValue(); - } - - /** - * @param value Appointment recurs every nth year. - */ - public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearInterval(int value) { - if (this.yearInterval == null) - this.yearInterval = new PositiveIntType(); - this.yearInterval.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 492389410: /*yearInterval*/ return new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 492389410: /*yearInterval*/ return this.yearInterval == null ? new Base[0] : new Base[] {this.yearInterval}; // PositiveIntType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 492389410: // yearInterval - this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("yearInterval")) { - this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("yearInterval")) { - this.yearInterval = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 492389410: return getYearIntervalElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 492389410: /*yearInterval*/ return new String[] {"positiveInt"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("yearInterval")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.yearlyTemplate.yearInterval"); - } - else - return super.addChild(name); - } - - public AppointmentRecurrenceTemplateYearlyTemplateComponent copy() { - AppointmentRecurrenceTemplateYearlyTemplateComponent dst = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(AppointmentRecurrenceTemplateYearlyTemplateComponent dst) { - super.copyValues(dst); - dst.yearInterval = yearInterval == null ? null : yearInterval.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; - return compareDeep(yearInterval, o.yearInterval, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) - return false; - AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; - return compareValues(yearInterval, o.yearInterval, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(yearInterval); - } - - public String fhirType() { - return "Appointment.recurrenceTemplate.yearlyTemplate"; - - } - - } - - /** - * 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). - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="External Ids for this item", formalDefinition="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)." ) - protected List identifier; - - /** - * 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. - */ - @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist", formalDefinition="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." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointmentstatus") - protected Enumeration status; - - /** - * The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply. - */ - @Child(name = "cancellationReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The coded reason for the appointment being cancelled", formalDefinition="The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-cancellation-reason") - protected CodeableConcept cancellationReason; - - /** - * Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations. - */ - @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Classification when becoming an encounter", formalDefinition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/EncounterClass") - protected List class_; - - /** - * A broad categorization of the service that is to be performed during this appointment. - */ - @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="A broad categorization of the service that is to be performed during this appointment", formalDefinition="A broad categorization of the service that is to be performed during this appointment." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category") - protected List serviceCategory; - - /** - * The specific service that is to be performed during this appointment. - */ - @Child(name = "serviceType", type = {CodeableReference.class}, order=5, 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." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-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=6, 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." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes") - 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=7, 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)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0276") - protected CodeableConcept appointmentType; - - /** - * The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure. - */ - @Child(name = "reason", type = {CodeableReference.class}, order=8, min=0, max=Child.MAX_UNLIMITED, 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. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason") - protected List 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 = {CodeableConcept.class}, order=9, 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)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActPriority") - protected CodeableConcept 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 note field. - */ - @Child(name = "description", type = {StringType.class}, order=10, 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 note field." ) - protected StringType description; - - /** - * Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource). - */ - @Child(name = "replaces", type = {Appointment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Appointment replaced by this Appointment", formalDefinition="Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource)." ) - protected List replaces; - - /** - * Connection details of a virtual service (e.g. conference call). - */ - @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. conference call)." ) - protected List virtualService; - - /** - * Additional information to support the appointment provided when making the appointment. - */ - @Child(name = "supportingInformation", type = {Reference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Additional information to support the appointment", formalDefinition="Additional information to support the appointment provided when making the appointment." ) - protected List supportingInformation; - - /** - * The previous appointment in a series of related appointments. - */ - @Child(name = "previousAppointment", type = {Appointment.class}, order=14, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The previous appointment in a series", formalDefinition="The previous appointment in a series of related appointments." ) - protected Reference previousAppointment; - - /** - * The originating appointment in a recurring set of related appointments. - */ - @Child(name = "originatingAppointment", type = {Appointment.class}, order=15, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The originating appointment in a recurring set of appointments", formalDefinition="The originating appointment in a recurring set of related appointments." ) - protected Reference originatingAppointment; - - /** - * Date/Time that the appointment is to take place. - */ - @Child(name = "start", type = {InstantType.class}, order=16, 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=17, 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. - */ - @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=18, 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end." ) - protected PositiveIntType minutesDuration; - - /** +package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; + +/** + * 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). + */ +@ResourceDef(name="Appointment", profile="http://hl7.org/fhir/StructureDefinition/Appointment") +public class Appointment extends DomainResource { + + public enum AppointmentStatus { + /** + * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet. + */ + PROPOSED, + /** + * Some or all of the participant(s) have not finalized their acceptance of the appointment request. + */ + PENDING, + /** + * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. + */ + BOOKED, + /** + * The patient/patients has/have arrived and is/are waiting to be seen. + */ + ARRIVED, + /** + * The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons. + */ + FULFILLED, + /** + * The appointment has been cancelled. + */ + CANCELLED, + /** + * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). + */ + NOSHOW, + /** + * This instance should not have been part of this patient's medical record. + */ + ENTEREDINERROR, + /** + * When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present). + */ + CHECKEDIN, + /** + * The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated. + */ + WAITLIST, + /** + * added to help the parsers with the generic types + */ + NULL; + public static AppointmentStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return PROPOSED; + if ("pending".equals(codeString)) + return PENDING; + if ("booked".equals(codeString)) + return BOOKED; + if ("arrived".equals(codeString)) + return ARRIVED; + if ("fulfilled".equals(codeString)) + return FULFILLED; + if ("cancelled".equals(codeString)) + return CANCELLED; + if ("noshow".equals(codeString)) + return NOSHOW; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("checked-in".equals(codeString)) + return CHECKEDIN; + if ("waitlist".equals(codeString)) + return WAITLIST; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSED: return "proposed"; + case PENDING: return "pending"; + case BOOKED: return "booked"; + case ARRIVED: return "arrived"; + case FULFILLED: return "fulfilled"; + case CANCELLED: return "cancelled"; + case NOSHOW: return "noshow"; + case ENTEREDINERROR: return "entered-in-error"; + case CHECKEDIN: return "checked-in"; + case WAITLIST: return "waitlist"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSED: return "http://hl7.org/fhir/appointmentstatus"; + case PENDING: return "http://hl7.org/fhir/appointmentstatus"; + case BOOKED: return "http://hl7.org/fhir/appointmentstatus"; + case ARRIVED: return "http://hl7.org/fhir/appointmentstatus"; + case FULFILLED: return "http://hl7.org/fhir/appointmentstatus"; + case CANCELLED: return "http://hl7.org/fhir/appointmentstatus"; + case NOSHOW: return "http://hl7.org/fhir/appointmentstatus"; + case ENTEREDINERROR: return "http://hl7.org/fhir/appointmentstatus"; + case CHECKEDIN: return "http://hl7.org/fhir/appointmentstatus"; + case WAITLIST: return "http://hl7.org/fhir/appointmentstatus"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet."; + case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; + case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; + case ARRIVED: return "The patient/patients has/have arrived and is/are waiting to be seen."; + case FULFILLED: return "The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons."; + case CANCELLED: return "The appointment has been cancelled."; + case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; + case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; + case CHECKEDIN: return "When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present)."; + case WAITLIST: return "The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSED: return "Proposed"; + case PENDING: return "Pending"; + case BOOKED: return "Booked"; + case ARRIVED: return "Arrived"; + case FULFILLED: return "Fulfilled"; + case CANCELLED: return "Cancelled"; + case NOSHOW: return "No Show"; + case ENTEREDINERROR: return "Entered in error"; + case CHECKEDIN: return "Checked In"; + case WAITLIST: return "Waitlisted"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class AppointmentStatusEnumFactory implements EnumFactory { + public AppointmentStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposed".equals(codeString)) + return AppointmentStatus.PROPOSED; + if ("pending".equals(codeString)) + return AppointmentStatus.PENDING; + if ("booked".equals(codeString)) + return AppointmentStatus.BOOKED; + if ("arrived".equals(codeString)) + return AppointmentStatus.ARRIVED; + if ("fulfilled".equals(codeString)) + return AppointmentStatus.FULFILLED; + if ("cancelled".equals(codeString)) + return AppointmentStatus.CANCELLED; + if ("noshow".equals(codeString)) + return AppointmentStatus.NOSHOW; + if ("entered-in-error".equals(codeString)) + return AppointmentStatus.ENTEREDINERROR; + if ("checked-in".equals(codeString)) + return AppointmentStatus.CHECKEDIN; + if ("waitlist".equals(codeString)) + return AppointmentStatus.WAITLIST; + throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, AppointmentStatus.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, AppointmentStatus.NULL, code); + if ("proposed".equals(codeString)) + return new Enumeration(this, AppointmentStatus.PROPOSED, code); + if ("pending".equals(codeString)) + return new Enumeration(this, AppointmentStatus.PENDING, code); + if ("booked".equals(codeString)) + return new Enumeration(this, AppointmentStatus.BOOKED, code); + if ("arrived".equals(codeString)) + return new Enumeration(this, AppointmentStatus.ARRIVED, code); + if ("fulfilled".equals(codeString)) + return new Enumeration(this, AppointmentStatus.FULFILLED, code); + if ("cancelled".equals(codeString)) + return new Enumeration(this, AppointmentStatus.CANCELLED, code); + if ("noshow".equals(codeString)) + return new Enumeration(this, AppointmentStatus.NOSHOW, code); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, AppointmentStatus.ENTEREDINERROR, code); + if ("checked-in".equals(codeString)) + return new Enumeration(this, AppointmentStatus.CHECKEDIN, code); + if ("waitlist".equals(codeString)) + return new Enumeration(this, AppointmentStatus.WAITLIST, code); + throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); + } + public String toCode(AppointmentStatus code) { + if (code == AppointmentStatus.NULL) + return null; + if (code == AppointmentStatus.PROPOSED) + return "proposed"; + if (code == AppointmentStatus.PENDING) + return "pending"; + if (code == AppointmentStatus.BOOKED) + return "booked"; + if (code == AppointmentStatus.ARRIVED) + return "arrived"; + if (code == AppointmentStatus.FULFILLED) + return "fulfilled"; + if (code == AppointmentStatus.CANCELLED) + return "cancelled"; + if (code == AppointmentStatus.NOSHOW) + return "noshow"; + if (code == AppointmentStatus.ENTEREDINERROR) + return "entered-in-error"; + if (code == AppointmentStatus.CHECKEDIN) + return "checked-in"; + if (code == AppointmentStatus.WAITLIST) + return "waitlist"; + return "?"; + } + public String toSystem(AppointmentStatus code) { + return code.getSystem(); + } + } + + public enum ParticipationStatus { + /** + * The participant has accepted the appointment. + */ + ACCEPTED, + /** + * The participant has declined the appointment and will not participate in the appointment. + */ + DECLINED, + /** + * The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur. + */ + TENTATIVE, + /** + * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses. + */ + NEEDSACTION, + /** + * added to help the parsers with the generic types + */ + NULL; + public static ParticipationStatus 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 ("needs-action".equals(codeString)) + return NEEDSACTION; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACCEPTED: return "accepted"; + case DECLINED: return "declined"; + case TENTATIVE: return "tentative"; + case NEEDSACTION: return "needs-action"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACCEPTED: return "http://hl7.org/fhir/participationstatus"; + case DECLINED: return "http://hl7.org/fhir/participationstatus"; + case TENTATIVE: return "http://hl7.org/fhir/participationstatus"; + case NEEDSACTION: return "http://hl7.org/fhir/participationstatus"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACCEPTED: return "The participant has accepted the appointment."; + case DECLINED: return "The participant has declined the appointment and will not participate in the appointment."; + case TENTATIVE: return "The participant has tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur."; + case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACCEPTED: return "Accepted"; + case DECLINED: return "Declined"; + case TENTATIVE: return "Tentative"; + case NEEDSACTION: return "Needs Action"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class ParticipationStatusEnumFactory implements EnumFactory { + public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("accepted".equals(codeString)) + return ParticipationStatus.ACCEPTED; + if ("declined".equals(codeString)) + return ParticipationStatus.DECLINED; + if ("tentative".equals(codeString)) + return ParticipationStatus.TENTATIVE; + if ("needs-action".equals(codeString)) + return ParticipationStatus.NEEDSACTION; + throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, ParticipationStatus.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, ParticipationStatus.NULL, code); + if ("accepted".equals(codeString)) + return new Enumeration(this, ParticipationStatus.ACCEPTED, code); + if ("declined".equals(codeString)) + return new Enumeration(this, ParticipationStatus.DECLINED, code); + if ("tentative".equals(codeString)) + return new Enumeration(this, ParticipationStatus.TENTATIVE, code); + if ("needs-action".equals(codeString)) + return new Enumeration(this, ParticipationStatus.NEEDSACTION, code); + throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'"); + } + public String toCode(ParticipationStatus code) { + if (code == ParticipationStatus.NULL) + return null; + if (code == ParticipationStatus.ACCEPTED) + return "accepted"; + if (code == ParticipationStatus.DECLINED) + return "declined"; + if (code == ParticipationStatus.TENTATIVE) + return "tentative"; + if (code == ParticipationStatus.NEEDSACTION) + return "needs-action"; + return "?"; + } + public String toSystem(ParticipationStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class AppointmentParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of participant in the appointment. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-participant-type") + protected List type; + + /** + * Participation period of the actor. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Participation period of the actor", formalDefinition="Participation period of the actor." ) + protected Period period; + + /** + * The individual, device, location, or service participating in the appointment. + */ + @Child(name = "actor", type = {Patient.class, Group.class, Practitioner.class, PractitionerRole.class, CareTeam.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The individual, device, location, or service participating in the appointment", formalDefinition="The individual, device, location, or service participating in the appointment." ) + protected Reference actor; + + /** + * Whether this participant is required to be present at the meeting. If false, the participant is optional. + */ + @Child(name = "required", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The participant is required to attend (optional when false)", formalDefinition="Whether this participant is required to be present at the meeting. If false, the participant is optional." ) + protected BooleanType required; + + /** + * Participation status of the actor. + */ + @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="accepted | declined | tentative | needs-action", formalDefinition="Participation status of the actor." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participationstatus") + protected Enumeration status; + + private static final long serialVersionUID = 1537536134L; + + /** + * Constructor + */ + public AppointmentParticipantComponent() { + super(); + } + + /** + * Constructor + */ + public AppointmentParticipantComponent(ParticipationStatus status) { + super(); + this.setStatus(status); + } + + /** + * @return {@link #type} (Role of participant in the appointment.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AppointmentParticipantComponent setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public AppointmentParticipantComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #period} (Participation period of the actor.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentParticipantComponent.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} (Participation period of the actor.) + */ + public AppointmentParticipantComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #actor} (The individual, device, location, or service participating in the appointment.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentParticipantComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (The individual, device, location, or service participating in the appointment.) + */ + public AppointmentParticipantComponent setActor(Reference value) { + this.actor = value; + return this; + } + + /** + * @return {@link #required} (Whether this participant is required to be present at the meeting. If false, the participant is optional.). 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 AppointmentParticipantComponent.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 participant is required to be present at the meeting. If false, the participant is optional.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public AppointmentParticipantComponent setRequiredElement(BooleanType value) { + this.required = value; + return this; + } + + /** + * @return Whether this participant is required to be present at the meeting. If false, the participant is optional. + */ + public boolean getRequired() { + return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); + } + + /** + * @param value Whether this participant is required to be present at the meeting. If false, the participant is optional. + */ + public AppointmentParticipantComponent setRequired(boolean value) { + if (this.required == null) + this.required = new BooleanType(); + this.required.setValue(value); + return this; + } + + /** + * @return {@link #status} (Participation status of the actor.). 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 AppointmentParticipantComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ParticipationStatusEnumFactory()); // 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} (Participation status of the actor.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public AppointmentParticipantComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Participation status of the actor. + */ + public ParticipationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Participation status of the actor. + */ + public AppointmentParticipantComponent setStatus(ParticipationStatus value) { + if (this.status == null) + this.status = new Enumeration(new ParticipationStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("period", "Period", "Participation period of the actor.", 0, 1, period)); + children.add(new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor)); + children.add(new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required)); + children.add(new Property("status", "code", "Participation status of the actor.", 0, 1, status)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type); + case -991726143: /*period*/ return new Property("period", "Period", "Participation period of the actor.", 0, 1, period); + case 92645877: /*actor*/ return new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor); + case -393139297: /*required*/ return new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required); + case -892481550: /*status*/ return new Property("status", "code", "Participation status of the actor.", 0, 1, status); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period + case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference + case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -991726143: // period + this.period = TypeConvertor.castToPeriod(value); // Period + return value; + case 92645877: // actor + this.actor = TypeConvertor.castToReference(value); // Reference + return value; + case -393139297: // required + this.required = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -892481550: // status + value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("period")) { + this.period = TypeConvertor.castToPeriod(value); // Period + } else if (name.equals("actor")) { + this.actor = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("required")) { + this.required = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("status")) { + value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("period")) { + this.period = null; + } else if (name.equals("actor")) { + this.actor = null; + } else if (name.equals("required")) { + this.required = null; + } else if (name.equals("status")) { + value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: return addType(); + case -991726143: return getPeriod(); + case 92645877: return getActor(); + case -393139297: return getRequiredElement(); + case -892481550: return getStatusElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -991726143: /*period*/ return new String[] {"Period"}; + case 92645877: /*actor*/ return new String[] {"Reference"}; + case -393139297: /*required*/ return new String[] {"boolean"}; + case -892481550: /*status*/ return new String[] {"code"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else if (name.equals("required")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.participant.required"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.participant.status"); + } + else + return super.addChild(name); + } + + public AppointmentParticipantComponent copy() { + AppointmentParticipantComponent dst = new AppointmentParticipantComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AppointmentParticipantComponent dst) { + super.copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.actor = actor == null ? null : actor.copy(); + dst.required = required == null ? null : required.copy(); + dst.status = status == null ? null : status.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AppointmentParticipantComponent)) + return false; + AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; + return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) + && compareDeep(required, o.required, true) && compareDeep(status, o.status, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AppointmentParticipantComponent)) + return false; + AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; + return compareValues(required, o.required, true) && compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor, required + , status); + } + + public String fhirType() { + return "Appointment.participant"; + + } + + } + + @Block() + public static class AppointmentRecurrenceTemplateComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The timezone of the recurring appointment occurrences. + */ + @Child(name = "timezone", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The timezone of the occurrences", formalDefinition="The timezone of the recurring appointment occurrences." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/timezones") + protected CodeableConcept timezone; + + /** + * How often the appointment series should recur. + */ + @Child(name = "recurrenceType", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The frequency of the recurrence", formalDefinition="How often the appointment series should recur." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-recurrrence-type") + protected CodeableConcept recurrenceType; + + /** + * Recurring appointments will not occur after this date. + */ + @Child(name = "lastOccurrenceDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The date when the recurrence should end", formalDefinition="Recurring appointments will not occur after this date." ) + protected DateType lastOccurrenceDate; + + /** + * How many appointments are planned in the recurrence. + */ + @Child(name = "occurrenceCount", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The number of planned occurrences", formalDefinition="How many appointments are planned in the recurrence." ) + protected PositiveIntType occurrenceCount; + + /** + * The list of specific dates that will have appointments generated. + */ + @Child(name = "occurrenceDate", type = {DateType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specific dates for a recurring set of appointments (no template)", formalDefinition="The list of specific dates that will have appointments generated." ) + protected List occurrenceDate; + + /** + * Information about weekly recurring appointments. + */ + @Child(name = "weeklyTemplate", type = {}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Information about weekly recurring appointments", formalDefinition="Information about weekly recurring appointments." ) + protected AppointmentRecurrenceTemplateWeeklyTemplateComponent weeklyTemplate; + + /** + * Information about monthly recurring appointments. + */ + @Child(name = "monthlyTemplate", type = {}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Information about monthly recurring appointments", formalDefinition="Information about monthly recurring appointments." ) + protected AppointmentRecurrenceTemplateMonthlyTemplateComponent monthlyTemplate; + + /** + * Information about yearly recurring appointments. + */ + @Child(name = "yearlyTemplate", type = {}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Information about yearly recurring appointments", formalDefinition="Information about yearly recurring appointments." ) + protected AppointmentRecurrenceTemplateYearlyTemplateComponent yearlyTemplate; + + /** + * Any dates, such as holidays, that should be excluded from the recurrence. + */ + @Child(name = "excludingDate", type = {DateType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Any dates that should be excluded from the series", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) + protected List excludingDate; + + /** + * Any dates, such as holidays, that should be excluded from the recurrence. + */ + @Child(name = "excludingRecurrenceId", type = {PositiveIntType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Any recurrence IDs that should be excluded from the recurrence", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) + protected List excludingRecurrenceId; + + private static final long serialVersionUID = -1582999176L; + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateComponent() { + super(); + } + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateComponent(CodeableConcept recurrenceType) { + super(); + this.setRecurrenceType(recurrenceType); + } + + /** + * @return {@link #timezone} (The timezone of the recurring appointment occurrences.) + */ + public CodeableConcept getTimezone() { + if (this.timezone == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.timezone"); + else if (Configuration.doAutoCreate()) + this.timezone = new CodeableConcept(); // cc + return this.timezone; + } + + public boolean hasTimezone() { + return this.timezone != null && !this.timezone.isEmpty(); + } + + /** + * @param value {@link #timezone} (The timezone of the recurring appointment occurrences.) + */ + public AppointmentRecurrenceTemplateComponent setTimezone(CodeableConcept value) { + this.timezone = value; + return this; + } + + /** + * @return {@link #recurrenceType} (How often the appointment series should recur.) + */ + public CodeableConcept getRecurrenceType() { + if (this.recurrenceType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.recurrenceType"); + else if (Configuration.doAutoCreate()) + this.recurrenceType = new CodeableConcept(); // cc + return this.recurrenceType; + } + + public boolean hasRecurrenceType() { + return this.recurrenceType != null && !this.recurrenceType.isEmpty(); + } + + /** + * @param value {@link #recurrenceType} (How often the appointment series should recur.) + */ + public AppointmentRecurrenceTemplateComponent setRecurrenceType(CodeableConcept value) { + this.recurrenceType = value; + return this; + } + + /** + * @return {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value + */ + public DateType getLastOccurrenceDateElement() { + if (this.lastOccurrenceDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.lastOccurrenceDate"); + else if (Configuration.doAutoCreate()) + this.lastOccurrenceDate = new DateType(); // bb + return this.lastOccurrenceDate; + } + + public boolean hasLastOccurrenceDateElement() { + return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); + } + + public boolean hasLastOccurrenceDate() { + return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); + } + + /** + * @param value {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value + */ + public AppointmentRecurrenceTemplateComponent setLastOccurrenceDateElement(DateType value) { + this.lastOccurrenceDate = value; + return this; + } + + /** + * @return Recurring appointments will not occur after this date. + */ + public Date getLastOccurrenceDate() { + return this.lastOccurrenceDate == null ? null : this.lastOccurrenceDate.getValue(); + } + + /** + * @param value Recurring appointments will not occur after this date. + */ + public AppointmentRecurrenceTemplateComponent setLastOccurrenceDate(Date value) { + if (value == null) + this.lastOccurrenceDate = null; + else { + if (this.lastOccurrenceDate == null) + this.lastOccurrenceDate = new DateType(); + this.lastOccurrenceDate.setValue(value); + } + return this; + } + + /** + * @return {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value + */ + public PositiveIntType getOccurrenceCountElement() { + if (this.occurrenceCount == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.occurrenceCount"); + else if (Configuration.doAutoCreate()) + this.occurrenceCount = new PositiveIntType(); // bb + return this.occurrenceCount; + } + + public boolean hasOccurrenceCountElement() { + return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); + } + + public boolean hasOccurrenceCount() { + return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); + } + + /** + * @param value {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value + */ + public AppointmentRecurrenceTemplateComponent setOccurrenceCountElement(PositiveIntType value) { + this.occurrenceCount = value; + return this; + } + + /** + * @return How many appointments are planned in the recurrence. + */ + public int getOccurrenceCount() { + return this.occurrenceCount == null || this.occurrenceCount.isEmpty() ? 0 : this.occurrenceCount.getValue(); + } + + /** + * @param value How many appointments are planned in the recurrence. + */ + public AppointmentRecurrenceTemplateComponent setOccurrenceCount(int value) { + if (this.occurrenceCount == null) + this.occurrenceCount = new PositiveIntType(); + this.occurrenceCount.setValue(value); + return this; + } + + /** + * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) + */ + public List getOccurrenceDate() { + if (this.occurrenceDate == null) + this.occurrenceDate = new ArrayList(); + return this.occurrenceDate; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AppointmentRecurrenceTemplateComponent setOccurrenceDate(List theOccurrenceDate) { + this.occurrenceDate = theOccurrenceDate; + return this; + } + + public boolean hasOccurrenceDate() { + if (this.occurrenceDate == null) + return false; + for (DateType item : this.occurrenceDate) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) + */ + public DateType addOccurrenceDateElement() {//2 + DateType t = new DateType(); + if (this.occurrenceDate == null) + this.occurrenceDate = new ArrayList(); + this.occurrenceDate.add(t); + return t; + } + + /** + * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) + */ + public AppointmentRecurrenceTemplateComponent addOccurrenceDate(Date value) { //1 + DateType t = new DateType(); + t.setValue(value); + if (this.occurrenceDate == null) + this.occurrenceDate = new ArrayList(); + this.occurrenceDate.add(t); + return this; + } + + /** + * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) + */ + public boolean hasOccurrenceDate(Date value) { + if (this.occurrenceDate == null) + return false; + for (DateType v : this.occurrenceDate) + if (v.getValue().equals(value)) // date + return true; + return false; + } + + /** + * @return {@link #weeklyTemplate} (Information about weekly recurring appointments.) + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent getWeeklyTemplate() { + if (this.weeklyTemplate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.weeklyTemplate"); + else if (Configuration.doAutoCreate()) + this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); // cc + return this.weeklyTemplate; + } + + public boolean hasWeeklyTemplate() { + return this.weeklyTemplate != null && !this.weeklyTemplate.isEmpty(); + } + + /** + * @param value {@link #weeklyTemplate} (Information about weekly recurring appointments.) + */ + public AppointmentRecurrenceTemplateComponent setWeeklyTemplate(AppointmentRecurrenceTemplateWeeklyTemplateComponent value) { + this.weeklyTemplate = value; + return this; + } + + /** + * @return {@link #monthlyTemplate} (Information about monthly recurring appointments.) + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent getMonthlyTemplate() { + if (this.monthlyTemplate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.monthlyTemplate"); + else if (Configuration.doAutoCreate()) + this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); // cc + return this.monthlyTemplate; + } + + public boolean hasMonthlyTemplate() { + return this.monthlyTemplate != null && !this.monthlyTemplate.isEmpty(); + } + + /** + * @param value {@link #monthlyTemplate} (Information about monthly recurring appointments.) + */ + public AppointmentRecurrenceTemplateComponent setMonthlyTemplate(AppointmentRecurrenceTemplateMonthlyTemplateComponent value) { + this.monthlyTemplate = value; + return this; + } + + /** + * @return {@link #yearlyTemplate} (Information about yearly recurring appointments.) + */ + public AppointmentRecurrenceTemplateYearlyTemplateComponent getYearlyTemplate() { + if (this.yearlyTemplate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.yearlyTemplate"); + else if (Configuration.doAutoCreate()) + this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); // cc + return this.yearlyTemplate; + } + + public boolean hasYearlyTemplate() { + return this.yearlyTemplate != null && !this.yearlyTemplate.isEmpty(); + } + + /** + * @param value {@link #yearlyTemplate} (Information about yearly recurring appointments.) + */ + public AppointmentRecurrenceTemplateComponent setYearlyTemplate(AppointmentRecurrenceTemplateYearlyTemplateComponent value) { + this.yearlyTemplate = value; + return this; + } + + /** + * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public List getExcludingDate() { + if (this.excludingDate == null) + this.excludingDate = new ArrayList(); + return this.excludingDate; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AppointmentRecurrenceTemplateComponent setExcludingDate(List theExcludingDate) { + this.excludingDate = theExcludingDate; + return this; + } + + public boolean hasExcludingDate() { + if (this.excludingDate == null) + return false; + for (DateType item : this.excludingDate) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public DateType addExcludingDateElement() {//2 + DateType t = new DateType(); + if (this.excludingDate == null) + this.excludingDate = new ArrayList(); + this.excludingDate.add(t); + return t; + } + + /** + * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public AppointmentRecurrenceTemplateComponent addExcludingDate(Date value) { //1 + DateType t = new DateType(); + t.setValue(value); + if (this.excludingDate == null) + this.excludingDate = new ArrayList(); + this.excludingDate.add(t); + return this; + } + + /** + * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public boolean hasExcludingDate(Date value) { + if (this.excludingDate == null) + return false; + for (DateType v : this.excludingDate) + if (v.getValue().equals(value)) // date + return true; + return false; + } + + /** + * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public List getExcludingRecurrenceId() { + if (this.excludingRecurrenceId == null) + this.excludingRecurrenceId = new ArrayList(); + return this.excludingRecurrenceId; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public AppointmentRecurrenceTemplateComponent setExcludingRecurrenceId(List theExcludingRecurrenceId) { + this.excludingRecurrenceId = theExcludingRecurrenceId; + return this; + } + + public boolean hasExcludingRecurrenceId() { + if (this.excludingRecurrenceId == null) + return false; + for (PositiveIntType item : this.excludingRecurrenceId) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public PositiveIntType addExcludingRecurrenceIdElement() {//2 + PositiveIntType t = new PositiveIntType(); + if (this.excludingRecurrenceId == null) + this.excludingRecurrenceId = new ArrayList(); + this.excludingRecurrenceId.add(t); + return t; + } + + /** + * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public AppointmentRecurrenceTemplateComponent addExcludingRecurrenceId(int value) { //1 + PositiveIntType t = new PositiveIntType(); + t.setValue(value); + if (this.excludingRecurrenceId == null) + this.excludingRecurrenceId = new ArrayList(); + this.excludingRecurrenceId.add(t); + return this; + } + + /** + * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) + */ + public boolean hasExcludingRecurrenceId(int value) { + if (this.excludingRecurrenceId == null) + return false; + for (PositiveIntType v : this.excludingRecurrenceId) + if (v.getValue().equals(value)) // positiveInt + return true; + return false; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone)); + children.add(new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType)); + children.add(new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate)); + children.add(new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount)); + children.add(new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate)); + children.add(new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate)); + children.add(new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate)); + children.add(new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate)); + children.add(new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate)); + children.add(new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -2076227591: /*timezone*/ return new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone); + case -381221238: /*recurrenceType*/ return new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType); + case -1262346923: /*lastOccurrenceDate*/ return new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate); + case 1834480062: /*occurrenceCount*/ return new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount); + case 1721761055: /*occurrenceDate*/ return new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate); + case 887136283: /*weeklyTemplate*/ return new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate); + case 2142528423: /*monthlyTemplate*/ return new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate); + case -334069468: /*yearlyTemplate*/ return new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate); + case 596601957: /*excludingDate*/ return new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate); + case -797577694: /*excludingRecurrenceId*/ return new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -2076227591: /*timezone*/ return this.timezone == null ? new Base[0] : new Base[] {this.timezone}; // CodeableConcept + case -381221238: /*recurrenceType*/ return this.recurrenceType == null ? new Base[0] : new Base[] {this.recurrenceType}; // CodeableConcept + case -1262346923: /*lastOccurrenceDate*/ return this.lastOccurrenceDate == null ? new Base[0] : new Base[] {this.lastOccurrenceDate}; // DateType + case 1834480062: /*occurrenceCount*/ return this.occurrenceCount == null ? new Base[0] : new Base[] {this.occurrenceCount}; // PositiveIntType + case 1721761055: /*occurrenceDate*/ return this.occurrenceDate == null ? new Base[0] : this.occurrenceDate.toArray(new Base[this.occurrenceDate.size()]); // DateType + case 887136283: /*weeklyTemplate*/ return this.weeklyTemplate == null ? new Base[0] : new Base[] {this.weeklyTemplate}; // AppointmentRecurrenceTemplateWeeklyTemplateComponent + case 2142528423: /*monthlyTemplate*/ return this.monthlyTemplate == null ? new Base[0] : new Base[] {this.monthlyTemplate}; // AppointmentRecurrenceTemplateMonthlyTemplateComponent + case -334069468: /*yearlyTemplate*/ return this.yearlyTemplate == null ? new Base[0] : new Base[] {this.yearlyTemplate}; // AppointmentRecurrenceTemplateYearlyTemplateComponent + case 596601957: /*excludingDate*/ return this.excludingDate == null ? new Base[0] : this.excludingDate.toArray(new Base[this.excludingDate.size()]); // DateType + case -797577694: /*excludingRecurrenceId*/ return this.excludingRecurrenceId == null ? new Base[0] : this.excludingRecurrenceId.toArray(new Base[this.excludingRecurrenceId.size()]); // PositiveIntType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -2076227591: // timezone + this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -381221238: // recurrenceType + this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1262346923: // lastOccurrenceDate + this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType + return value; + case 1834480062: // occurrenceCount + this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case 1721761055: // occurrenceDate + this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); // DateType + return value; + case 887136283: // weeklyTemplate + this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent + return value; + case 2142528423: // monthlyTemplate + this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent + return value; + case -334069468: // yearlyTemplate + this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent + return value; + case 596601957: // excludingDate + this.getExcludingDate().add(TypeConvertor.castToDate(value)); // DateType + return value; + case -797577694: // excludingRecurrenceId + this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("timezone")) { + this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("recurrenceType")) { + this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("lastOccurrenceDate")) { + this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType + } else if (name.equals("occurrenceCount")) { + this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("occurrenceDate")) { + this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); + } else if (name.equals("weeklyTemplate")) { + this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent + } else if (name.equals("monthlyTemplate")) { + this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent + } else if (name.equals("yearlyTemplate")) { + this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent + } else if (name.equals("excludingDate")) { + this.getExcludingDate().add(TypeConvertor.castToDate(value)); + } else if (name.equals("excludingRecurrenceId")) { + this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("timezone")) { + this.timezone = null; + } else if (name.equals("recurrenceType")) { + this.recurrenceType = null; + } else if (name.equals("lastOccurrenceDate")) { + this.lastOccurrenceDate = null; + } else if (name.equals("occurrenceCount")) { + this.occurrenceCount = null; + } else if (name.equals("occurrenceDate")) { + this.getOccurrenceDate().remove(value); + } else if (name.equals("weeklyTemplate")) { + this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent + } else if (name.equals("monthlyTemplate")) { + this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent + } else if (name.equals("yearlyTemplate")) { + this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent + } else if (name.equals("excludingDate")) { + this.getExcludingDate().remove(value); + } else if (name.equals("excludingRecurrenceId")) { + this.getExcludingRecurrenceId().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -2076227591: return getTimezone(); + case -381221238: return getRecurrenceType(); + case -1262346923: return getLastOccurrenceDateElement(); + case 1834480062: return getOccurrenceCountElement(); + case 1721761055: return addOccurrenceDateElement(); + case 887136283: return getWeeklyTemplate(); + case 2142528423: return getMonthlyTemplate(); + case -334069468: return getYearlyTemplate(); + case 596601957: return addExcludingDateElement(); + case -797577694: return addExcludingRecurrenceIdElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -2076227591: /*timezone*/ return new String[] {"CodeableConcept"}; + case -381221238: /*recurrenceType*/ return new String[] {"CodeableConcept"}; + case -1262346923: /*lastOccurrenceDate*/ return new String[] {"date"}; + case 1834480062: /*occurrenceCount*/ return new String[] {"positiveInt"}; + case 1721761055: /*occurrenceDate*/ return new String[] {"date"}; + case 887136283: /*weeklyTemplate*/ return new String[] {}; + case 2142528423: /*monthlyTemplate*/ return new String[] {}; + case -334069468: /*yearlyTemplate*/ return new String[] {}; + case 596601957: /*excludingDate*/ return new String[] {"date"}; + case -797577694: /*excludingRecurrenceId*/ return new String[] {"positiveInt"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("timezone")) { + this.timezone = new CodeableConcept(); + return this.timezone; + } + else if (name.equals("recurrenceType")) { + this.recurrenceType = new CodeableConcept(); + return this.recurrenceType; + } + else if (name.equals("lastOccurrenceDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.lastOccurrenceDate"); + } + else if (name.equals("occurrenceCount")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.occurrenceCount"); + } + else if (name.equals("occurrenceDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.occurrenceDate"); + } + else if (name.equals("weeklyTemplate")) { + this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); + return this.weeklyTemplate; + } + else if (name.equals("monthlyTemplate")) { + this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); + return this.monthlyTemplate; + } + else if (name.equals("yearlyTemplate")) { + this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); + return this.yearlyTemplate; + } + else if (name.equals("excludingDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.excludingDate"); + } + else if (name.equals("excludingRecurrenceId")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.excludingRecurrenceId"); + } + else + return super.addChild(name); + } + + public AppointmentRecurrenceTemplateComponent copy() { + AppointmentRecurrenceTemplateComponent dst = new AppointmentRecurrenceTemplateComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AppointmentRecurrenceTemplateComponent dst) { + super.copyValues(dst); + dst.timezone = timezone == null ? null : timezone.copy(); + dst.recurrenceType = recurrenceType == null ? null : recurrenceType.copy(); + dst.lastOccurrenceDate = lastOccurrenceDate == null ? null : lastOccurrenceDate.copy(); + dst.occurrenceCount = occurrenceCount == null ? null : occurrenceCount.copy(); + if (occurrenceDate != null) { + dst.occurrenceDate = new ArrayList(); + for (DateType i : occurrenceDate) + dst.occurrenceDate.add(i.copy()); + }; + dst.weeklyTemplate = weeklyTemplate == null ? null : weeklyTemplate.copy(); + dst.monthlyTemplate = monthlyTemplate == null ? null : monthlyTemplate.copy(); + dst.yearlyTemplate = yearlyTemplate == null ? null : yearlyTemplate.copy(); + if (excludingDate != null) { + dst.excludingDate = new ArrayList(); + for (DateType i : excludingDate) + dst.excludingDate.add(i.copy()); + }; + if (excludingRecurrenceId != null) { + dst.excludingRecurrenceId = new ArrayList(); + for (PositiveIntType i : excludingRecurrenceId) + dst.excludingRecurrenceId.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) + return false; + AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; + return compareDeep(timezone, o.timezone, true) && compareDeep(recurrenceType, o.recurrenceType, true) + && compareDeep(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareDeep(occurrenceCount, o.occurrenceCount, true) + && compareDeep(occurrenceDate, o.occurrenceDate, true) && compareDeep(weeklyTemplate, o.weeklyTemplate, true) + && compareDeep(monthlyTemplate, o.monthlyTemplate, true) && compareDeep(yearlyTemplate, o.yearlyTemplate, true) + && compareDeep(excludingDate, o.excludingDate, true) && compareDeep(excludingRecurrenceId, o.excludingRecurrenceId, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) + return false; + AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; + return compareValues(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareValues(occurrenceCount, o.occurrenceCount, true) + && compareValues(occurrenceDate, o.occurrenceDate, true) && compareValues(excludingDate, o.excludingDate, true) + && compareValues(excludingRecurrenceId, o.excludingRecurrenceId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timezone, recurrenceType, lastOccurrenceDate + , occurrenceCount, occurrenceDate, weeklyTemplate, monthlyTemplate, yearlyTemplate + , excludingDate, excludingRecurrenceId); + } + + public String fhirType() { + return "Appointment.recurrenceTemplate"; + + } + + } + + @Block() + public static class AppointmentRecurrenceTemplateWeeklyTemplateComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates that recurring appointments should occur on Mondays. + */ + @Child(name = "monday", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Mondays", formalDefinition="Indicates that recurring appointments should occur on Mondays." ) + protected BooleanType monday; + + /** + * Indicates that recurring appointments should occur on Tuesdays. + */ + @Child(name = "tuesday", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Tuesday", formalDefinition="Indicates that recurring appointments should occur on Tuesdays." ) + protected BooleanType tuesday; + + /** + * Indicates that recurring appointments should occur on Wednesdays. + */ + @Child(name = "wednesday", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Wednesday", formalDefinition="Indicates that recurring appointments should occur on Wednesdays." ) + protected BooleanType wednesday; + + /** + * Indicates that recurring appointments should occur on Thursdays. + */ + @Child(name = "thursday", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Thursday", formalDefinition="Indicates that recurring appointments should occur on Thursdays." ) + protected BooleanType thursday; + + /** + * Indicates that recurring appointments should occur on Fridays. + */ + @Child(name = "friday", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Friday", formalDefinition="Indicates that recurring appointments should occur on Fridays." ) + protected BooleanType friday; + + /** + * Indicates that recurring appointments should occur on Saturdays. + */ + @Child(name = "saturday", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Saturday", formalDefinition="Indicates that recurring appointments should occur on Saturdays." ) + protected BooleanType saturday; + + /** + * Indicates that recurring appointments should occur on Sundays. + */ + @Child(name = "sunday", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on Sunday", formalDefinition="Indicates that recurring appointments should occur on Sundays." ) + protected BooleanType sunday; + + /** + * The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. + +e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. + */ + @Child(name = "weekInterval", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs every nth week", formalDefinition="The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3." ) + protected PositiveIntType weekInterval; + + private static final long serialVersionUID = 588795188L; + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent() { + super(); + } + + /** + * @return {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value + */ + public BooleanType getMondayElement() { + if (this.monday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.monday"); + else if (Configuration.doAutoCreate()) + this.monday = new BooleanType(); // bb + return this.monday; + } + + public boolean hasMondayElement() { + return this.monday != null && !this.monday.isEmpty(); + } + + public boolean hasMonday() { + return this.monday != null && !this.monday.isEmpty(); + } + + /** + * @param value {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMondayElement(BooleanType value) { + this.monday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Mondays. + */ + public boolean getMonday() { + return this.monday == null || this.monday.isEmpty() ? false : this.monday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Mondays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMonday(boolean value) { + if (this.monday == null) + this.monday = new BooleanType(); + this.monday.setValue(value); + return this; + } + + /** + * @return {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value + */ + public BooleanType getTuesdayElement() { + if (this.tuesday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.tuesday"); + else if (Configuration.doAutoCreate()) + this.tuesday = new BooleanType(); // bb + return this.tuesday; + } + + public boolean hasTuesdayElement() { + return this.tuesday != null && !this.tuesday.isEmpty(); + } + + public boolean hasTuesday() { + return this.tuesday != null && !this.tuesday.isEmpty(); + } + + /** + * @param value {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesdayElement(BooleanType value) { + this.tuesday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Tuesdays. + */ + public boolean getTuesday() { + return this.tuesday == null || this.tuesday.isEmpty() ? false : this.tuesday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Tuesdays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesday(boolean value) { + if (this.tuesday == null) + this.tuesday = new BooleanType(); + this.tuesday.setValue(value); + return this; + } + + /** + * @return {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value + */ + public BooleanType getWednesdayElement() { + if (this.wednesday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.wednesday"); + else if (Configuration.doAutoCreate()) + this.wednesday = new BooleanType(); // bb + return this.wednesday; + } + + public boolean hasWednesdayElement() { + return this.wednesday != null && !this.wednesday.isEmpty(); + } + + public boolean hasWednesday() { + return this.wednesday != null && !this.wednesday.isEmpty(); + } + + /** + * @param value {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesdayElement(BooleanType value) { + this.wednesday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Wednesdays. + */ + public boolean getWednesday() { + return this.wednesday == null || this.wednesday.isEmpty() ? false : this.wednesday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Wednesdays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesday(boolean value) { + if (this.wednesday == null) + this.wednesday = new BooleanType(); + this.wednesday.setValue(value); + return this; + } + + /** + * @return {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value + */ + public BooleanType getThursdayElement() { + if (this.thursday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.thursday"); + else if (Configuration.doAutoCreate()) + this.thursday = new BooleanType(); // bb + return this.thursday; + } + + public boolean hasThursdayElement() { + return this.thursday != null && !this.thursday.isEmpty(); + } + + public boolean hasThursday() { + return this.thursday != null && !this.thursday.isEmpty(); + } + + /** + * @param value {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursdayElement(BooleanType value) { + this.thursday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Thursdays. + */ + public boolean getThursday() { + return this.thursday == null || this.thursday.isEmpty() ? false : this.thursday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Thursdays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursday(boolean value) { + if (this.thursday == null) + this.thursday = new BooleanType(); + this.thursday.setValue(value); + return this; + } + + /** + * @return {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value + */ + public BooleanType getFridayElement() { + if (this.friday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.friday"); + else if (Configuration.doAutoCreate()) + this.friday = new BooleanType(); // bb + return this.friday; + } + + public boolean hasFridayElement() { + return this.friday != null && !this.friday.isEmpty(); + } + + public boolean hasFriday() { + return this.friday != null && !this.friday.isEmpty(); + } + + /** + * @param value {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFridayElement(BooleanType value) { + this.friday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Fridays. + */ + public boolean getFriday() { + return this.friday == null || this.friday.isEmpty() ? false : this.friday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Fridays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFriday(boolean value) { + if (this.friday == null) + this.friday = new BooleanType(); + this.friday.setValue(value); + return this; + } + + /** + * @return {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value + */ + public BooleanType getSaturdayElement() { + if (this.saturday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.saturday"); + else if (Configuration.doAutoCreate()) + this.saturday = new BooleanType(); // bb + return this.saturday; + } + + public boolean hasSaturdayElement() { + return this.saturday != null && !this.saturday.isEmpty(); + } + + public boolean hasSaturday() { + return this.saturday != null && !this.saturday.isEmpty(); + } + + /** + * @param value {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturdayElement(BooleanType value) { + this.saturday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Saturdays. + */ + public boolean getSaturday() { + return this.saturday == null || this.saturday.isEmpty() ? false : this.saturday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Saturdays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturday(boolean value) { + if (this.saturday == null) + this.saturday = new BooleanType(); + this.saturday.setValue(value); + return this; + } + + /** + * @return {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value + */ + public BooleanType getSundayElement() { + if (this.sunday == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.sunday"); + else if (Configuration.doAutoCreate()) + this.sunday = new BooleanType(); // bb + return this.sunday; + } + + public boolean hasSundayElement() { + return this.sunday != null && !this.sunday.isEmpty(); + } + + public boolean hasSunday() { + return this.sunday != null && !this.sunday.isEmpty(); + } + + /** + * @param value {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSundayElement(BooleanType value) { + this.sunday = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur on Sundays. + */ + public boolean getSunday() { + return this.sunday == null || this.sunday.isEmpty() ? false : this.sunday.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur on Sundays. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSunday(boolean value) { + if (this.sunday == null) + this.sunday = new BooleanType(); + this.sunday.setValue(value); + return this; + } + + /** + * @return {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. + +e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value + */ + public PositiveIntType getWeekIntervalElement() { + if (this.weekInterval == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.weekInterval"); + else if (Configuration.doAutoCreate()) + this.weekInterval = new PositiveIntType(); // bb + return this.weekInterval; + } + + public boolean hasWeekIntervalElement() { + return this.weekInterval != null && !this.weekInterval.isEmpty(); + } + + public boolean hasWeekInterval() { + return this.weekInterval != null && !this.weekInterval.isEmpty(); + } + + /** + * @param value {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. + +e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekIntervalElement(PositiveIntType value) { + this.weekInterval = value; + return this; + } + + /** + * @return The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. + +e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. + */ + public int getWeekInterval() { + return this.weekInterval == null || this.weekInterval.isEmpty() ? 0 : this.weekInterval.getValue(); + } + + /** + * @param value The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. + +e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. + */ + public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekInterval(int value) { + if (this.weekInterval == null) + this.weekInterval = new PositiveIntType(); + this.weekInterval.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday)); + children.add(new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday)); + children.add(new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday)); + children.add(new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday)); + children.add(new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday)); + children.add(new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday)); + children.add(new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday)); + children.add(new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1068502768: /*monday*/ return new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday); + case -977343923: /*tuesday*/ return new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday); + case 1393530710: /*wednesday*/ return new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday); + case 1572055514: /*thursday*/ return new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday); + case -1266285217: /*friday*/ return new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday); + case -2114201671: /*saturday*/ return new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday); + case -891186736: /*sunday*/ return new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday); + case -784550695: /*weekInterval*/ return new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1068502768: /*monday*/ return this.monday == null ? new Base[0] : new Base[] {this.monday}; // BooleanType + case -977343923: /*tuesday*/ return this.tuesday == null ? new Base[0] : new Base[] {this.tuesday}; // BooleanType + case 1393530710: /*wednesday*/ return this.wednesday == null ? new Base[0] : new Base[] {this.wednesday}; // BooleanType + case 1572055514: /*thursday*/ return this.thursday == null ? new Base[0] : new Base[] {this.thursday}; // BooleanType + case -1266285217: /*friday*/ return this.friday == null ? new Base[0] : new Base[] {this.friday}; // BooleanType + case -2114201671: /*saturday*/ return this.saturday == null ? new Base[0] : new Base[] {this.saturday}; // BooleanType + case -891186736: /*sunday*/ return this.sunday == null ? new Base[0] : new Base[] {this.sunday}; // BooleanType + case -784550695: /*weekInterval*/ return this.weekInterval == null ? new Base[0] : new Base[] {this.weekInterval}; // PositiveIntType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1068502768: // monday + this.monday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -977343923: // tuesday + this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case 1393530710: // wednesday + this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case 1572055514: // thursday + this.thursday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -1266285217: // friday + this.friday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -2114201671: // saturday + this.saturday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -891186736: // sunday + this.sunday = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case -784550695: // weekInterval + this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("monday")) { + this.monday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("tuesday")) { + this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("wednesday")) { + this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("thursday")) { + this.thursday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("friday")) { + this.friday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("saturday")) { + this.saturday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("sunday")) { + this.sunday = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("weekInterval")) { + this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("monday")) { + this.monday = null; + } else if (name.equals("tuesday")) { + this.tuesday = null; + } else if (name.equals("wednesday")) { + this.wednesday = null; + } else if (name.equals("thursday")) { + this.thursday = null; + } else if (name.equals("friday")) { + this.friday = null; + } else if (name.equals("saturday")) { + this.saturday = null; + } else if (name.equals("sunday")) { + this.sunday = null; + } else if (name.equals("weekInterval")) { + this.weekInterval = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1068502768: return getMondayElement(); + case -977343923: return getTuesdayElement(); + case 1393530710: return getWednesdayElement(); + case 1572055514: return getThursdayElement(); + case -1266285217: return getFridayElement(); + case -2114201671: return getSaturdayElement(); + case -891186736: return getSundayElement(); + case -784550695: return getWeekIntervalElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1068502768: /*monday*/ return new String[] {"boolean"}; + case -977343923: /*tuesday*/ return new String[] {"boolean"}; + case 1393530710: /*wednesday*/ return new String[] {"boolean"}; + case 1572055514: /*thursday*/ return new String[] {"boolean"}; + case -1266285217: /*friday*/ return new String[] {"boolean"}; + case -2114201671: /*saturday*/ return new String[] {"boolean"}; + case -891186736: /*sunday*/ return new String[] {"boolean"}; + case -784550695: /*weekInterval*/ return new String[] {"positiveInt"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("monday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.monday"); + } + else if (name.equals("tuesday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.tuesday"); + } + else if (name.equals("wednesday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.wednesday"); + } + else if (name.equals("thursday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.thursday"); + } + else if (name.equals("friday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.friday"); + } + else if (name.equals("saturday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.saturday"); + } + else if (name.equals("sunday")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.sunday"); + } + else if (name.equals("weekInterval")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.weeklyTemplate.weekInterval"); + } + else + return super.addChild(name); + } + + public AppointmentRecurrenceTemplateWeeklyTemplateComponent copy() { + AppointmentRecurrenceTemplateWeeklyTemplateComponent dst = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AppointmentRecurrenceTemplateWeeklyTemplateComponent dst) { + super.copyValues(dst); + dst.monday = monday == null ? null : monday.copy(); + dst.tuesday = tuesday == null ? null : tuesday.copy(); + dst.wednesday = wednesday == null ? null : wednesday.copy(); + dst.thursday = thursday == null ? null : thursday.copy(); + dst.friday = friday == null ? null : friday.copy(); + dst.saturday = saturday == null ? null : saturday.copy(); + dst.sunday = sunday == null ? null : sunday.copy(); + dst.weekInterval = weekInterval == null ? null : weekInterval.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; + return compareDeep(monday, o.monday, true) && compareDeep(tuesday, o.tuesday, true) && compareDeep(wednesday, o.wednesday, true) + && compareDeep(thursday, o.thursday, true) && compareDeep(friday, o.friday, true) && compareDeep(saturday, o.saturday, true) + && compareDeep(sunday, o.sunday, true) && compareDeep(weekInterval, o.weekInterval, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; + return compareValues(monday, o.monday, true) && compareValues(tuesday, o.tuesday, true) && compareValues(wednesday, o.wednesday, true) + && compareValues(thursday, o.thursday, true) && compareValues(friday, o.friday, true) && compareValues(saturday, o.saturday, true) + && compareValues(sunday, o.sunday, true) && compareValues(weekInterval, o.weekInterval, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(monday, tuesday, wednesday + , thursday, friday, saturday, sunday, weekInterval); + } + + public String fhirType() { + return "Appointment.recurrenceTemplate.weeklyTemplate"; + + } + + } + + @Block() + public static class AppointmentRecurrenceTemplateMonthlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. + */ + @Child(name = "dayOfMonth", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs on a specific day of the month", formalDefinition="Indicates that appointments in the series of recurring appointments should occur on a specific day of the month." ) + protected PositiveIntType dayOfMonth; + + /** + * Indicates which week within a month the appointments in the series of recurring appointments should occur on. + */ + @Child(name = "nthWeekOfMonth", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates which week of the month the appointment should occur", formalDefinition="Indicates which week within a month the appointments in the series of recurring appointments should occur on." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/week-of-month") + protected Coding nthWeekOfMonth; + + /** + * Indicates which day of the week the recurring appointments should occur each nth week. + */ + @Child(name = "dayOfWeek", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates which day of the week the appointment should occur", formalDefinition="Indicates which day of the week the recurring appointments should occur each nth week." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week") + protected Coding dayOfWeek; + + /** + * Indicates that recurring appointments should occur every nth month. + */ + @Child(name = "monthInterval", type = {PositiveIntType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs every nth month", formalDefinition="Indicates that recurring appointments should occur every nth month." ) + protected PositiveIntType monthInterval; + + private static final long serialVersionUID = -1234046272L; + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent() { + super(); + } + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent(int monthInterval) { + super(); + this.setMonthInterval(monthInterval); + } + + /** + * @return {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value + */ + public PositiveIntType getDayOfMonthElement() { + if (this.dayOfMonth == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfMonth"); + else if (Configuration.doAutoCreate()) + this.dayOfMonth = new PositiveIntType(); // bb + return this.dayOfMonth; + } + + public boolean hasDayOfMonthElement() { + return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); + } + + public boolean hasDayOfMonth() { + return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); + } + + /** + * @param value {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonthElement(PositiveIntType value) { + this.dayOfMonth = value; + return this; + } + + /** + * @return Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. + */ + public int getDayOfMonth() { + return this.dayOfMonth == null || this.dayOfMonth.isEmpty() ? 0 : this.dayOfMonth.getValue(); + } + + /** + * @param value Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonth(int value) { + if (this.dayOfMonth == null) + this.dayOfMonth = new PositiveIntType(); + this.dayOfMonth.setValue(value); + return this; + } + + /** + * @return {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) + */ + public Coding getNthWeekOfMonth() { + if (this.nthWeekOfMonth == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.nthWeekOfMonth"); + else if (Configuration.doAutoCreate()) + this.nthWeekOfMonth = new Coding(); // cc + return this.nthWeekOfMonth; + } + + public boolean hasNthWeekOfMonth() { + return this.nthWeekOfMonth != null && !this.nthWeekOfMonth.isEmpty(); + } + + /** + * @param value {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setNthWeekOfMonth(Coding value) { + this.nthWeekOfMonth = value; + return this; + } + + /** + * @return {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) + */ + public Coding getDayOfWeek() { + if (this.dayOfWeek == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfWeek"); + else if (Configuration.doAutoCreate()) + this.dayOfWeek = new Coding(); // cc + return this.dayOfWeek; + } + + public boolean hasDayOfWeek() { + return this.dayOfWeek != null && !this.dayOfWeek.isEmpty(); + } + + /** + * @param value {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfWeek(Coding value) { + this.dayOfWeek = value; + return this; + } + + /** + * @return {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value + */ + public PositiveIntType getMonthIntervalElement() { + if (this.monthInterval == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.monthInterval"); + else if (Configuration.doAutoCreate()) + this.monthInterval = new PositiveIntType(); // bb + return this.monthInterval; + } + + public boolean hasMonthIntervalElement() { + return this.monthInterval != null && !this.monthInterval.isEmpty(); + } + + public boolean hasMonthInterval() { + return this.monthInterval != null && !this.monthInterval.isEmpty(); + } + + /** + * @param value {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthIntervalElement(PositiveIntType value) { + this.monthInterval = value; + return this; + } + + /** + * @return Indicates that recurring appointments should occur every nth month. + */ + public int getMonthInterval() { + return this.monthInterval == null || this.monthInterval.isEmpty() ? 0 : this.monthInterval.getValue(); + } + + /** + * @param value Indicates that recurring appointments should occur every nth month. + */ + public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthInterval(int value) { + if (this.monthInterval == null) + this.monthInterval = new PositiveIntType(); + this.monthInterval.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth)); + children.add(new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth)); + children.add(new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek)); + children.add(new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1181204563: /*dayOfMonth*/ return new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth); + case 724728723: /*nthWeekOfMonth*/ return new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth); + case -730552025: /*dayOfWeek*/ return new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek); + case -251401371: /*monthInterval*/ return new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1181204563: /*dayOfMonth*/ return this.dayOfMonth == null ? new Base[0] : new Base[] {this.dayOfMonth}; // PositiveIntType + case 724728723: /*nthWeekOfMonth*/ return this.nthWeekOfMonth == null ? new Base[0] : new Base[] {this.nthWeekOfMonth}; // Coding + case -730552025: /*dayOfWeek*/ return this.dayOfWeek == null ? new Base[0] : new Base[] {this.dayOfWeek}; // Coding + case -251401371: /*monthInterval*/ return this.monthInterval == null ? new Base[0] : new Base[] {this.monthInterval}; // PositiveIntType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1181204563: // dayOfMonth + this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case 724728723: // nthWeekOfMonth + this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding + return value; + case -730552025: // dayOfWeek + this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding + return value; + case -251401371: // monthInterval + this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("dayOfMonth")) { + this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("nthWeekOfMonth")) { + this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding + } else if (name.equals("dayOfWeek")) { + this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding + } else if (name.equals("monthInterval")) { + this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("dayOfMonth")) { + this.dayOfMonth = null; + } else if (name.equals("nthWeekOfMonth")) { + this.nthWeekOfMonth = null; + } else if (name.equals("dayOfWeek")) { + this.dayOfWeek = null; + } else if (name.equals("monthInterval")) { + this.monthInterval = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1181204563: return getDayOfMonthElement(); + case 724728723: return getNthWeekOfMonth(); + case -730552025: return getDayOfWeek(); + case -251401371: return getMonthIntervalElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1181204563: /*dayOfMonth*/ return new String[] {"positiveInt"}; + case 724728723: /*nthWeekOfMonth*/ return new String[] {"Coding"}; + case -730552025: /*dayOfWeek*/ return new String[] {"Coding"}; + case -251401371: /*monthInterval*/ return new String[] {"positiveInt"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("dayOfMonth")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.monthlyTemplate.dayOfMonth"); + } + else if (name.equals("nthWeekOfMonth")) { + this.nthWeekOfMonth = new Coding(); + return this.nthWeekOfMonth; + } + else if (name.equals("dayOfWeek")) { + this.dayOfWeek = new Coding(); + return this.dayOfWeek; + } + else if (name.equals("monthInterval")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.monthlyTemplate.monthInterval"); + } + else + return super.addChild(name); + } + + public AppointmentRecurrenceTemplateMonthlyTemplateComponent copy() { + AppointmentRecurrenceTemplateMonthlyTemplateComponent dst = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AppointmentRecurrenceTemplateMonthlyTemplateComponent dst) { + super.copyValues(dst); + dst.dayOfMonth = dayOfMonth == null ? null : dayOfMonth.copy(); + dst.nthWeekOfMonth = nthWeekOfMonth == null ? null : nthWeekOfMonth.copy(); + dst.dayOfWeek = dayOfWeek == null ? null : dayOfWeek.copy(); + dst.monthInterval = monthInterval == null ? null : monthInterval.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; + return compareDeep(dayOfMonth, o.dayOfMonth, true) && compareDeep(nthWeekOfMonth, o.nthWeekOfMonth, true) + && compareDeep(dayOfWeek, o.dayOfWeek, true) && compareDeep(monthInterval, o.monthInterval, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; + return compareValues(dayOfMonth, o.dayOfMonth, true) && compareValues(monthInterval, o.monthInterval, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(dayOfMonth, nthWeekOfMonth + , dayOfWeek, monthInterval); + } + + public String fhirType() { + return "Appointment.recurrenceTemplate.monthlyTemplate"; + + } + + } + + @Block() + public static class AppointmentRecurrenceTemplateYearlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Appointment recurs every nth year. + */ + @Child(name = "yearInterval", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Recurs every nth year", formalDefinition="Appointment recurs every nth year." ) + protected PositiveIntType yearInterval; + + private static final long serialVersionUID = -120794476L; + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateYearlyTemplateComponent() { + super(); + } + + /** + * Constructor + */ + public AppointmentRecurrenceTemplateYearlyTemplateComponent(int yearInterval) { + super(); + this.setYearInterval(yearInterval); + } + + /** + * @return {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value + */ + public PositiveIntType getYearIntervalElement() { + if (this.yearInterval == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateYearlyTemplateComponent.yearInterval"); + else if (Configuration.doAutoCreate()) + this.yearInterval = new PositiveIntType(); // bb + return this.yearInterval; + } + + public boolean hasYearIntervalElement() { + return this.yearInterval != null && !this.yearInterval.isEmpty(); + } + + public boolean hasYearInterval() { + return this.yearInterval != null && !this.yearInterval.isEmpty(); + } + + /** + * @param value {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value + */ + public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearIntervalElement(PositiveIntType value) { + this.yearInterval = value; + return this; + } + + /** + * @return Appointment recurs every nth year. + */ + public int getYearInterval() { + return this.yearInterval == null || this.yearInterval.isEmpty() ? 0 : this.yearInterval.getValue(); + } + + /** + * @param value Appointment recurs every nth year. + */ + public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearInterval(int value) { + if (this.yearInterval == null) + this.yearInterval = new PositiveIntType(); + this.yearInterval.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 492389410: /*yearInterval*/ return new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 492389410: /*yearInterval*/ return this.yearInterval == null ? new Base[0] : new Base[] {this.yearInterval}; // PositiveIntType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 492389410: // yearInterval + this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("yearInterval")) { + this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("yearInterval")) { + this.yearInterval = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 492389410: return getYearIntervalElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 492389410: /*yearInterval*/ return new String[] {"positiveInt"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("yearInterval")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceTemplate.yearlyTemplate.yearInterval"); + } + else + return super.addChild(name); + } + + public AppointmentRecurrenceTemplateYearlyTemplateComponent copy() { + AppointmentRecurrenceTemplateYearlyTemplateComponent dst = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(AppointmentRecurrenceTemplateYearlyTemplateComponent dst) { + super.copyValues(dst); + dst.yearInterval = yearInterval == null ? null : yearInterval.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; + return compareDeep(yearInterval, o.yearInterval, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) + return false; + AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; + return compareValues(yearInterval, o.yearInterval, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(yearInterval); + } + + public String fhirType() { + return "Appointment.recurrenceTemplate.yearlyTemplate"; + + } + + } + + /** + * 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). + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this item", formalDefinition="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)." ) + protected List identifier; + + /** + * 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. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist", formalDefinition="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." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointmentstatus") + protected Enumeration status; + + /** + * The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply. + */ + @Child(name = "cancellationReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The coded reason for the appointment being cancelled", formalDefinition="The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-cancellation-reason") + protected CodeableConcept cancellationReason; + + /** + * Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations. + */ + @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Classification when becoming an encounter", formalDefinition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/EncounterClass") + protected List class_; + + /** + * A broad categorization of the service that is to be performed during this appointment. + */ + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A broad categorization of the service that is to be performed during this appointment", formalDefinition="A broad categorization of the service that is to be performed during this appointment." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category") + protected List serviceCategory; + + /** + * The specific service that is to be performed during this appointment. + */ + @Child(name = "serviceType", type = {CodeableReference.class}, order=5, 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." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-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=6, 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." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes") + 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=7, 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)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0276") + protected CodeableConcept appointmentType; + + /** + * The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure. + */ + @Child(name = "reason", type = {CodeableReference.class}, order=8, min=0, max=Child.MAX_UNLIMITED, 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. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason") + protected List 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 = {CodeableConcept.class}, order=9, 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)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActPriority") + protected CodeableConcept 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 note field. + */ + @Child(name = "description", type = {StringType.class}, order=10, 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 note field." ) + protected StringType description; + + /** + * Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource). + */ + @Child(name = "replaces", type = {Appointment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Appointment replaced by this Appointment", formalDefinition="Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource)." ) + protected List replaces; + + /** + * Connection details of a virtual service (e.g. conference call). + */ + @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. conference call)." ) + protected List virtualService; + + /** + * Additional information to support the appointment provided when making the appointment. + */ + @Child(name = "supportingInformation", type = {Reference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional information to support the appointment", formalDefinition="Additional information to support the appointment provided when making the appointment." ) + protected List supportingInformation; + + /** + * The previous appointment in a series of related appointments. + */ + @Child(name = "previousAppointment", type = {Appointment.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The previous appointment in a series", formalDefinition="The previous appointment in a series of related appointments." ) + protected Reference previousAppointment; + + /** + * The originating appointment in a recurring set of related appointments. + */ + @Child(name = "originatingAppointment", type = {Appointment.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The originating appointment in a recurring set of appointments", formalDefinition="The originating appointment in a recurring set of related appointments." ) + protected Reference originatingAppointment; + + /** + * Date/Time that the appointment is to take place. + */ + @Child(name = "start", type = {InstantType.class}, order=16, 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=17, 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. + */ + @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=18, 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end." ) + protected PositiveIntType minutesDuration; + + /** * A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. -The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system. - */ - @Child(name = "requestedPeriod", type = {Period.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Potential date/time interval(s) requested to allocate the appointment within", formalDefinition="A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system." ) - protected List requestedPeriod; - - /** - * The slots from the participants' schedules that will be filled by the appointment. - */ - @Child(name = "slot", type = {Slot.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The slots that this appointment is filling", formalDefinition="The slots from the participants' schedules that will be filled by the appointment." ) - protected List slot; - - /** - * The set of accounts that is expected to be used for billing the activities that result from this Appointment. - */ - @Child(name = "account", type = {Account.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The set of accounts that may be used for billing for this Appointment", formalDefinition="The set of accounts that is expected to be used for billing the activities that result from this Appointment." ) - protected List account; - - /** - * 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=22, 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; - - /** - * The date/time describing when the appointment was cancelled. - */ - @Child(name = "cancellationDate", type = {DateTimeType.class}, order=23, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="When the appointment was cancelled", formalDefinition="The date/time describing when the appointment was cancelled." ) - protected DateTimeType cancellationDate; - - /** - * Additional notes/comments about the appointment. - */ - @Child(name = "note", type = {Annotation.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Additional comments", formalDefinition="Additional notes/comments about the appointment." ) - protected List note; - - /** - * While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before). - */ - @Child(name = "patientInstruction", type = {CodeableReference.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Detailed information and instructions for the patient", formalDefinition="While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before)." ) - protected List patientInstruction; - - /** - * The request this appointment is allocated to assess (e.g. incoming referral or procedure request). - */ - @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The request this appointment is allocated to assess", formalDefinition="The request this appointment is allocated to assess (e.g. incoming referral or procedure request)." ) - protected List basedOn; - - /** - * The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element. - */ - @Child(name = "subject", type = {Patient.class, Group.class}, order=27, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The patient or group associated with the appointment", formalDefinition="The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element." ) - protected Reference subject; - - /** - * List of participants involved in the appointment. - */ - @Child(name = "participant", type = {}, order=28, 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; - - /** - * The sequence number that identifies a specific appointment in a recurring pattern. - */ - @Child(name = "recurrenceId", type = {PositiveIntType.class}, order=29, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The sequence number in the recurrence", formalDefinition="The sequence number that identifies a specific appointment in a recurring pattern." ) - protected PositiveIntType recurrenceId; - - /** - * This appointment varies from the recurring pattern. - */ - @Child(name = "occurrenceChanged", type = {BooleanType.class}, order=30, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Indicates that this appointment varies from a recurrence pattern", formalDefinition="This appointment varies from the recurring pattern." ) - protected BooleanType occurrenceChanged; - - /** - * The details of the recurrence pattern or template that is used to generate recurring appointments. - */ - @Child(name = "recurrenceTemplate", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Details of the recurrence pattern/template used to generate occurrences", formalDefinition="The details of the recurrence pattern or template that is used to generate recurring appointments." ) - protected List recurrenceTemplate; - - private static final long serialVersionUID = 883088259L; - - /** - * Constructor - */ - public Appointment() { - super(); - } - - /** - * Constructor - */ - public Appointment(AppointmentStatus status, AppointmentParticipantComponent participant) { - super(); - this.setStatus(status); - this.addParticipant(participant); - } - - /** - * @return {@link #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).) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setIdentifier(List theIdentifier) { - this.identifier = theIdentifier; - return this; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - public Appointment addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} - */ - public Identifier getIdentifierFirstRep() { - if (getIdentifier().isEmpty()) { - addIdentifier(); - } - return getIdentifier().get(0); - } - - /** - * @return {@link #status} (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.). 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 Appointment.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new AppointmentStatusEnumFactory()); // 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 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.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Appointment setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return 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. - */ - public AppointmentStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value 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. - */ - public Appointment setStatus(AppointmentStatus value) { - if (this.status == null) - this.status = new Enumeration(new AppointmentStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) - */ - public CodeableConcept getCancellationReason() { - if (this.cancellationReason == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.cancellationReason"); - else if (Configuration.doAutoCreate()) - this.cancellationReason = new CodeableConcept(); // cc - return this.cancellationReason; - } - - public boolean hasCancellationReason() { - return this.cancellationReason != null && !this.cancellationReason.isEmpty(); - } - - /** - * @param value {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) - */ - public Appointment setCancellationReason(CodeableConcept value) { - this.cancellationReason = value; - return this; - } - - /** - * @return {@link #class_} (Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.) - */ - public List getClass_() { - if (this.class_ == null) - this.class_ = new ArrayList(); - return this.class_; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setClass_(List theClass_) { - this.class_ = theClass_; - return this; - } - - public boolean hasClass_() { - if (this.class_ == null) - return false; - for (CodeableConcept item : this.class_) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addClass_() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.class_ == null) - this.class_ = new ArrayList(); - this.class_.add(t); - return t; - } - - public Appointment addClass_(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.class_ == null) - this.class_ = new ArrayList(); - this.class_.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} - */ - public CodeableConcept getClass_FirstRep() { - if (getClass_().isEmpty()) { - addClass_(); - } - return getClass_().get(0); - } - - /** - * @return {@link #serviceCategory} (A broad categorization of the service that is to be performed during this appointment.) - */ - public List getServiceCategory() { - if (this.serviceCategory == null) - this.serviceCategory = new ArrayList(); - return this.serviceCategory; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setServiceCategory(List theServiceCategory) { - this.serviceCategory = theServiceCategory; - return this; - } - - public boolean hasServiceCategory() { - if (this.serviceCategory == null) - return false; - for (CodeableConcept item : this.serviceCategory) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addServiceCategory() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.serviceCategory == null) - this.serviceCategory = new ArrayList(); - this.serviceCategory.add(t); - return t; - } - - public Appointment addServiceCategory(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.serviceCategory == null) - this.serviceCategory = new ArrayList(); - this.serviceCategory.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #serviceCategory}, creating it if it does not already exist {3} - */ - public CodeableConcept getServiceCategoryFirstRep() { - if (getServiceCategory().isEmpty()) { - addServiceCategory(); - } - return getServiceCategory().get(0); - } - - /** - * @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; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setServiceType(List theServiceType) { - this.serviceType = theServiceType; - return this; - } - - public boolean hasServiceType() { - if (this.serviceType == null) - return false; - for (CodeableReference item : this.serviceType) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addServiceType() { //3 - CodeableReference t = new CodeableReference(); - if (this.serviceType == null) - this.serviceType = new ArrayList(); - this.serviceType.add(t); - return t; - } - - public Appointment addServiceType(CodeableReference t) { //3 - if (t == null) - return this; - if (this.serviceType == null) - this.serviceType = new ArrayList(); - this.serviceType.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist {3} - */ - public CodeableReference getServiceTypeFirstRep() { - if (getServiceType().isEmpty()) { - addServiceType(); - } - return getServiceType().get(0); - } - - /** - * @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; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setSpecialty(List theSpecialty) { - this.specialty = theSpecialty; - return this; - } - - public boolean hasSpecialty() { - if (this.specialty == null) - return false; - for (CodeableConcept item : this.specialty) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addSpecialty() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialty == null) - this.specialty = new ArrayList(); - this.specialty.add(t); - return t; - } - - 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 The first repetition of repeating field {@link #specialty}, creating it if it does not already exist {3} - */ - public CodeableConcept getSpecialtyFirstRep() { - if (getSpecialty().isEmpty()) { - addSpecialty(); - } - return getSpecialty().get(0); - } - - /** - * @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; - } - - /** - * @return {@link #reason} (The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) - */ - public List getReason() { - if (this.reason == null) - this.reason = new ArrayList(); - return this.reason; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setReason(List theReason) { - this.reason = theReason; - return this; - } - - public boolean hasReason() { - if (this.reason == null) - return false; - for (CodeableReference item : this.reason) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addReason() { //3 - CodeableReference t = new CodeableReference(); - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return t; - } - - public Appointment addReason(CodeableReference t) { //3 - if (t == null) - return this; - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} - */ - public CodeableReference getReasonFirstRep() { - if (getReason().isEmpty()) { - addReason(); - } - return getReason().get(0); - } - - /** - * @return {@link #priority} (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).) - */ - public CodeableConcept getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new CodeableConcept(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (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).) - */ - public Appointment setPriority(CodeableConcept value) { - this.priority = value; - return this; - } - - /** - * @return {@link #description} (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 note field.). 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 Appointment.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 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 note field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public Appointment setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return 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 note field. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value 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 note field. - */ - public Appointment 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 #replaces} (Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).) - */ - public List getReplaces() { - if (this.replaces == null) - this.replaces = new ArrayList(); - return this.replaces; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setReplaces(List theReplaces) { - this.replaces = theReplaces; - return this; - } - - public boolean hasReplaces() { - if (this.replaces == null) - return false; - for (Reference item : this.replaces) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addReplaces() { //3 - Reference t = new Reference(); - if (this.replaces == null) - this.replaces = new ArrayList(); - this.replaces.add(t); - return t; - } - - public Appointment addReplaces(Reference t) { //3 - if (t == null) - return this; - if (this.replaces == null) - this.replaces = new ArrayList(); - this.replaces.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3} - */ - public Reference getReplacesFirstRep() { - if (getReplaces().isEmpty()) { - addReplaces(); - } - return getReplaces().get(0); - } - - /** - * @return {@link #virtualService} (Connection details of a virtual service (e.g. conference call).) - */ - public List getVirtualService() { - if (this.virtualService == null) - this.virtualService = new ArrayList(); - return this.virtualService; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setVirtualService(List theVirtualService) { - this.virtualService = theVirtualService; - return this; - } - - public boolean hasVirtualService() { - if (this.virtualService == null) - return false; - for (VirtualServiceDetail item : this.virtualService) - if (!item.isEmpty()) - return true; - return false; - } - - public VirtualServiceDetail addVirtualService() { //3 - VirtualServiceDetail t = new VirtualServiceDetail(); - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return t; - } - - public Appointment addVirtualService(VirtualServiceDetail t) { //3 - if (t == null) - return this; - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} - */ - public VirtualServiceDetail getVirtualServiceFirstRep() { - if (getVirtualService().isEmpty()) { - addVirtualService(); - } - return getVirtualService().get(0); - } - - /** - * @return {@link #supportingInformation} (Additional information to support the appointment provided when making the appointment.) - */ - public List getSupportingInformation() { - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - return this.supportingInformation; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setSupportingInformation(List theSupportingInformation) { - this.supportingInformation = theSupportingInformation; - return this; - } - - public boolean hasSupportingInformation() { - if (this.supportingInformation == null) - return false; - for (Reference item : this.supportingInformation) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addSupportingInformation() { //3 - Reference t = new Reference(); - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return t; - } - - public Appointment addSupportingInformation(Reference t) { //3 - if (t == null) - return this; - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} - */ - public Reference getSupportingInformationFirstRep() { - if (getSupportingInformation().isEmpty()) { - addSupportingInformation(); - } - return getSupportingInformation().get(0); - } - - /** - * @return {@link #previousAppointment} (The previous appointment in a series of related appointments.) - */ - public Reference getPreviousAppointment() { - if (this.previousAppointment == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.previousAppointment"); - else if (Configuration.doAutoCreate()) - this.previousAppointment = new Reference(); // cc - return this.previousAppointment; - } - - public boolean hasPreviousAppointment() { - return this.previousAppointment != null && !this.previousAppointment.isEmpty(); - } - - /** - * @param value {@link #previousAppointment} (The previous appointment in a series of related appointments.) - */ - public Appointment setPreviousAppointment(Reference value) { - this.previousAppointment = value; - return this; - } - - /** - * @return {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) - */ - public Reference getOriginatingAppointment() { - if (this.originatingAppointment == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.originatingAppointment"); - else if (Configuration.doAutoCreate()) - this.originatingAppointment = new Reference(); // cc - return this.originatingAppointment; - } - - public boolean hasOriginatingAppointment() { - return this.originatingAppointment != null && !this.originatingAppointment.isEmpty(); - } - - /** - * @param value {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) - */ - public Appointment setOriginatingAppointment(Reference value) { - this.originatingAppointment = value; - return this; - } - - /** - * @return {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public InstantType getStartElement() { - if (this.start == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.start"); - else if (Configuration.doAutoCreate()) - this.start = new InstantType(); // 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} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public Appointment setStartElement(InstantType value) { - this.start = value; - return this; - } - - /** - * @return Date/Time that the appointment is to take place. - */ - public Date getStart() { - return this.start == null ? null : this.start.getValue(); - } - - /** - * @param value Date/Time that the appointment is to take place. - */ - public Appointment setStart(Date value) { - if (value == null) - this.start = null; - else { - if (this.start == null) - this.start = new InstantType(); - this.start.setValue(value); - } - return this; - } - - /** - * @return {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public InstantType getEndElement() { - if (this.end == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.end"); - else if (Configuration.doAutoCreate()) - this.end = new InstantType(); // 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} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public Appointment setEndElement(InstantType value) { - this.end = value; - return this; - } - - /** - * @return Date/Time that the appointment is to conclude. - */ - public Date getEnd() { - return this.end == null ? null : this.end.getValue(); - } - - /** - * @param value Date/Time that the appointment is to conclude. - */ - public Appointment setEnd(Date value) { - if (value == null) - this.end = null; - else { - if (this.end == null) - this.end = new InstantType(); - this.end.setValue(value); - } - return this; - } - - /** - * @return {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value - */ - public PositiveIntType getMinutesDurationElement() { - if (this.minutesDuration == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.minutesDuration"); - else if (Configuration.doAutoCreate()) - this.minutesDuration = new PositiveIntType(); // bb - return this.minutesDuration; - } - - public boolean hasMinutesDurationElement() { - return this.minutesDuration != null && !this.minutesDuration.isEmpty(); - } - - public boolean hasMinutesDuration() { - return this.minutesDuration != null && !this.minutesDuration.isEmpty(); - } - - /** - * @param value {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value - */ - public Appointment setMinutesDurationElement(PositiveIntType value) { - this.minutesDuration = value; - return this; - } - - /** - * @return Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. - */ - public int getMinutesDuration() { - return this.minutesDuration == null || this.minutesDuration.isEmpty() ? 0 : this.minutesDuration.getValue(); - } - - /** - * @param value Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. - */ - public Appointment setMinutesDuration(int value) { - if (this.minutesDuration == null) - this.minutesDuration = new PositiveIntType(); - this.minutesDuration.setValue(value); - return this; - } - - /** +The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system. + */ + @Child(name = "requestedPeriod", type = {Period.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Potential date/time interval(s) requested to allocate the appointment within", formalDefinition="A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system." ) + protected List requestedPeriod; + + /** + * The slots from the participants' schedules that will be filled by the appointment. + */ + @Child(name = "slot", type = {Slot.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The slots that this appointment is filling", formalDefinition="The slots from the participants' schedules that will be filled by the appointment." ) + protected List slot; + + /** + * The set of accounts that is expected to be used for billing the activities that result from this Appointment. + */ + @Child(name = "account", type = {Account.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The set of accounts that may be used for billing for this Appointment", formalDefinition="The set of accounts that is expected to be used for billing the activities that result from this Appointment." ) + protected List account; + + /** + * 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=22, 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; + + /** + * The date/time describing when the appointment was cancelled. + */ + @Child(name = "cancellationDate", type = {DateTimeType.class}, order=23, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="When the appointment was cancelled", formalDefinition="The date/time describing when the appointment was cancelled." ) + protected DateTimeType cancellationDate; + + /** + * Additional notes/comments about the appointment. + */ + @Child(name = "note", type = {Annotation.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional comments", formalDefinition="Additional notes/comments about the appointment." ) + protected List note; + + /** + * While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before). + */ + @Child(name = "patientInstruction", type = {CodeableReference.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Detailed information and instructions for the patient", formalDefinition="While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before)." ) + protected List patientInstruction; + + /** + * The request this appointment is allocated to assess (e.g. incoming referral or procedure request). + */ + @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The request this appointment is allocated to assess", formalDefinition="The request this appointment is allocated to assess (e.g. incoming referral or procedure request)." ) + protected List basedOn; + + /** + * The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=27, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The patient or group associated with the appointment", formalDefinition="The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element." ) + protected Reference subject; + + /** + * List of participants involved in the appointment. + */ + @Child(name = "participant", type = {}, order=28, 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; + + /** + * The sequence number that identifies a specific appointment in a recurring pattern. + */ + @Child(name = "recurrenceId", type = {PositiveIntType.class}, order=29, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The sequence number in the recurrence", formalDefinition="The sequence number that identifies a specific appointment in a recurring pattern." ) + protected PositiveIntType recurrenceId; + + /** + * This appointment varies from the recurring pattern. + */ + @Child(name = "occurrenceChanged", type = {BooleanType.class}, order=30, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates that this appointment varies from a recurrence pattern", formalDefinition="This appointment varies from the recurring pattern." ) + protected BooleanType occurrenceChanged; + + /** + * The details of the recurrence pattern or template that is used to generate recurring appointments. + */ + @Child(name = "recurrenceTemplate", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Details of the recurrence pattern/template used to generate occurrences", formalDefinition="The details of the recurrence pattern or template that is used to generate recurring appointments." ) + protected List recurrenceTemplate; + + private static final long serialVersionUID = 883088259L; + + /** + * Constructor + */ + public Appointment() { + super(); + } + + /** + * Constructor + */ + public Appointment(AppointmentStatus status, AppointmentParticipantComponent participant) { + super(); + this.setStatus(status); + this.addParticipant(participant); + } + + /** + * @return {@link #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).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public Appointment addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #status} (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.). 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 Appointment.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new AppointmentStatusEnumFactory()); // 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 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.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Appointment setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return 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. + */ + public AppointmentStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value 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. + */ + public Appointment setStatus(AppointmentStatus value) { + if (this.status == null) + this.status = new Enumeration(new AppointmentStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) + */ + public CodeableConcept getCancellationReason() { + if (this.cancellationReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.cancellationReason"); + else if (Configuration.doAutoCreate()) + this.cancellationReason = new CodeableConcept(); // cc + return this.cancellationReason; + } + + public boolean hasCancellationReason() { + return this.cancellationReason != null && !this.cancellationReason.isEmpty(); + } + + /** + * @param value {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) + */ + public Appointment setCancellationReason(CodeableConcept value) { + this.cancellationReason = value; + return this; + } + + /** + * @return {@link #class_} (Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.) + */ + public List getClass_() { + if (this.class_ == null) + this.class_ = new ArrayList(); + return this.class_; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setClass_(List theClass_) { + this.class_ = theClass_; + return this; + } + + public boolean hasClass_() { + if (this.class_ == null) + return false; + for (CodeableConcept item : this.class_) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addClass_() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.class_ == null) + this.class_ = new ArrayList(); + this.class_.add(t); + return t; + } + + public Appointment addClass_(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.class_ == null) + this.class_ = new ArrayList(); + this.class_.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} + */ + public CodeableConcept getClass_FirstRep() { + if (getClass_().isEmpty()) { + addClass_(); + } + return getClass_().get(0); + } + + /** + * @return {@link #serviceCategory} (A broad categorization of the service that is to be performed during this appointment.) + */ + public List getServiceCategory() { + if (this.serviceCategory == null) + this.serviceCategory = new ArrayList(); + return this.serviceCategory; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setServiceCategory(List theServiceCategory) { + this.serviceCategory = theServiceCategory; + return this; + } + + public boolean hasServiceCategory() { + if (this.serviceCategory == null) + return false; + for (CodeableConcept item : this.serviceCategory) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addServiceCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.serviceCategory == null) + this.serviceCategory = new ArrayList(); + this.serviceCategory.add(t); + return t; + } + + public Appointment addServiceCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.serviceCategory == null) + this.serviceCategory = new ArrayList(); + this.serviceCategory.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #serviceCategory}, creating it if it does not already exist {3} + */ + public CodeableConcept getServiceCategoryFirstRep() { + if (getServiceCategory().isEmpty()) { + addServiceCategory(); + } + return getServiceCategory().get(0); + } + + /** + * @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; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setServiceType(List theServiceType) { + this.serviceType = theServiceType; + return this; + } + + public boolean hasServiceType() { + if (this.serviceType == null) + return false; + for (CodeableReference item : this.serviceType) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addServiceType() { //3 + CodeableReference t = new CodeableReference(); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return t; + } + + public Appointment addServiceType(CodeableReference t) { //3 + if (t == null) + return this; + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist {3} + */ + public CodeableReference getServiceTypeFirstRep() { + if (getServiceType().isEmpty()) { + addServiceType(); + } + return getServiceType().get(0); + } + + /** + * @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; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setSpecialty(List theSpecialty) { + this.specialty = theSpecialty; + return this; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + 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 The first repetition of repeating field {@link #specialty}, creating it if it does not already exist {3} + */ + public CodeableConcept getSpecialtyFirstRep() { + if (getSpecialty().isEmpty()) { + addSpecialty(); + } + return getSpecialty().get(0); + } + + /** + * @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; + } + + /** + * @return {@link #reason} (The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setReason(List theReason) { + this.reason = theReason; + return this; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableReference item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addReason() { //3 + CodeableReference t = new CodeableReference(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + public Appointment addReason(CodeableReference t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} + */ + public CodeableReference getReasonFirstRep() { + if (getReason().isEmpty()) { + addReason(); + } + return getReason().get(0); + } + + /** + * @return {@link #priority} (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).) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (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).) + */ + public Appointment setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + /** + * @return {@link #description} (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 note field.). 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 Appointment.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 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 note field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Appointment setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return 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 note field. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value 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 note field. + */ + public Appointment 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 #replaces} (Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).) + */ + public List getReplaces() { + if (this.replaces == null) + this.replaces = new ArrayList(); + return this.replaces; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setReplaces(List theReplaces) { + this.replaces = theReplaces; + return this; + } + + public boolean hasReplaces() { + if (this.replaces == null) + return false; + for (Reference item : this.replaces) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addReplaces() { //3 + Reference t = new Reference(); + if (this.replaces == null) + this.replaces = new ArrayList(); + this.replaces.add(t); + return t; + } + + public Appointment addReplaces(Reference t) { //3 + if (t == null) + return this; + if (this.replaces == null) + this.replaces = new ArrayList(); + this.replaces.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3} + */ + public Reference getReplacesFirstRep() { + if (getReplaces().isEmpty()) { + addReplaces(); + } + return getReplaces().get(0); + } + + /** + * @return {@link #virtualService} (Connection details of a virtual service (e.g. conference call).) + */ + public List getVirtualService() { + if (this.virtualService == null) + this.virtualService = new ArrayList(); + return this.virtualService; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setVirtualService(List theVirtualService) { + this.virtualService = theVirtualService; + return this; + } + + public boolean hasVirtualService() { + if (this.virtualService == null) + return false; + for (VirtualServiceDetail item : this.virtualService) + if (!item.isEmpty()) + return true; + return false; + } + + public VirtualServiceDetail addVirtualService() { //3 + VirtualServiceDetail t = new VirtualServiceDetail(); + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return t; + } + + public Appointment addVirtualService(VirtualServiceDetail t) { //3 + if (t == null) + return this; + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} + */ + public VirtualServiceDetail getVirtualServiceFirstRep() { + if (getVirtualService().isEmpty()) { + addVirtualService(); + } + return getVirtualService().get(0); + } + + /** + * @return {@link #supportingInformation} (Additional information to support the appointment provided when making the appointment.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setSupportingInformation(List theSupportingInformation) { + this.supportingInformation = theSupportingInformation; + return this; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + public Appointment addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} + */ + public Reference getSupportingInformationFirstRep() { + if (getSupportingInformation().isEmpty()) { + addSupportingInformation(); + } + return getSupportingInformation().get(0); + } + + /** + * @return {@link #previousAppointment} (The previous appointment in a series of related appointments.) + */ + public Reference getPreviousAppointment() { + if (this.previousAppointment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.previousAppointment"); + else if (Configuration.doAutoCreate()) + this.previousAppointment = new Reference(); // cc + return this.previousAppointment; + } + + public boolean hasPreviousAppointment() { + return this.previousAppointment != null && !this.previousAppointment.isEmpty(); + } + + /** + * @param value {@link #previousAppointment} (The previous appointment in a series of related appointments.) + */ + public Appointment setPreviousAppointment(Reference value) { + this.previousAppointment = value; + return this; + } + + /** + * @return {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) + */ + public Reference getOriginatingAppointment() { + if (this.originatingAppointment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.originatingAppointment"); + else if (Configuration.doAutoCreate()) + this.originatingAppointment = new Reference(); // cc + return this.originatingAppointment; + } + + public boolean hasOriginatingAppointment() { + return this.originatingAppointment != null && !this.originatingAppointment.isEmpty(); + } + + /** + * @param value {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) + */ + public Appointment setOriginatingAppointment(Reference value) { + this.originatingAppointment = value; + return this; + } + + /** + * @return {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public InstantType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.start"); + else if (Configuration.doAutoCreate()) + this.start = new InstantType(); // 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} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public Appointment setStartElement(InstantType value) { + this.start = value; + return this; + } + + /** + * @return Date/Time that the appointment is to take place. + */ + public Date getStart() { + return this.start == null ? null : this.start.getValue(); + } + + /** + * @param value Date/Time that the appointment is to take place. + */ + public Appointment setStart(Date value) { + if (value == null) + this.start = null; + else { + if (this.start == null) + this.start = new InstantType(); + this.start.setValue(value); + } + return this; + } + + /** + * @return {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public InstantType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.end"); + else if (Configuration.doAutoCreate()) + this.end = new InstantType(); // 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} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public Appointment setEndElement(InstantType value) { + this.end = value; + return this; + } + + /** + * @return Date/Time that the appointment is to conclude. + */ + public Date getEnd() { + return this.end == null ? null : this.end.getValue(); + } + + /** + * @param value Date/Time that the appointment is to conclude. + */ + public Appointment setEnd(Date value) { + if (value == null) + this.end = null; + else { + if (this.end == null) + this.end = new InstantType(); + this.end.setValue(value); + } + return this; + } + + /** + * @return {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value + */ + public PositiveIntType getMinutesDurationElement() { + if (this.minutesDuration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.minutesDuration"); + else if (Configuration.doAutoCreate()) + this.minutesDuration = new PositiveIntType(); // bb + return this.minutesDuration; + } + + public boolean hasMinutesDurationElement() { + return this.minutesDuration != null && !this.minutesDuration.isEmpty(); + } + + public boolean hasMinutesDuration() { + return this.minutesDuration != null && !this.minutesDuration.isEmpty(); + } + + /** + * @param value {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value + */ + public Appointment setMinutesDurationElement(PositiveIntType value) { + this.minutesDuration = value; + return this; + } + + /** + * @return Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. + */ + public int getMinutesDuration() { + return this.minutesDuration == null || this.minutesDuration.isEmpty() ? 0 : this.minutesDuration.getValue(); + } + + /** + * @param value Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. + */ + public Appointment setMinutesDuration(int value) { + if (this.minutesDuration == null) + this.minutesDuration = new PositiveIntType(); + this.minutesDuration.setValue(value); + return this; + } + + /** * @return {@link #requestedPeriod} (A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. -The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.) - */ - public List getRequestedPeriod() { - if (this.requestedPeriod == null) - this.requestedPeriod = new ArrayList(); - return this.requestedPeriod; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setRequestedPeriod(List theRequestedPeriod) { - this.requestedPeriod = theRequestedPeriod; - return this; - } - - public boolean hasRequestedPeriod() { - if (this.requestedPeriod == null) - return false; - for (Period item : this.requestedPeriod) - if (!item.isEmpty()) - return true; - return false; - } - - public Period addRequestedPeriod() { //3 - Period t = new Period(); - if (this.requestedPeriod == null) - this.requestedPeriod = new ArrayList(); - this.requestedPeriod.add(t); - return t; - } - - public Appointment addRequestedPeriod(Period t) { //3 - if (t == null) - return this; - if (this.requestedPeriod == null) - this.requestedPeriod = new ArrayList(); - this.requestedPeriod.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #requestedPeriod}, creating it if it does not already exist {3} - */ - public Period getRequestedPeriodFirstRep() { - if (getRequestedPeriod().isEmpty()) { - addRequestedPeriod(); - } - return getRequestedPeriod().get(0); - } - - /** - * @return {@link #slot} (The slots from the participants' schedules that will be filled by the appointment.) - */ - public List getSlot() { - if (this.slot == null) - this.slot = new ArrayList(); - return this.slot; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setSlot(List theSlot) { - this.slot = theSlot; - return this; - } - - public boolean hasSlot() { - if (this.slot == null) - return false; - for (Reference item : this.slot) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addSlot() { //3 - Reference t = new Reference(); - if (this.slot == null) - this.slot = new ArrayList(); - this.slot.add(t); - return t; - } - - public Appointment addSlot(Reference t) { //3 - if (t == null) - return this; - if (this.slot == null) - this.slot = new ArrayList(); - this.slot.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #slot}, creating it if it does not already exist {3} - */ - public Reference getSlotFirstRep() { - if (getSlot().isEmpty()) { - addSlot(); - } - return getSlot().get(0); - } - - /** - * @return {@link #account} (The set of accounts that is expected to be used for billing the activities that result from this Appointment.) - */ - public List getAccount() { - if (this.account == null) - this.account = new ArrayList(); - return this.account; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setAccount(List theAccount) { - this.account = theAccount; - return this; - } - - public boolean hasAccount() { - if (this.account == null) - return false; - for (Reference item : this.account) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addAccount() { //3 - Reference t = new Reference(); - if (this.account == null) - this.account = new ArrayList(); - this.account.add(t); - return t; - } - - public Appointment addAccount(Reference t) { //3 - if (t == null) - return this; - if (this.account == null) - this.account = new ArrayList(); - this.account.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3} - */ - public Reference getAccountFirstRep() { - if (getAccount().isEmpty()) { - addAccount(); - } - return getAccount().get(0); - } - - /** - * @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 #cancellationDate} (The date/time describing when the appointment was cancelled.). This is the underlying object with id, value and extensions. The accessor "getCancellationDate" gives direct access to the value - */ - public DateTimeType getCancellationDateElement() { - if (this.cancellationDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.cancellationDate"); - else if (Configuration.doAutoCreate()) - this.cancellationDate = new DateTimeType(); // bb - return this.cancellationDate; - } - - public boolean hasCancellationDateElement() { - return this.cancellationDate != null && !this.cancellationDate.isEmpty(); - } - - public boolean hasCancellationDate() { - return this.cancellationDate != null && !this.cancellationDate.isEmpty(); - } - - /** - * @param value {@link #cancellationDate} (The date/time describing when the appointment was cancelled.). This is the underlying object with id, value and extensions. The accessor "getCancellationDate" gives direct access to the value - */ - public Appointment setCancellationDateElement(DateTimeType value) { - this.cancellationDate = value; - return this; - } - - /** - * @return The date/time describing when the appointment was cancelled. - */ - public Date getCancellationDate() { - return this.cancellationDate == null ? null : this.cancellationDate.getValue(); - } - - /** - * @param value The date/time describing when the appointment was cancelled. - */ - public Appointment setCancellationDate(Date value) { - if (value == null) - this.cancellationDate = null; - else { - if (this.cancellationDate == null) - this.cancellationDate = new DateTimeType(); - this.cancellationDate.setValue(value); - } - return this; - } - - /** - * @return {@link #note} (Additional notes/comments about the appointment.) - */ - public List getNote() { - if (this.note == null) - this.note = new ArrayList(); - return this.note; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setNote(List theNote) { - this.note = theNote; - return this; - } - - public boolean hasNote() { - if (this.note == null) - return false; - for (Annotation item : this.note) - if (!item.isEmpty()) - return true; - return false; - } - - public Annotation addNote() { //3 - Annotation t = new Annotation(); - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); - return t; - } - - public Appointment addNote(Annotation t) { //3 - if (t == null) - return this; - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} - */ - public Annotation getNoteFirstRep() { - if (getNote().isEmpty()) { - addNote(); - } - return getNote().get(0); - } - - /** - * @return {@link #patientInstruction} (While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).) - */ - public List getPatientInstruction() { - if (this.patientInstruction == null) - this.patientInstruction = new ArrayList(); - return this.patientInstruction; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setPatientInstruction(List thePatientInstruction) { - this.patientInstruction = thePatientInstruction; - return this; - } - - public boolean hasPatientInstruction() { - if (this.patientInstruction == null) - return false; - for (CodeableReference item : this.patientInstruction) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addPatientInstruction() { //3 - CodeableReference t = new CodeableReference(); - if (this.patientInstruction == null) - this.patientInstruction = new ArrayList(); - this.patientInstruction.add(t); - return t; - } - - public Appointment addPatientInstruction(CodeableReference t) { //3 - if (t == null) - return this; - if (this.patientInstruction == null) - this.patientInstruction = new ArrayList(); - this.patientInstruction.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #patientInstruction}, creating it if it does not already exist {3} - */ - public CodeableReference getPatientInstructionFirstRep() { - if (getPatientInstruction().isEmpty()) { - addPatientInstruction(); - } - return getPatientInstruction().get(0); - } - - /** - * @return {@link #basedOn} (The request this appointment is allocated to assess (e.g. incoming referral or procedure request).) - */ - public List getBasedOn() { - if (this.basedOn == null) - this.basedOn = new ArrayList(); - return this.basedOn; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setBasedOn(List theBasedOn) { - this.basedOn = theBasedOn; - return this; - } - - public boolean hasBasedOn() { - if (this.basedOn == null) - return false; - for (Reference item : this.basedOn) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addBasedOn() { //3 - Reference t = new Reference(); - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return t; - } - - public Appointment addBasedOn(Reference t) { //3 - if (t == null) - return this; - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} - */ - public Reference getBasedOnFirstRep() { - if (getBasedOn().isEmpty()) { - addBasedOn(); - } - return getBasedOn().get(0); - } - - /** - * @return {@link #subject} (The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.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 patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) - */ - public Appointment setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #participant} (List of participants involved in the appointment.) - */ - public List getParticipant() { - if (this.participant == null) - this.participant = new ArrayList(); - return this.participant; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setParticipant(List theParticipant) { - this.participant = theParticipant; - return this; - } - - public boolean hasParticipant() { - if (this.participant == null) - return false; - for (AppointmentParticipantComponent item : this.participant) - if (!item.isEmpty()) - return true; - return false; - } - - public AppointmentParticipantComponent addParticipant() { //3 - AppointmentParticipantComponent t = new AppointmentParticipantComponent(); - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return t; - } - - public Appointment addParticipant(AppointmentParticipantComponent t) { //3 - if (t == null) - return this; - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3} - */ - public AppointmentParticipantComponent getParticipantFirstRep() { - if (getParticipant().isEmpty()) { - addParticipant(); - } - return getParticipant().get(0); - } - - /** - * @return {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value - */ - public PositiveIntType getRecurrenceIdElement() { - if (this.recurrenceId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.recurrenceId"); - else if (Configuration.doAutoCreate()) - this.recurrenceId = new PositiveIntType(); // bb - return this.recurrenceId; - } - - public boolean hasRecurrenceIdElement() { - return this.recurrenceId != null && !this.recurrenceId.isEmpty(); - } - - public boolean hasRecurrenceId() { - return this.recurrenceId != null && !this.recurrenceId.isEmpty(); - } - - /** - * @param value {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value - */ - public Appointment setRecurrenceIdElement(PositiveIntType value) { - this.recurrenceId = value; - return this; - } - - /** - * @return The sequence number that identifies a specific appointment in a recurring pattern. - */ - public int getRecurrenceId() { - return this.recurrenceId == null || this.recurrenceId.isEmpty() ? 0 : this.recurrenceId.getValue(); - } - - /** - * @param value The sequence number that identifies a specific appointment in a recurring pattern. - */ - public Appointment setRecurrenceId(int value) { - if (this.recurrenceId == null) - this.recurrenceId = new PositiveIntType(); - this.recurrenceId.setValue(value); - return this; - } - - /** - * @return {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value - */ - public BooleanType getOccurrenceChangedElement() { - if (this.occurrenceChanged == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.occurrenceChanged"); - else if (Configuration.doAutoCreate()) - this.occurrenceChanged = new BooleanType(); // bb - return this.occurrenceChanged; - } - - public boolean hasOccurrenceChangedElement() { - return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); - } - - public boolean hasOccurrenceChanged() { - return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); - } - - /** - * @param value {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value - */ - public Appointment setOccurrenceChangedElement(BooleanType value) { - this.occurrenceChanged = value; - return this; - } - - /** - * @return This appointment varies from the recurring pattern. - */ - public boolean getOccurrenceChanged() { - return this.occurrenceChanged == null || this.occurrenceChanged.isEmpty() ? false : this.occurrenceChanged.getValue(); - } - - /** - * @param value This appointment varies from the recurring pattern. - */ - public Appointment setOccurrenceChanged(boolean value) { - if (this.occurrenceChanged == null) - this.occurrenceChanged = new BooleanType(); - this.occurrenceChanged.setValue(value); - return this; - } - - /** - * @return {@link #recurrenceTemplate} (The details of the recurrence pattern or template that is used to generate recurring appointments.) - */ - public List getRecurrenceTemplate() { - if (this.recurrenceTemplate == null) - this.recurrenceTemplate = new ArrayList(); - return this.recurrenceTemplate; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Appointment setRecurrenceTemplate(List theRecurrenceTemplate) { - this.recurrenceTemplate = theRecurrenceTemplate; - return this; - } - - public boolean hasRecurrenceTemplate() { - if (this.recurrenceTemplate == null) - return false; - for (AppointmentRecurrenceTemplateComponent item : this.recurrenceTemplate) - if (!item.isEmpty()) - return true; - return false; - } - - public AppointmentRecurrenceTemplateComponent addRecurrenceTemplate() { //3 - AppointmentRecurrenceTemplateComponent t = new AppointmentRecurrenceTemplateComponent(); - if (this.recurrenceTemplate == null) - this.recurrenceTemplate = new ArrayList(); - this.recurrenceTemplate.add(t); - return t; - } - - public Appointment addRecurrenceTemplate(AppointmentRecurrenceTemplateComponent t) { //3 - if (t == null) - return this; - if (this.recurrenceTemplate == null) - this.recurrenceTemplate = new ArrayList(); - this.recurrenceTemplate.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #recurrenceTemplate}, creating it if it does not already exist {3} - */ - public AppointmentRecurrenceTemplateComponent getRecurrenceTemplateFirstRep() { - if (getRecurrenceTemplate().isEmpty()) { - addRecurrenceTemplate(); - } - return getRecurrenceTemplate().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.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)); - children.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, 1, status)); - children.add(new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason)); - children.add(new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_)); - children.add(new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); - children.add(new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType)); - children.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)); - children.add(new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType)); - children.add(new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason)); - children.add(new Property("priority", "CodeableConcept", "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, 1, priority)); - children.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 note field.", 0, 1, description)); - children.add(new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces)); - children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService)); - children.add(new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); - children.add(new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment)); - children.add(new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment)); - children.add(new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start)); - children.add(new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end)); - children.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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration)); - children.add(new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod)); - children.add(new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot)); - children.add(new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account)); - children.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, 1, created)); - children.add(new Property("cancellationDate", "dateTime", "The date/time describing when the appointment was cancelled.", 0, 1, cancellationDate)); - children.add(new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note)); - children.add(new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction)); - children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn)); - children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject)); - children.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); - children.add(new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId)); - children.add(new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged)); - children.add(new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1618432855: /*identifier*/ return 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); - case -892481550: /*status*/ return 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, 1, status); - case 2135095591: /*cancellationReason*/ return new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason); - case 94742904: /*class*/ return new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_); - case 1281188563: /*serviceCategory*/ return new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory); - case -1928370289: /*serviceType*/ return new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType); - case -1694759682: /*specialty*/ return 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); - case -1596426375: /*appointmentType*/ return new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType); - case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason); - case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "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, 1, priority); - case -1724546052: /*description*/ return 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 note field.", 0, 1, description); - case -430332865: /*replaces*/ return new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces); - case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService); - case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation); - case -1676044248: /*previousAppointment*/ return new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment); - case 1841882230: /*originatingAppointment*/ return new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment); - case 109757538: /*start*/ return new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start); - case 100571: /*end*/ return new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end); - case -413630573: /*minutesDuration*/ return 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration); - case -897241393: /*requestedPeriod*/ return new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod); - case 3533310: /*slot*/ return new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot); - case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account); - case 1028554472: /*created*/ return 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, 1, created); - case 806269777: /*cancellationDate*/ return new Property("cancellationDate", "dateTime", "The date/time describing when the appointment was cancelled.", 0, 1, cancellationDate); - case 3387378: /*note*/ return new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note); - case 737543241: /*patientInstruction*/ return new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction); - case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn); - case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject); - case 767422259: /*participant*/ return new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant); - case -362407829: /*recurrenceId*/ return new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId); - case 1779864483: /*occurrenceChanged*/ return new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged); - case 597629898: /*recurrenceTemplate*/ return new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case 2135095591: /*cancellationReason*/ return this.cancellationReason == null ? new Base[0] : new Base[] {this.cancellationReason}; // CodeableConcept - case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // CodeableConcept - case 1281188563: /*serviceCategory*/ return this.serviceCategory == null ? new Base[0] : this.serviceCategory.toArray(new Base[this.serviceCategory.size()]); // CodeableConcept - case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableReference - case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept - case -1596426375: /*appointmentType*/ return this.appointmentType == null ? new Base[0] : new Base[] {this.appointmentType}; // CodeableConcept - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference - case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept - case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType - case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference - case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail - case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference - case -1676044248: /*previousAppointment*/ return this.previousAppointment == null ? new Base[0] : new Base[] {this.previousAppointment}; // Reference - case 1841882230: /*originatingAppointment*/ return this.originatingAppointment == null ? new Base[0] : new Base[] {this.originatingAppointment}; // Reference - case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType - case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType - case -413630573: /*minutesDuration*/ return this.minutesDuration == null ? new Base[0] : new Base[] {this.minutesDuration}; // PositiveIntType - case -897241393: /*requestedPeriod*/ return this.requestedPeriod == null ? new Base[0] : this.requestedPeriod.toArray(new Base[this.requestedPeriod.size()]); // Period - case 3533310: /*slot*/ return this.slot == null ? new Base[0] : this.slot.toArray(new Base[this.slot.size()]); // Reference - case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference - case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType - case 806269777: /*cancellationDate*/ return this.cancellationDate == null ? new Base[0] : new Base[] {this.cancellationDate}; // DateTimeType - case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation - case 737543241: /*patientInstruction*/ return this.patientInstruction == null ? new Base[0] : this.patientInstruction.toArray(new Base[this.patientInstruction.size()]); // CodeableReference - case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference - case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference - case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // AppointmentParticipantComponent - case -362407829: /*recurrenceId*/ return this.recurrenceId == null ? new Base[0] : new Base[] {this.recurrenceId}; // PositiveIntType - case 1779864483: /*occurrenceChanged*/ return this.occurrenceChanged == null ? new Base[0] : new Base[] {this.occurrenceChanged}; // BooleanType - case 597629898: /*recurrenceTemplate*/ return this.recurrenceTemplate == null ? new Base[0] : this.recurrenceTemplate.toArray(new Base[this.recurrenceTemplate.size()]); // AppointmentRecurrenceTemplateComponent - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1618432855: // identifier - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier - return value; - case -892481550: // status - value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case 2135095591: // cancellationReason - this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 94742904: // class - this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 1281188563: // serviceCategory - this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1928370289: // serviceType - this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case -1694759682: // specialty - this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1596426375: // appointmentType - this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -934964668: // reason - this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case -1165461084: // priority - this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1724546052: // description - this.description = TypeConvertor.castToString(value); // StringType - return value; - case -430332865: // replaces - this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference - return value; - case 1420774698: // virtualService - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail - return value; - case -1248768647: // supportingInformation - this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -1676044248: // previousAppointment - this.previousAppointment = TypeConvertor.castToReference(value); // Reference - return value; - case 1841882230: // originatingAppointment - this.originatingAppointment = TypeConvertor.castToReference(value); // Reference - return value; - case 109757538: // start - this.start = TypeConvertor.castToInstant(value); // InstantType - return value; - case 100571: // end - this.end = TypeConvertor.castToInstant(value); // InstantType - return value; - case -413630573: // minutesDuration - this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case -897241393: // requestedPeriod - this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); // Period - return value; - case 3533310: // slot - this.getSlot().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -1177318867: // account - this.getAccount().add(TypeConvertor.castToReference(value)); // Reference - return value; - case 1028554472: // created - this.created = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 806269777: // cancellationDate - this.cancellationDate = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 3387378: // note - this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation - return value; - case 737543241: // patientInstruction - this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case -332612366: // basedOn - this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -1867885268: // subject - this.subject = TypeConvertor.castToReference(value); // Reference - return value; - case 767422259: // participant - this.getParticipant().add((AppointmentParticipantComponent) value); // AppointmentParticipantComponent - return value; - case -362407829: // recurrenceId - this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType - return value; - case 1779864483: // occurrenceChanged - this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case 597629898: // recurrenceTemplate - this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); // AppointmentRecurrenceTemplateComponent - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); - } else if (name.equals("status")) { - value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("cancellationReason")) { - this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("class")) { - this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("serviceCategory")) { - this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("serviceType")) { - this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("specialty")) { - this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("appointmentType")) { - this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("reason")) { - this.getReason().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("priority")) { - this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("description")) { - this.description = TypeConvertor.castToString(value); // StringType - } else if (name.equals("replaces")) { - this.getReplaces().add(TypeConvertor.castToReference(value)); - } else if (name.equals("virtualService")) { - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); - } else if (name.equals("supportingInformation")) { - this.getSupportingInformation().add(TypeConvertor.castToReference(value)); - } else if (name.equals("previousAppointment")) { - this.previousAppointment = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("originatingAppointment")) { - this.originatingAppointment = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("start")) { - this.start = TypeConvertor.castToInstant(value); // InstantType - } else if (name.equals("end")) { - this.end = TypeConvertor.castToInstant(value); // InstantType - } else if (name.equals("minutesDuration")) { - this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("requestedPeriod")) { - this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); - } else if (name.equals("slot")) { - this.getSlot().add(TypeConvertor.castToReference(value)); - } else if (name.equals("account")) { - this.getAccount().add(TypeConvertor.castToReference(value)); - } else if (name.equals("created")) { - this.created = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("cancellationDate")) { - this.cancellationDate = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("note")) { - this.getNote().add(TypeConvertor.castToAnnotation(value)); - } else if (name.equals("patientInstruction")) { - this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("basedOn")) { - this.getBasedOn().add(TypeConvertor.castToReference(value)); - } else if (name.equals("subject")) { - this.subject = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("participant")) { - this.getParticipant().add((AppointmentParticipantComponent) value); - } else if (name.equals("recurrenceId")) { - this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType - } else if (name.equals("occurrenceChanged")) { - this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("recurrenceTemplate")) { - this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().remove(value); - } else if (name.equals("status")) { - value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("cancellationReason")) { - this.cancellationReason = null; - } else if (name.equals("class")) { - this.getClass_().remove(value); - } else if (name.equals("serviceCategory")) { - this.getServiceCategory().remove(value); - } else if (name.equals("serviceType")) { - this.getServiceType().remove(value); - } else if (name.equals("specialty")) { - this.getSpecialty().remove(value); - } else if (name.equals("appointmentType")) { - this.appointmentType = null; - } else if (name.equals("reason")) { - this.getReason().remove(value); - } else if (name.equals("priority")) { - this.priority = null; - } else if (name.equals("description")) { - this.description = null; - } else if (name.equals("replaces")) { - this.getReplaces().remove(value); - } else if (name.equals("virtualService")) { - this.getVirtualService().remove(value); - } else if (name.equals("supportingInformation")) { - this.getSupportingInformation().remove(value); - } else if (name.equals("previousAppointment")) { - this.previousAppointment = null; - } else if (name.equals("originatingAppointment")) { - this.originatingAppointment = null; - } else if (name.equals("start")) { - this.start = null; - } else if (name.equals("end")) { - this.end = null; - } else if (name.equals("minutesDuration")) { - this.minutesDuration = null; - } else if (name.equals("requestedPeriod")) { - this.getRequestedPeriod().remove(value); - } else if (name.equals("slot")) { - this.getSlot().remove(value); - } else if (name.equals("account")) { - this.getAccount().remove(value); - } else if (name.equals("created")) { - this.created = null; - } else if (name.equals("cancellationDate")) { - this.cancellationDate = null; - } else if (name.equals("note")) { - this.getNote().remove(value); - } else if (name.equals("patientInstruction")) { - this.getPatientInstruction().remove(value); - } else if (name.equals("basedOn")) { - this.getBasedOn().remove(value); - } else if (name.equals("subject")) { - this.subject = null; - } else if (name.equals("participant")) { - this.getParticipant().remove((AppointmentParticipantComponent) value); - } else if (name.equals("recurrenceId")) { - this.recurrenceId = null; - } else if (name.equals("occurrenceChanged")) { - this.occurrenceChanged = null; - } else if (name.equals("recurrenceTemplate")) { - this.getRecurrenceTemplate().remove((AppointmentRecurrenceTemplateComponent) value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: return addIdentifier(); - case -892481550: return getStatusElement(); - case 2135095591: return getCancellationReason(); - case 94742904: return addClass_(); - case 1281188563: return addServiceCategory(); - case -1928370289: return addServiceType(); - case -1694759682: return addSpecialty(); - case -1596426375: return getAppointmentType(); - case -934964668: return addReason(); - case -1165461084: return getPriority(); - case -1724546052: return getDescriptionElement(); - case -430332865: return addReplaces(); - case 1420774698: return addVirtualService(); - case -1248768647: return addSupportingInformation(); - case -1676044248: return getPreviousAppointment(); - case 1841882230: return getOriginatingAppointment(); - case 109757538: return getStartElement(); - case 100571: return getEndElement(); - case -413630573: return getMinutesDurationElement(); - case -897241393: return addRequestedPeriod(); - case 3533310: return addSlot(); - case -1177318867: return addAccount(); - case 1028554472: return getCreatedElement(); - case 806269777: return getCancellationDateElement(); - case 3387378: return addNote(); - case 737543241: return addPatientInstruction(); - case -332612366: return addBasedOn(); - case -1867885268: return getSubject(); - case 767422259: return addParticipant(); - case -362407829: return getRecurrenceIdElement(); - case 1779864483: return getOccurrenceChangedElement(); - case 597629898: return addRecurrenceTemplate(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case -892481550: /*status*/ return new String[] {"code"}; - case 2135095591: /*cancellationReason*/ return new String[] {"CodeableConcept"}; - case 94742904: /*class*/ return new String[] {"CodeableConcept"}; - case 1281188563: /*serviceCategory*/ return new String[] {"CodeableConcept"}; - case -1928370289: /*serviceType*/ return new String[] {"CodeableReference"}; - case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"}; - case -1596426375: /*appointmentType*/ return new String[] {"CodeableConcept"}; - case -934964668: /*reason*/ return new String[] {"CodeableReference"}; - case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; - case -1724546052: /*description*/ return new String[] {"string"}; - case -430332865: /*replaces*/ return new String[] {"Reference"}; - case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; - case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; - case -1676044248: /*previousAppointment*/ return new String[] {"Reference"}; - case 1841882230: /*originatingAppointment*/ return new String[] {"Reference"}; - case 109757538: /*start*/ return new String[] {"instant"}; - case 100571: /*end*/ return new String[] {"instant"}; - case -413630573: /*minutesDuration*/ return new String[] {"positiveInt"}; - case -897241393: /*requestedPeriod*/ return new String[] {"Period"}; - case 3533310: /*slot*/ return new String[] {"Reference"}; - case -1177318867: /*account*/ return new String[] {"Reference"}; - case 1028554472: /*created*/ return new String[] {"dateTime"}; - case 806269777: /*cancellationDate*/ return new String[] {"dateTime"}; - case 3387378: /*note*/ return new String[] {"Annotation"}; - case 737543241: /*patientInstruction*/ return new String[] {"CodeableReference"}; - case -332612366: /*basedOn*/ return new String[] {"Reference"}; - case -1867885268: /*subject*/ return new String[] {"Reference"}; - case 767422259: /*participant*/ return new String[] {}; - case -362407829: /*recurrenceId*/ return new String[] {"positiveInt"}; - case 1779864483: /*occurrenceChanged*/ return new String[] {"boolean"}; - case 597629898: /*recurrenceTemplate*/ return new String[] {}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.status"); - } - else if (name.equals("cancellationReason")) { - this.cancellationReason = new CodeableConcept(); - return this.cancellationReason; - } - else if (name.equals("class")) { - return addClass_(); - } - else if (name.equals("serviceCategory")) { - return addServiceCategory(); - } - 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")) { - return addReason(); - } - else if (name.equals("priority")) { - this.priority = new CodeableConcept(); - return this.priority; - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.description"); - } - else if (name.equals("replaces")) { - return addReplaces(); - } - else if (name.equals("virtualService")) { - return addVirtualService(); - } - else if (name.equals("supportingInformation")) { - return addSupportingInformation(); - } - else if (name.equals("previousAppointment")) { - this.previousAppointment = new Reference(); - return this.previousAppointment; - } - else if (name.equals("originatingAppointment")) { - this.originatingAppointment = new Reference(); - return this.originatingAppointment; - } - else if (name.equals("start")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.start"); - } - else if (name.equals("end")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.end"); - } - else if (name.equals("minutesDuration")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.minutesDuration"); - } - else if (name.equals("requestedPeriod")) { - return addRequestedPeriod(); - } - else if (name.equals("slot")) { - return addSlot(); - } - else if (name.equals("account")) { - return addAccount(); - } - else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.created"); - } - else if (name.equals("cancellationDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.cancellationDate"); - } - else if (name.equals("note")) { - return addNote(); - } - else if (name.equals("patientInstruction")) { - return addPatientInstruction(); - } - else if (name.equals("basedOn")) { - return addBasedOn(); - } - else if (name.equals("subject")) { - this.subject = new Reference(); - return this.subject; - } - else if (name.equals("participant")) { - return addParticipant(); - } - else if (name.equals("recurrenceId")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceId"); - } - else if (name.equals("occurrenceChanged")) { - throw new FHIRException("Cannot call addChild on a singleton property Appointment.occurrenceChanged"); - } - else if (name.equals("recurrenceTemplate")) { - return addRecurrenceTemplate(); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Appointment"; - - } - - public Appointment copy() { - Appointment dst = new Appointment(); - copyValues(dst); - return dst; - } - - public void copyValues(Appointment dst) { - super.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(); - dst.cancellationReason = cancellationReason == null ? null : cancellationReason.copy(); - if (class_ != null) { - dst.class_ = new ArrayList(); - for (CodeableConcept i : class_) - dst.class_.add(i.copy()); - }; - if (serviceCategory != null) { - dst.serviceCategory = new ArrayList(); - for (CodeableConcept i : serviceCategory) - dst.serviceCategory.add(i.copy()); - }; - if (serviceType != null) { - dst.serviceType = new ArrayList(); - for (CodeableReference 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(); - if (reason != null) { - dst.reason = new ArrayList(); - for (CodeableReference i : reason) - dst.reason.add(i.copy()); - }; - dst.priority = priority == null ? null : priority.copy(); - dst.description = description == null ? null : description.copy(); - if (replaces != null) { - dst.replaces = new ArrayList(); - for (Reference i : replaces) - dst.replaces.add(i.copy()); - }; - if (virtualService != null) { - dst.virtualService = new ArrayList(); - for (VirtualServiceDetail i : virtualService) - dst.virtualService.add(i.copy()); - }; - if (supportingInformation != null) { - dst.supportingInformation = new ArrayList(); - for (Reference i : supportingInformation) - dst.supportingInformation.add(i.copy()); - }; - dst.previousAppointment = previousAppointment == null ? null : previousAppointment.copy(); - dst.originatingAppointment = originatingAppointment == null ? null : originatingAppointment.copy(); - dst.start = start == null ? null : start.copy(); - dst.end = end == null ? null : end.copy(); - dst.minutesDuration = minutesDuration == null ? null : minutesDuration.copy(); - if (requestedPeriod != null) { - dst.requestedPeriod = new ArrayList(); - for (Period i : requestedPeriod) - dst.requestedPeriod.add(i.copy()); - }; - if (slot != null) { - dst.slot = new ArrayList(); - for (Reference i : slot) - dst.slot.add(i.copy()); - }; - if (account != null) { - dst.account = new ArrayList(); - for (Reference i : account) - dst.account.add(i.copy()); - }; - dst.created = created == null ? null : created.copy(); - dst.cancellationDate = cancellationDate == null ? null : cancellationDate.copy(); - if (note != null) { - dst.note = new ArrayList(); - for (Annotation i : note) - dst.note.add(i.copy()); - }; - if (patientInstruction != null) { - dst.patientInstruction = new ArrayList(); - for (CodeableReference i : patientInstruction) - dst.patientInstruction.add(i.copy()); - }; - if (basedOn != null) { - dst.basedOn = new ArrayList(); - for (Reference i : basedOn) - dst.basedOn.add(i.copy()); - }; - dst.subject = subject == null ? null : subject.copy(); - if (participant != null) { - dst.participant = new ArrayList(); - for (AppointmentParticipantComponent i : participant) - dst.participant.add(i.copy()); - }; - dst.recurrenceId = recurrenceId == null ? null : recurrenceId.copy(); - dst.occurrenceChanged = occurrenceChanged == null ? null : occurrenceChanged.copy(); - if (recurrenceTemplate != null) { - dst.recurrenceTemplate = new ArrayList(); - for (AppointmentRecurrenceTemplateComponent i : recurrenceTemplate) - dst.recurrenceTemplate.add(i.copy()); - }; - } - - protected Appointment typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof Appointment)) - return false; - Appointment o = (Appointment) other_; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(cancellationReason, o.cancellationReason, true) - && compareDeep(class_, o.class_, 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(replaces, o.replaces, true) && compareDeep(virtualService, o.virtualService, true) - && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(previousAppointment, o.previousAppointment, true) - && compareDeep(originatingAppointment, o.originatingAppointment, true) && compareDeep(start, o.start, true) - && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true) && compareDeep(requestedPeriod, o.requestedPeriod, true) - && compareDeep(slot, o.slot, true) && compareDeep(account, o.account, true) && compareDeep(created, o.created, true) - && compareDeep(cancellationDate, o.cancellationDate, true) && compareDeep(note, o.note, true) && compareDeep(patientInstruction, o.patientInstruction, true) - && compareDeep(basedOn, o.basedOn, true) && compareDeep(subject, o.subject, true) && compareDeep(participant, o.participant, true) - && compareDeep(recurrenceId, o.recurrenceId, true) && compareDeep(occurrenceChanged, o.occurrenceChanged, true) - && compareDeep(recurrenceTemplate, o.recurrenceTemplate, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof Appointment)) - return false; - Appointment o = (Appointment) other_; - return compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(start, o.start, true) - && compareValues(end, o.end, true) && compareValues(minutesDuration, o.minutesDuration, true) && compareValues(created, o.created, true) - && compareValues(cancellationDate, o.cancellationDate, true) && compareValues(recurrenceId, o.recurrenceId, true) - && compareValues(occurrenceChanged, o.occurrenceChanged, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, cancellationReason - , class_, serviceCategory, serviceType, specialty, appointmentType, reason, priority - , description, replaces, virtualService, supportingInformation, previousAppointment - , originatingAppointment, start, end, minutesDuration, requestedPeriod, slot, account - , created, cancellationDate, note, patientInstruction, basedOn, subject, participant - , recurrenceId, occurrenceChanged, recurrenceTemplate); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Appointment; - } - - /** - * Search parameter: actor - *

- * Description: Any one of the individuals participating in the appointment
- * Type: reference
- * Path: Appointment.participant.actor
- *

- */ - @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="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) - public static final String SP_ACTOR = "actor"; - /** - * Fluent Client search parameter constant for actor - *

- * Description: Any one of the individuals participating in the appointment
- * Type: reference
- * Path: Appointment.participant.actor
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:actor". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("Appointment:actor").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: based-on - *

- * Description: The service request this appointment is allocated to assess
- * Type: reference
- * Path: Appointment.basedOn
- *

- */ - @SearchParamDefinition(name="based-on", path="Appointment.basedOn", description="The service request this appointment is allocated to assess", type="reference", target={CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class } ) - public static final String SP_BASED_ON = "based-on"; - /** - * Fluent Client search parameter constant for based-on - *

- * Description: The service request this appointment is allocated to assess
- * Type: reference
- * Path: Appointment.basedOn
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:based-on". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Appointment:based-on").toLocked(); - - /** - * Search parameter: group - *

- * Description: One of the individuals of the appointment is this patient
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)
- *

- */ - @SearchParamDefinition(name="group", path="Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class } ) - public static final String SP_GROUP = "group"; - /** - * Fluent Client search parameter constant for group - *

- * Description: One of the individuals of the appointment is this patient
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GROUP = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GROUP); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:group". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_GROUP = new ca.uhn.fhir.model.api.Include("Appointment:group").toLocked(); - - /** - * Search parameter: location - *

- * Description: This location is listed in the participants of the appointment
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is Location)
- *

- */ - @SearchParamDefinition(name="location", path="Appointment.participant.actor.where(resolve() is Location)", description="This location is listed in the participants of the appointment", type="reference", target={Location.class } ) - public static final String SP_LOCATION = "location"; - /** - * Fluent Client search parameter constant for location - *

- * Description: This location is listed in the participants of the appointment
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is 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 "Appointment:location". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Appointment:location").toLocked(); - - /** - * Search parameter: part-status - *

- * Description: The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.
- * Type: token
- * Path: Appointment.participant.status
- *

- */ - @SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" ) - public static final String SP_PART_STATUS = "part-status"; - /** - * Fluent Client search parameter constant for part-status - *

- * Description: The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.
- * Type: token
- * Path: Appointment.participant.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam PART_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PART_STATUS); - - /** - * Search parameter: practitioner - *

- * Description: One of the individuals of the appointment is this practitioner
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is Practitioner)
- *

- */ - @SearchParamDefinition(name="practitioner", path="Appointment.participant.actor.where(resolve() is Practitioner)", description="One of the individuals of the appointment is this practitioner", type="reference", target={Practitioner.class } ) - public static final String SP_PRACTITIONER = "practitioner"; - /** - * Fluent Client search parameter constant for practitioner - *

- * Description: One of the individuals of the appointment is this practitioner
- * Type: reference
- * Path: Appointment.participant.actor.where(resolve() is 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 "Appointment:practitioner". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Appointment:practitioner").toLocked(); - - /** - * Search parameter: reason-code - *

- * Description: Reference to a concept (by class)
- * Type: token
- * Path: Appointment.reason.concept
- *

- */ - @SearchParamDefinition(name="reason-code", path="Appointment.reason.concept", description="Reference to a concept (by class)", type="token" ) - public static final String SP_REASON_CODE = "reason-code"; - /** - * Fluent Client search parameter constant for reason-code - *

- * Description: Reference to a concept (by class)
- * Type: token
- * Path: Appointment.reason.concept
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE); - - /** - * Search parameter: reason-reference - *

- * Description: Reference to a resource (by instance)
- * Type: reference
- * Path: Appointment.reason.reference
- *

- */ - @SearchParamDefinition(name="reason-reference", path="Appointment.reason.reference", description="Reference to a resource (by instance)", type="reference", target={Condition.class, ImmunizationRecommendation.class, Observation.class, Procedure.class } ) - public static final String SP_REASON_REFERENCE = "reason-reference"; - /** - * Fluent Client search parameter constant for reason-reference - *

- * Description: Reference to a resource (by instance)
- * Type: reference
- * Path: Appointment.reason.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:reason-reference". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:reason-reference").toLocked(); - - /** - * Search parameter: requested-period - *

- * Description: During what period was the Appointment requested to take place
- * Type: date
- * Path: requestedPeriod
- *

- */ - @SearchParamDefinition(name="requested-period", path="requestedPeriod", description="During what period was the Appointment requested to take place", type="date" ) - public static final String SP_REQUESTED_PERIOD = "requested-period"; - /** - * Fluent Client search parameter constant for requested-period - *

- * Description: During what period was the Appointment requested to take place
- * Type: date
- * Path: requestedPeriod
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam REQUESTED_PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_REQUESTED_PERIOD); - - /** - * Search parameter: service-category - *

- * Description: A broad categorization of the service that is to be performed during this appointment
- * Type: token
- * Path: Appointment.serviceCategory
- *

- */ - @SearchParamDefinition(name="service-category", path="Appointment.serviceCategory", description="A broad categorization of the service that is to be performed during this appointment", type="token" ) - public static final String SP_SERVICE_CATEGORY = "service-category"; - /** - * Fluent Client search parameter constant for service-category - *

- * Description: A broad categorization of the service that is to be performed during this appointment
- * Type: token
- * Path: Appointment.serviceCategory
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_CATEGORY); - - /** - * Search parameter: service-type-reference - *

- * Description: The specific service (by HealthcareService) that is to be performed during this appointment
- * Type: reference
- * Path: Appointment.serviceType.reference
- *

- */ - @SearchParamDefinition(name="service-type-reference", path="Appointment.serviceType.reference", description="The specific service (by HealthcareService) that is to be performed during this appointment", type="reference", target={HealthcareService.class } ) - public static final String SP_SERVICE_TYPE_REFERENCE = "service-type-reference"; - /** - * Fluent Client search parameter constant for service-type-reference - *

- * Description: The specific service (by HealthcareService) that is to be performed during this appointment
- * Type: reference
- * Path: Appointment.serviceType.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE_TYPE_REFERENCE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:service-type-reference". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:service-type-reference").toLocked(); - - /** - * Search parameter: service-type - *

- * Description: The specific service (by coding) that is to be performed during this appointment
- * Type: token
- * Path: Appointment.serviceType.concept
- *

- */ - @SearchParamDefinition(name="service-type", path="Appointment.serviceType.concept", description="The specific service (by coding) 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 (by coding) that is to be performed during this appointment
- * Type: token
- * Path: Appointment.serviceType.concept
- *

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

- * Description: The slots that this appointment is filling
- * Type: reference
- * Path: Appointment.slot
- *

- */ - @SearchParamDefinition(name="slot", path="Appointment.slot", description="The slots that this appointment is filling", type="reference", target={Slot.class } ) - public static final String SP_SLOT = "slot"; - /** - * Fluent Client search parameter constant for slot - *

- * Description: The slots that this appointment is filling
- * Type: reference
- * Path: Appointment.slot
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SLOT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SLOT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:slot". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SLOT = new ca.uhn.fhir.model.api.Include("Appointment:slot").toLocked(); - - /** - * Search parameter: specialty - *

- * Description: The specialty of a practitioner that would be required to perform the service requested in this appointment
- * Type: token
- * Path: Appointment.specialty
- *

- */ - @SearchParamDefinition(name="specialty", path="Appointment.specialty", description="The specialty of a practitioner that would be required to perform the service requested in this appointment", type="token" ) - public static final String SP_SPECIALTY = "specialty"; - /** - * Fluent Client search parameter constant for specialty - *

- * Description: The specialty of a practitioner that would be required to perform the service requested in this appointment
- * Type: token
- * Path: Appointment.specialty
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY); - - /** - * Search parameter: status - *

- * Description: The overall status of the appointment
- * Type: token
- * Path: Appointment.status
- *

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

- * Description: The overall status of the appointment
- * Type: token
- * Path: Appointment.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - - /** - * Search parameter: subject - *

- * Description: One of the individuals of the appointment is this patient
- * Type: reference
- * Path: Appointment.subject
- *

- */ - @SearchParamDefinition(name="subject", path="Appointment.subject", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class, Patient.class } ) - public static final String SP_SUBJECT = "subject"; - /** - * Fluent Client search parameter constant for subject - *

- * Description: One of the individuals of the appointment is this patient
- * Type: reference
- * Path: Appointment.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 "Appointment:subject". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Appointment:subject").toLocked(); - - /** - * Search parameter: supporting-info - *

- * Description: Additional information to support the appointment
- * Type: reference
- * Path: Appointment.supportingInformation
- *

- */ - @SearchParamDefinition(name="supporting-info", path="Appointment.supportingInformation", description="Additional information to support the appointment", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) - public static final String SP_SUPPORTING_INFO = "supporting-info"; - /** - * Fluent Client search parameter constant for supporting-info - *

- * Description: Additional information to support the appointment
- * Type: reference
- * Path: Appointment.supportingInformation
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTING_INFO = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTING_INFO); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Appointment:supporting-info". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTING_INFO = new ca.uhn.fhir.model.api.Include("Appointment:supporting-info").toLocked(); - - /** - * Search parameter: date - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): When the event occurred -* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded -* [Appointment](appointment.html): Appointment date/time. -* [AuditEvent](auditevent.html): Time when the event was recorded -* [CarePlan](careplan.html): Time period plan covers -* [CareTeam](careteam.html): A date within the coverage time period. -* [ClinicalImpression](clinicalimpression.html): When the assessment was documented -* [Composition](composition.html): Composition editing time -* [Consent](consent.html): When consent was agreed to -* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report -* [DocumentReference](documentreference.html): When this document reference was created -* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted -* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period -* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated -* [Flag](flag.html): Time period when flag is active -* [Immunization](immunization.html): Vaccination (non)-Administration Date -* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated -* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created -* [Invoice](invoice.html): Invoice date / posting date -* [List](list.html): When the list was prepared -* [MeasureReport](measurereport.html): The date of the measure report -* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication -* [Observation](observation.html): Clinically relevant time/time-period for observation -* [Procedure](procedure.html): When the procedure occurred or is occurring -* [ResearchSubject](researchsubject.html): Start and end of participation -* [RiskAssessment](riskassessment.html): When was assessment made? -* [SupplyRequest](supplyrequest.html): When the request was made -
- * Type: date
- * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
- *

- */ - @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) - public static final String SP_DATE = "date"; - /** - * Fluent Client search parameter constant for date - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): When the event occurred -* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded -* [Appointment](appointment.html): Appointment date/time. -* [AuditEvent](auditevent.html): Time when the event was recorded -* [CarePlan](careplan.html): Time period plan covers -* [CareTeam](careteam.html): A date within the coverage time period. -* [ClinicalImpression](clinicalimpression.html): When the assessment was documented -* [Composition](composition.html): Composition editing time -* [Consent](consent.html): When consent was agreed to -* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report -* [DocumentReference](documentreference.html): When this document reference was created -* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted -* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period -* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated -* [Flag](flag.html): Time period when flag is active -* [Immunization](immunization.html): Vaccination (non)-Administration Date -* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated -* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created -* [Invoice](invoice.html): Invoice date / posting date -* [List](list.html): When the list was prepared -* [MeasureReport](measurereport.html): The date of the measure report -* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication -* [Observation](observation.html): Clinically relevant time/time-period for observation -* [Procedure](procedure.html): When the procedure occurred or is occurring -* [ResearchSubject](researchsubject.html): Start and end of participation -* [RiskAssessment](riskassessment.html): When was assessment made? -* [SupplyRequest](supplyrequest.html): When the request was made -
- * Type: date
- * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
- *

- */ - @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Appointment:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Appointment:patient").toLocked(); - - -} - +The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.) + */ + public List getRequestedPeriod() { + if (this.requestedPeriod == null) + this.requestedPeriod = new ArrayList(); + return this.requestedPeriod; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setRequestedPeriod(List theRequestedPeriod) { + this.requestedPeriod = theRequestedPeriod; + return this; + } + + public boolean hasRequestedPeriod() { + if (this.requestedPeriod == null) + return false; + for (Period item : this.requestedPeriod) + if (!item.isEmpty()) + return true; + return false; + } + + public Period addRequestedPeriod() { //3 + Period t = new Period(); + if (this.requestedPeriod == null) + this.requestedPeriod = new ArrayList(); + this.requestedPeriod.add(t); + return t; + } + + public Appointment addRequestedPeriod(Period t) { //3 + if (t == null) + return this; + if (this.requestedPeriod == null) + this.requestedPeriod = new ArrayList(); + this.requestedPeriod.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #requestedPeriod}, creating it if it does not already exist {3} + */ + public Period getRequestedPeriodFirstRep() { + if (getRequestedPeriod().isEmpty()) { + addRequestedPeriod(); + } + return getRequestedPeriod().get(0); + } + + /** + * @return {@link #slot} (The slots from the participants' schedules that will be filled by the appointment.) + */ + public List getSlot() { + if (this.slot == null) + this.slot = new ArrayList(); + return this.slot; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setSlot(List theSlot) { + this.slot = theSlot; + return this; + } + + public boolean hasSlot() { + if (this.slot == null) + return false; + for (Reference item : this.slot) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addSlot() { //3 + Reference t = new Reference(); + if (this.slot == null) + this.slot = new ArrayList(); + this.slot.add(t); + return t; + } + + public Appointment addSlot(Reference t) { //3 + if (t == null) + return this; + if (this.slot == null) + this.slot = new ArrayList(); + this.slot.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #slot}, creating it if it does not already exist {3} + */ + public Reference getSlotFirstRep() { + if (getSlot().isEmpty()) { + addSlot(); + } + return getSlot().get(0); + } + + /** + * @return {@link #account} (The set of accounts that is expected to be used for billing the activities that result from this Appointment.) + */ + public List getAccount() { + if (this.account == null) + this.account = new ArrayList(); + return this.account; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setAccount(List theAccount) { + this.account = theAccount; + return this; + } + + public boolean hasAccount() { + if (this.account == null) + return false; + for (Reference item : this.account) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addAccount() { //3 + Reference t = new Reference(); + if (this.account == null) + this.account = new ArrayList(); + this.account.add(t); + return t; + } + + public Appointment addAccount(Reference t) { //3 + if (t == null) + return this; + if (this.account == null) + this.account = new ArrayList(); + this.account.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3} + */ + public Reference getAccountFirstRep() { + if (getAccount().isEmpty()) { + addAccount(); + } + return getAccount().get(0); + } + + /** + * @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 #cancellationDate} (The date/time describing when the appointment was cancelled.). This is the underlying object with id, value and extensions. The accessor "getCancellationDate" gives direct access to the value + */ + public DateTimeType getCancellationDateElement() { + if (this.cancellationDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.cancellationDate"); + else if (Configuration.doAutoCreate()) + this.cancellationDate = new DateTimeType(); // bb + return this.cancellationDate; + } + + public boolean hasCancellationDateElement() { + return this.cancellationDate != null && !this.cancellationDate.isEmpty(); + } + + public boolean hasCancellationDate() { + return this.cancellationDate != null && !this.cancellationDate.isEmpty(); + } + + /** + * @param value {@link #cancellationDate} (The date/time describing when the appointment was cancelled.). This is the underlying object with id, value and extensions. The accessor "getCancellationDate" gives direct access to the value + */ + public Appointment setCancellationDateElement(DateTimeType value) { + this.cancellationDate = value; + return this; + } + + /** + * @return The date/time describing when the appointment was cancelled. + */ + public Date getCancellationDate() { + return this.cancellationDate == null ? null : this.cancellationDate.getValue(); + } + + /** + * @param value The date/time describing when the appointment was cancelled. + */ + public Appointment setCancellationDate(Date value) { + if (value == null) + this.cancellationDate = null; + else { + if (this.cancellationDate == null) + this.cancellationDate = new DateTimeType(); + this.cancellationDate.setValue(value); + } + return this; + } + + /** + * @return {@link #note} (Additional notes/comments about the appointment.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setNote(List theNote) { + this.note = theNote; + return this; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + public Appointment addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} + */ + public Annotation getNoteFirstRep() { + if (getNote().isEmpty()) { + addNote(); + } + return getNote().get(0); + } + + /** + * @return {@link #patientInstruction} (While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).) + */ + public List getPatientInstruction() { + if (this.patientInstruction == null) + this.patientInstruction = new ArrayList(); + return this.patientInstruction; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setPatientInstruction(List thePatientInstruction) { + this.patientInstruction = thePatientInstruction; + return this; + } + + public boolean hasPatientInstruction() { + if (this.patientInstruction == null) + return false; + for (CodeableReference item : this.patientInstruction) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addPatientInstruction() { //3 + CodeableReference t = new CodeableReference(); + if (this.patientInstruction == null) + this.patientInstruction = new ArrayList(); + this.patientInstruction.add(t); + return t; + } + + public Appointment addPatientInstruction(CodeableReference t) { //3 + if (t == null) + return this; + if (this.patientInstruction == null) + this.patientInstruction = new ArrayList(); + this.patientInstruction.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #patientInstruction}, creating it if it does not already exist {3} + */ + public CodeableReference getPatientInstructionFirstRep() { + if (getPatientInstruction().isEmpty()) { + addPatientInstruction(); + } + return getPatientInstruction().get(0); + } + + /** + * @return {@link #basedOn} (The request this appointment is allocated to assess (e.g. incoming referral or procedure request).) + */ + public List getBasedOn() { + if (this.basedOn == null) + this.basedOn = new ArrayList(); + return this.basedOn; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setBasedOn(List theBasedOn) { + this.basedOn = theBasedOn; + return this; + } + + public boolean hasBasedOn() { + if (this.basedOn == null) + return false; + for (Reference item : this.basedOn) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addBasedOn() { //3 + Reference t = new Reference(); + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return t; + } + + public Appointment addBasedOn(Reference t) { //3 + if (t == null) + return this; + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} + */ + public Reference getBasedOnFirstRep() { + if (getBasedOn().isEmpty()) { + addBasedOn(); + } + return getBasedOn().get(0); + } + + /** + * @return {@link #subject} (The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.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 patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) + */ + public Appointment setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #participant} (List of participants involved in the appointment.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setParticipant(List theParticipant) { + this.participant = theParticipant; + return this; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (AppointmentParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + public AppointmentParticipantComponent addParticipant() { //3 + AppointmentParticipantComponent t = new AppointmentParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + public Appointment addParticipant(AppointmentParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3} + */ + public AppointmentParticipantComponent getParticipantFirstRep() { + if (getParticipant().isEmpty()) { + addParticipant(); + } + return getParticipant().get(0); + } + + /** + * @return {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value + */ + public PositiveIntType getRecurrenceIdElement() { + if (this.recurrenceId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.recurrenceId"); + else if (Configuration.doAutoCreate()) + this.recurrenceId = new PositiveIntType(); // bb + return this.recurrenceId; + } + + public boolean hasRecurrenceIdElement() { + return this.recurrenceId != null && !this.recurrenceId.isEmpty(); + } + + public boolean hasRecurrenceId() { + return this.recurrenceId != null && !this.recurrenceId.isEmpty(); + } + + /** + * @param value {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value + */ + public Appointment setRecurrenceIdElement(PositiveIntType value) { + this.recurrenceId = value; + return this; + } + + /** + * @return The sequence number that identifies a specific appointment in a recurring pattern. + */ + public int getRecurrenceId() { + return this.recurrenceId == null || this.recurrenceId.isEmpty() ? 0 : this.recurrenceId.getValue(); + } + + /** + * @param value The sequence number that identifies a specific appointment in a recurring pattern. + */ + public Appointment setRecurrenceId(int value) { + if (this.recurrenceId == null) + this.recurrenceId = new PositiveIntType(); + this.recurrenceId.setValue(value); + return this; + } + + /** + * @return {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value + */ + public BooleanType getOccurrenceChangedElement() { + if (this.occurrenceChanged == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.occurrenceChanged"); + else if (Configuration.doAutoCreate()) + this.occurrenceChanged = new BooleanType(); // bb + return this.occurrenceChanged; + } + + public boolean hasOccurrenceChangedElement() { + return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); + } + + public boolean hasOccurrenceChanged() { + return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); + } + + /** + * @param value {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value + */ + public Appointment setOccurrenceChangedElement(BooleanType value) { + this.occurrenceChanged = value; + return this; + } + + /** + * @return This appointment varies from the recurring pattern. + */ + public boolean getOccurrenceChanged() { + return this.occurrenceChanged == null || this.occurrenceChanged.isEmpty() ? false : this.occurrenceChanged.getValue(); + } + + /** + * @param value This appointment varies from the recurring pattern. + */ + public Appointment setOccurrenceChanged(boolean value) { + if (this.occurrenceChanged == null) + this.occurrenceChanged = new BooleanType(); + this.occurrenceChanged.setValue(value); + return this; + } + + /** + * @return {@link #recurrenceTemplate} (The details of the recurrence pattern or template that is used to generate recurring appointments.) + */ + public List getRecurrenceTemplate() { + if (this.recurrenceTemplate == null) + this.recurrenceTemplate = new ArrayList(); + return this.recurrenceTemplate; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Appointment setRecurrenceTemplate(List theRecurrenceTemplate) { + this.recurrenceTemplate = theRecurrenceTemplate; + return this; + } + + public boolean hasRecurrenceTemplate() { + if (this.recurrenceTemplate == null) + return false; + for (AppointmentRecurrenceTemplateComponent item : this.recurrenceTemplate) + if (!item.isEmpty()) + return true; + return false; + } + + public AppointmentRecurrenceTemplateComponent addRecurrenceTemplate() { //3 + AppointmentRecurrenceTemplateComponent t = new AppointmentRecurrenceTemplateComponent(); + if (this.recurrenceTemplate == null) + this.recurrenceTemplate = new ArrayList(); + this.recurrenceTemplate.add(t); + return t; + } + + public Appointment addRecurrenceTemplate(AppointmentRecurrenceTemplateComponent t) { //3 + if (t == null) + return this; + if (this.recurrenceTemplate == null) + this.recurrenceTemplate = new ArrayList(); + this.recurrenceTemplate.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #recurrenceTemplate}, creating it if it does not already exist {3} + */ + public AppointmentRecurrenceTemplateComponent getRecurrenceTemplateFirstRep() { + if (getRecurrenceTemplate().isEmpty()) { + addRecurrenceTemplate(); + } + return getRecurrenceTemplate().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.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)); + children.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, 1, status)); + children.add(new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason)); + children.add(new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_)); + children.add(new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); + children.add(new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + children.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)); + children.add(new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType)); + children.add(new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason)); + children.add(new Property("priority", "CodeableConcept", "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, 1, priority)); + children.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 note field.", 0, 1, description)); + children.add(new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces)); + children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService)); + children.add(new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + children.add(new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment)); + children.add(new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment)); + children.add(new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start)); + children.add(new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end)); + children.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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration)); + children.add(new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod)); + children.add(new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot)); + children.add(new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account)); + children.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, 1, created)); + children.add(new Property("cancellationDate", "dateTime", "The date/time describing when the appointment was cancelled.", 0, 1, cancellationDate)); + children.add(new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note)); + children.add(new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction)); + children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn)); + children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject)); + children.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); + children.add(new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId)); + children.add(new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged)); + children.add(new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return 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); + case -892481550: /*status*/ return 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, 1, status); + case 2135095591: /*cancellationReason*/ return new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason); + case 94742904: /*class*/ return new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_); + case 1281188563: /*serviceCategory*/ return new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory); + case -1928370289: /*serviceType*/ return new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType); + case -1694759682: /*specialty*/ return 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); + case -1596426375: /*appointmentType*/ return new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType); + case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason); + case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "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, 1, priority); + case -1724546052: /*description*/ return 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 note field.", 0, 1, description); + case -430332865: /*replaces*/ return new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces); + case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService); + case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation); + case -1676044248: /*previousAppointment*/ return new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment); + case 1841882230: /*originatingAppointment*/ return new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment); + case 109757538: /*start*/ return new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start); + case 100571: /*end*/ return new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end); + case -413630573: /*minutesDuration*/ return 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. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration); + case -897241393: /*requestedPeriod*/ return new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod); + case 3533310: /*slot*/ return new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot); + case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account); + case 1028554472: /*created*/ return 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, 1, created); + case 806269777: /*cancellationDate*/ return new Property("cancellationDate", "dateTime", "The date/time describing when the appointment was cancelled.", 0, 1, cancellationDate); + case 3387378: /*note*/ return new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note); + case 737543241: /*patientInstruction*/ return new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction); + case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn); + case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject); + case 767422259: /*participant*/ return new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant); + case -362407829: /*recurrenceId*/ return new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId); + case 1779864483: /*occurrenceChanged*/ return new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged); + case 597629898: /*recurrenceTemplate*/ return new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case 2135095591: /*cancellationReason*/ return this.cancellationReason == null ? new Base[0] : new Base[] {this.cancellationReason}; // CodeableConcept + case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // CodeableConcept + case 1281188563: /*serviceCategory*/ return this.serviceCategory == null ? new Base[0] : this.serviceCategory.toArray(new Base[this.serviceCategory.size()]); // CodeableConcept + case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableReference + case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept + case -1596426375: /*appointmentType*/ return this.appointmentType == null ? new Base[0] : new Base[] {this.appointmentType}; // CodeableConcept + case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference + case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType + case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference + case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail + case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference + case -1676044248: /*previousAppointment*/ return this.previousAppointment == null ? new Base[0] : new Base[] {this.previousAppointment}; // Reference + case 1841882230: /*originatingAppointment*/ return this.originatingAppointment == null ? new Base[0] : new Base[] {this.originatingAppointment}; // Reference + case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType + case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType + case -413630573: /*minutesDuration*/ return this.minutesDuration == null ? new Base[0] : new Base[] {this.minutesDuration}; // PositiveIntType + case -897241393: /*requestedPeriod*/ return this.requestedPeriod == null ? new Base[0] : this.requestedPeriod.toArray(new Base[this.requestedPeriod.size()]); // Period + case 3533310: /*slot*/ return this.slot == null ? new Base[0] : this.slot.toArray(new Base[this.slot.size()]); // Reference + case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference + case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType + case 806269777: /*cancellationDate*/ return this.cancellationDate == null ? new Base[0] : new Base[] {this.cancellationDate}; // DateTimeType + case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation + case 737543241: /*patientInstruction*/ return this.patientInstruction == null ? new Base[0] : this.patientInstruction.toArray(new Base[this.patientInstruction.size()]); // CodeableReference + case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference + case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference + case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // AppointmentParticipantComponent + case -362407829: /*recurrenceId*/ return this.recurrenceId == null ? new Base[0] : new Base[] {this.recurrenceId}; // PositiveIntType + case 1779864483: /*occurrenceChanged*/ return this.occurrenceChanged == null ? new Base[0] : new Base[] {this.occurrenceChanged}; // BooleanType + case 597629898: /*recurrenceTemplate*/ return this.recurrenceTemplate == null ? new Base[0] : this.recurrenceTemplate.toArray(new Base[this.recurrenceTemplate.size()]); // AppointmentRecurrenceTemplateComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier + return value; + case -892481550: // status + value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case 2135095591: // cancellationReason + this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 94742904: // class + this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 1281188563: // serviceCategory + this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1928370289: // serviceType + this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case -1694759682: // specialty + this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1596426375: // appointmentType + this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -934964668: // reason + this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case -1165461084: // priority + this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1724546052: // description + this.description = TypeConvertor.castToString(value); // StringType + return value; + case -430332865: // replaces + this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference + return value; + case 1420774698: // virtualService + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail + return value; + case -1248768647: // supportingInformation + this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -1676044248: // previousAppointment + this.previousAppointment = TypeConvertor.castToReference(value); // Reference + return value; + case 1841882230: // originatingAppointment + this.originatingAppointment = TypeConvertor.castToReference(value); // Reference + return value; + case 109757538: // start + this.start = TypeConvertor.castToInstant(value); // InstantType + return value; + case 100571: // end + this.end = TypeConvertor.castToInstant(value); // InstantType + return value; + case -413630573: // minutesDuration + this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case -897241393: // requestedPeriod + this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); // Period + return value; + case 3533310: // slot + this.getSlot().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -1177318867: // account + this.getAccount().add(TypeConvertor.castToReference(value)); // Reference + return value; + case 1028554472: // created + this.created = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 806269777: // cancellationDate + this.cancellationDate = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 3387378: // note + this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation + return value; + case 737543241: // patientInstruction + this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case -332612366: // basedOn + this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -1867885268: // subject + this.subject = TypeConvertor.castToReference(value); // Reference + return value; + case 767422259: // participant + this.getParticipant().add((AppointmentParticipantComponent) value); // AppointmentParticipantComponent + return value; + case -362407829: // recurrenceId + this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType + return value; + case 1779864483: // occurrenceChanged + this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case 597629898: // recurrenceTemplate + this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); // AppointmentRecurrenceTemplateComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); + } else if (name.equals("status")) { + value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("cancellationReason")) { + this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("class")) { + this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("serviceCategory")) { + this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("serviceType")) { + this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("specialty")) { + this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("appointmentType")) { + this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("reason")) { + this.getReason().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("priority")) { + this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("description")) { + this.description = TypeConvertor.castToString(value); // StringType + } else if (name.equals("replaces")) { + this.getReplaces().add(TypeConvertor.castToReference(value)); + } else if (name.equals("virtualService")) { + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); + } else if (name.equals("supportingInformation")) { + this.getSupportingInformation().add(TypeConvertor.castToReference(value)); + } else if (name.equals("previousAppointment")) { + this.previousAppointment = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("originatingAppointment")) { + this.originatingAppointment = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("start")) { + this.start = TypeConvertor.castToInstant(value); // InstantType + } else if (name.equals("end")) { + this.end = TypeConvertor.castToInstant(value); // InstantType + } else if (name.equals("minutesDuration")) { + this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("requestedPeriod")) { + this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); + } else if (name.equals("slot")) { + this.getSlot().add(TypeConvertor.castToReference(value)); + } else if (name.equals("account")) { + this.getAccount().add(TypeConvertor.castToReference(value)); + } else if (name.equals("created")) { + this.created = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("cancellationDate")) { + this.cancellationDate = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("note")) { + this.getNote().add(TypeConvertor.castToAnnotation(value)); + } else if (name.equals("patientInstruction")) { + this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("basedOn")) { + this.getBasedOn().add(TypeConvertor.castToReference(value)); + } else if (name.equals("subject")) { + this.subject = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("participant")) { + this.getParticipant().add((AppointmentParticipantComponent) value); + } else if (name.equals("recurrenceId")) { + this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType + } else if (name.equals("occurrenceChanged")) { + this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("recurrenceTemplate")) { + this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().remove(value); + } else if (name.equals("status")) { + value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("cancellationReason")) { + this.cancellationReason = null; + } else if (name.equals("class")) { + this.getClass_().remove(value); + } else if (name.equals("serviceCategory")) { + this.getServiceCategory().remove(value); + } else if (name.equals("serviceType")) { + this.getServiceType().remove(value); + } else if (name.equals("specialty")) { + this.getSpecialty().remove(value); + } else if (name.equals("appointmentType")) { + this.appointmentType = null; + } else if (name.equals("reason")) { + this.getReason().remove(value); + } else if (name.equals("priority")) { + this.priority = null; + } else if (name.equals("description")) { + this.description = null; + } else if (name.equals("replaces")) { + this.getReplaces().remove(value); + } else if (name.equals("virtualService")) { + this.getVirtualService().remove(value); + } else if (name.equals("supportingInformation")) { + this.getSupportingInformation().remove(value); + } else if (name.equals("previousAppointment")) { + this.previousAppointment = null; + } else if (name.equals("originatingAppointment")) { + this.originatingAppointment = null; + } else if (name.equals("start")) { + this.start = null; + } else if (name.equals("end")) { + this.end = null; + } else if (name.equals("minutesDuration")) { + this.minutesDuration = null; + } else if (name.equals("requestedPeriod")) { + this.getRequestedPeriod().remove(value); + } else if (name.equals("slot")) { + this.getSlot().remove(value); + } else if (name.equals("account")) { + this.getAccount().remove(value); + } else if (name.equals("created")) { + this.created = null; + } else if (name.equals("cancellationDate")) { + this.cancellationDate = null; + } else if (name.equals("note")) { + this.getNote().remove(value); + } else if (name.equals("patientInstruction")) { + this.getPatientInstruction().remove(value); + } else if (name.equals("basedOn")) { + this.getBasedOn().remove(value); + } else if (name.equals("subject")) { + this.subject = null; + } else if (name.equals("participant")) { + this.getParticipant().remove((AppointmentParticipantComponent) value); + } else if (name.equals("recurrenceId")) { + this.recurrenceId = null; + } else if (name.equals("occurrenceChanged")) { + this.occurrenceChanged = null; + } else if (name.equals("recurrenceTemplate")) { + this.getRecurrenceTemplate().remove((AppointmentRecurrenceTemplateComponent) value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return addIdentifier(); + case -892481550: return getStatusElement(); + case 2135095591: return getCancellationReason(); + case 94742904: return addClass_(); + case 1281188563: return addServiceCategory(); + case -1928370289: return addServiceType(); + case -1694759682: return addSpecialty(); + case -1596426375: return getAppointmentType(); + case -934964668: return addReason(); + case -1165461084: return getPriority(); + case -1724546052: return getDescriptionElement(); + case -430332865: return addReplaces(); + case 1420774698: return addVirtualService(); + case -1248768647: return addSupportingInformation(); + case -1676044248: return getPreviousAppointment(); + case 1841882230: return getOriginatingAppointment(); + case 109757538: return getStartElement(); + case 100571: return getEndElement(); + case -413630573: return getMinutesDurationElement(); + case -897241393: return addRequestedPeriod(); + case 3533310: return addSlot(); + case -1177318867: return addAccount(); + case 1028554472: return getCreatedElement(); + case 806269777: return getCancellationDateElement(); + case 3387378: return addNote(); + case 737543241: return addPatientInstruction(); + case -332612366: return addBasedOn(); + case -1867885268: return getSubject(); + case 767422259: return addParticipant(); + case -362407829: return getRecurrenceIdElement(); + case 1779864483: return getOccurrenceChangedElement(); + case 597629898: return addRecurrenceTemplate(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case -892481550: /*status*/ return new String[] {"code"}; + case 2135095591: /*cancellationReason*/ return new String[] {"CodeableConcept"}; + case 94742904: /*class*/ return new String[] {"CodeableConcept"}; + case 1281188563: /*serviceCategory*/ return new String[] {"CodeableConcept"}; + case -1928370289: /*serviceType*/ return new String[] {"CodeableReference"}; + case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"}; + case -1596426375: /*appointmentType*/ return new String[] {"CodeableConcept"}; + case -934964668: /*reason*/ return new String[] {"CodeableReference"}; + case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; + case -1724546052: /*description*/ return new String[] {"string"}; + case -430332865: /*replaces*/ return new String[] {"Reference"}; + case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; + case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; + case -1676044248: /*previousAppointment*/ return new String[] {"Reference"}; + case 1841882230: /*originatingAppointment*/ return new String[] {"Reference"}; + case 109757538: /*start*/ return new String[] {"instant"}; + case 100571: /*end*/ return new String[] {"instant"}; + case -413630573: /*minutesDuration*/ return new String[] {"positiveInt"}; + case -897241393: /*requestedPeriod*/ return new String[] {"Period"}; + case 3533310: /*slot*/ return new String[] {"Reference"}; + case -1177318867: /*account*/ return new String[] {"Reference"}; + case 1028554472: /*created*/ return new String[] {"dateTime"}; + case 806269777: /*cancellationDate*/ return new String[] {"dateTime"}; + case 3387378: /*note*/ return new String[] {"Annotation"}; + case 737543241: /*patientInstruction*/ return new String[] {"CodeableReference"}; + case -332612366: /*basedOn*/ return new String[] {"Reference"}; + case -1867885268: /*subject*/ return new String[] {"Reference"}; + case 767422259: /*participant*/ return new String[] {}; + case -362407829: /*recurrenceId*/ return new String[] {"positiveInt"}; + case 1779864483: /*occurrenceChanged*/ return new String[] {"boolean"}; + case 597629898: /*recurrenceTemplate*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.status"); + } + else if (name.equals("cancellationReason")) { + this.cancellationReason = new CodeableConcept(); + return this.cancellationReason; + } + else if (name.equals("class")) { + return addClass_(); + } + else if (name.equals("serviceCategory")) { + return addServiceCategory(); + } + 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")) { + return addReason(); + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.description"); + } + else if (name.equals("replaces")) { + return addReplaces(); + } + else if (name.equals("virtualService")) { + return addVirtualService(); + } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } + else if (name.equals("previousAppointment")) { + this.previousAppointment = new Reference(); + return this.previousAppointment; + } + else if (name.equals("originatingAppointment")) { + this.originatingAppointment = new Reference(); + return this.originatingAppointment; + } + else if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.end"); + } + else if (name.equals("minutesDuration")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.minutesDuration"); + } + else if (name.equals("requestedPeriod")) { + return addRequestedPeriod(); + } + else if (name.equals("slot")) { + return addSlot(); + } + else if (name.equals("account")) { + return addAccount(); + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.created"); + } + else if (name.equals("cancellationDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.cancellationDate"); + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("patientInstruction")) { + return addPatientInstruction(); + } + else if (name.equals("basedOn")) { + return addBasedOn(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("recurrenceId")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.recurrenceId"); + } + else if (name.equals("occurrenceChanged")) { + throw new FHIRException("Cannot call addChild on a singleton property Appointment.occurrenceChanged"); + } + else if (name.equals("recurrenceTemplate")) { + return addRecurrenceTemplate(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Appointment"; + + } + + public Appointment copy() { + Appointment dst = new Appointment(); + copyValues(dst); + return dst; + } + + public void copyValues(Appointment dst) { + super.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(); + dst.cancellationReason = cancellationReason == null ? null : cancellationReason.copy(); + if (class_ != null) { + dst.class_ = new ArrayList(); + for (CodeableConcept i : class_) + dst.class_.add(i.copy()); + }; + if (serviceCategory != null) { + dst.serviceCategory = new ArrayList(); + for (CodeableConcept i : serviceCategory) + dst.serviceCategory.add(i.copy()); + }; + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (CodeableReference 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(); + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableReference i : reason) + dst.reason.add(i.copy()); + }; + dst.priority = priority == null ? null : priority.copy(); + dst.description = description == null ? null : description.copy(); + if (replaces != null) { + dst.replaces = new ArrayList(); + for (Reference i : replaces) + dst.replaces.add(i.copy()); + }; + if (virtualService != null) { + dst.virtualService = new ArrayList(); + for (VirtualServiceDetail i : virtualService) + dst.virtualService.add(i.copy()); + }; + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; + dst.previousAppointment = previousAppointment == null ? null : previousAppointment.copy(); + dst.originatingAppointment = originatingAppointment == null ? null : originatingAppointment.copy(); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + dst.minutesDuration = minutesDuration == null ? null : minutesDuration.copy(); + if (requestedPeriod != null) { + dst.requestedPeriod = new ArrayList(); + for (Period i : requestedPeriod) + dst.requestedPeriod.add(i.copy()); + }; + if (slot != null) { + dst.slot = new ArrayList(); + for (Reference i : slot) + dst.slot.add(i.copy()); + }; + if (account != null) { + dst.account = new ArrayList(); + for (Reference i : account) + dst.account.add(i.copy()); + }; + dst.created = created == null ? null : created.copy(); + dst.cancellationDate = cancellationDate == null ? null : cancellationDate.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + if (patientInstruction != null) { + dst.patientInstruction = new ArrayList(); + for (CodeableReference i : patientInstruction) + dst.patientInstruction.add(i.copy()); + }; + if (basedOn != null) { + dst.basedOn = new ArrayList(); + for (Reference i : basedOn) + dst.basedOn.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + if (participant != null) { + dst.participant = new ArrayList(); + for (AppointmentParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + dst.recurrenceId = recurrenceId == null ? null : recurrenceId.copy(); + dst.occurrenceChanged = occurrenceChanged == null ? null : occurrenceChanged.copy(); + if (recurrenceTemplate != null) { + dst.recurrenceTemplate = new ArrayList(); + for (AppointmentRecurrenceTemplateComponent i : recurrenceTemplate) + dst.recurrenceTemplate.add(i.copy()); + }; + } + + protected Appointment typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof Appointment)) + return false; + Appointment o = (Appointment) other_; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(cancellationReason, o.cancellationReason, true) + && compareDeep(class_, o.class_, 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(replaces, o.replaces, true) && compareDeep(virtualService, o.virtualService, true) + && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(previousAppointment, o.previousAppointment, true) + && compareDeep(originatingAppointment, o.originatingAppointment, true) && compareDeep(start, o.start, true) + && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true) && compareDeep(requestedPeriod, o.requestedPeriod, true) + && compareDeep(slot, o.slot, true) && compareDeep(account, o.account, true) && compareDeep(created, o.created, true) + && compareDeep(cancellationDate, o.cancellationDate, true) && compareDeep(note, o.note, true) && compareDeep(patientInstruction, o.patientInstruction, true) + && compareDeep(basedOn, o.basedOn, true) && compareDeep(subject, o.subject, true) && compareDeep(participant, o.participant, true) + && compareDeep(recurrenceId, o.recurrenceId, true) && compareDeep(occurrenceChanged, o.occurrenceChanged, true) + && compareDeep(recurrenceTemplate, o.recurrenceTemplate, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof Appointment)) + return false; + Appointment o = (Appointment) other_; + return compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(start, o.start, true) + && compareValues(end, o.end, true) && compareValues(minutesDuration, o.minutesDuration, true) && compareValues(created, o.created, true) + && compareValues(cancellationDate, o.cancellationDate, true) && compareValues(recurrenceId, o.recurrenceId, true) + && compareValues(occurrenceChanged, o.occurrenceChanged, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, cancellationReason + , class_, serviceCategory, serviceType, specialty, appointmentType, reason, priority + , description, replaces, virtualService, supportingInformation, previousAppointment + , originatingAppointment, start, end, minutesDuration, requestedPeriod, slot, account + , created, cancellationDate, note, patientInstruction, basedOn, subject, participant + , recurrenceId, occurrenceChanged, recurrenceTemplate); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Appointment; + } + + /** + * Search parameter: actor + *

+ * Description: Any one of the individuals participating in the appointment
+ * Type: reference
+ * Path: Appointment.participant.actor
+ *

+ */ + @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="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) + public static final String SP_ACTOR = "actor"; + /** + * Fluent Client search parameter constant for actor + *

+ * Description: Any one of the individuals participating in the appointment
+ * Type: reference
+ * Path: Appointment.participant.actor
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:actor". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("Appointment:actor").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: based-on + *

+ * Description: The service request this appointment is allocated to assess
+ * Type: reference
+ * Path: Appointment.basedOn
+ *

+ */ + @SearchParamDefinition(name="based-on", path="Appointment.basedOn", description="The service request this appointment is allocated to assess", type="reference", target={CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class } ) + public static final String SP_BASED_ON = "based-on"; + /** + * Fluent Client search parameter constant for based-on + *

+ * Description: The service request this appointment is allocated to assess
+ * Type: reference
+ * Path: Appointment.basedOn
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:based-on". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Appointment:based-on").toLocked(); + + /** + * Search parameter: group + *

+ * Description: One of the individuals of the appointment is this patient
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)
+ *

+ */ + @SearchParamDefinition(name="group", path="Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class } ) + public static final String SP_GROUP = "group"; + /** + * Fluent Client search parameter constant for group + *

+ * Description: One of the individuals of the appointment is this patient
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GROUP = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GROUP); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:group". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_GROUP = new ca.uhn.fhir.model.api.Include("Appointment:group").toLocked(); + + /** + * Search parameter: location + *

+ * Description: This location is listed in the participants of the appointment
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is Location)
+ *

+ */ + @SearchParamDefinition(name="location", path="Appointment.participant.actor.where(resolve() is Location)", description="This location is listed in the participants of the appointment", type="reference", target={Location.class } ) + public static final String SP_LOCATION = "location"; + /** + * Fluent Client search parameter constant for location + *

+ * Description: This location is listed in the participants of the appointment
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is 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 "Appointment:location". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Appointment:location").toLocked(); + + /** + * Search parameter: part-status + *

+ * Description: The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.
+ * Type: token
+ * Path: Appointment.participant.status
+ *

+ */ + @SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" ) + public static final String SP_PART_STATUS = "part-status"; + /** + * Fluent Client search parameter constant for part-status + *

+ * Description: The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.
+ * Type: token
+ * Path: Appointment.participant.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PART_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PART_STATUS); + + /** + * Search parameter: practitioner + *

+ * Description: One of the individuals of the appointment is this practitioner
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is Practitioner)
+ *

+ */ + @SearchParamDefinition(name="practitioner", path="Appointment.participant.actor.where(resolve() is Practitioner)", description="One of the individuals of the appointment is this practitioner", type="reference", target={Practitioner.class } ) + public static final String SP_PRACTITIONER = "practitioner"; + /** + * Fluent Client search parameter constant for practitioner + *

+ * Description: One of the individuals of the appointment is this practitioner
+ * Type: reference
+ * Path: Appointment.participant.actor.where(resolve() is 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 "Appointment:practitioner". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Appointment:practitioner").toLocked(); + + /** + * Search parameter: reason-code + *

+ * Description: Reference to a concept (by class)
+ * Type: token
+ * Path: Appointment.reason.concept
+ *

+ */ + @SearchParamDefinition(name="reason-code", path="Appointment.reason.concept", description="Reference to a concept (by class)", type="token" ) + public static final String SP_REASON_CODE = "reason-code"; + /** + * Fluent Client search parameter constant for reason-code + *

+ * Description: Reference to a concept (by class)
+ * Type: token
+ * Path: Appointment.reason.concept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE); + + /** + * Search parameter: reason-reference + *

+ * Description: Reference to a resource (by instance)
+ * Type: reference
+ * Path: Appointment.reason.reference
+ *

+ */ + @SearchParamDefinition(name="reason-reference", path="Appointment.reason.reference", description="Reference to a resource (by instance)", type="reference", target={Condition.class, ImmunizationRecommendation.class, Observation.class, Procedure.class } ) + public static final String SP_REASON_REFERENCE = "reason-reference"; + /** + * Fluent Client search parameter constant for reason-reference + *

+ * Description: Reference to a resource (by instance)
+ * Type: reference
+ * Path: Appointment.reason.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:reason-reference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:reason-reference").toLocked(); + + /** + * Search parameter: requested-period + *

+ * Description: During what period was the Appointment requested to take place
+ * Type: date
+ * Path: requestedPeriod
+ *

+ */ + @SearchParamDefinition(name="requested-period", path="requestedPeriod", description="During what period was the Appointment requested to take place", type="date" ) + public static final String SP_REQUESTED_PERIOD = "requested-period"; + /** + * Fluent Client search parameter constant for requested-period + *

+ * Description: During what period was the Appointment requested to take place
+ * Type: date
+ * Path: requestedPeriod
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam REQUESTED_PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_REQUESTED_PERIOD); + + /** + * Search parameter: service-category + *

+ * Description: A broad categorization of the service that is to be performed during this appointment
+ * Type: token
+ * Path: Appointment.serviceCategory
+ *

+ */ + @SearchParamDefinition(name="service-category", path="Appointment.serviceCategory", description="A broad categorization of the service that is to be performed during this appointment", type="token" ) + public static final String SP_SERVICE_CATEGORY = "service-category"; + /** + * Fluent Client search parameter constant for service-category + *

+ * Description: A broad categorization of the service that is to be performed during this appointment
+ * Type: token
+ * Path: Appointment.serviceCategory
+ *

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

+ * Description: The specific service (by HealthcareService) that is to be performed during this appointment
+ * Type: reference
+ * Path: Appointment.serviceType.reference
+ *

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

+ * Description: The specific service (by HealthcareService) that is to be performed during this appointment
+ * Type: reference
+ * Path: Appointment.serviceType.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE_TYPE_REFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:service-type-reference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:service-type-reference").toLocked(); + + /** + * Search parameter: service-type + *

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

+ */ + @SearchParamDefinition(name="service-type", path="Appointment.serviceType.concept", description="The specific service (by coding) 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 (by coding) that is to be performed during this appointment
+ * Type: token
+ * Path: Appointment.serviceType.concept
+ *

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

+ * Description: The slots that this appointment is filling
+ * Type: reference
+ * Path: Appointment.slot
+ *

+ */ + @SearchParamDefinition(name="slot", path="Appointment.slot", description="The slots that this appointment is filling", type="reference", target={Slot.class } ) + public static final String SP_SLOT = "slot"; + /** + * Fluent Client search parameter constant for slot + *

+ * Description: The slots that this appointment is filling
+ * Type: reference
+ * Path: Appointment.slot
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SLOT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SLOT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:slot". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SLOT = new ca.uhn.fhir.model.api.Include("Appointment:slot").toLocked(); + + /** + * Search parameter: specialty + *

+ * Description: The specialty of a practitioner that would be required to perform the service requested in this appointment
+ * Type: token
+ * Path: Appointment.specialty
+ *

+ */ + @SearchParamDefinition(name="specialty", path="Appointment.specialty", description="The specialty of a practitioner that would be required to perform the service requested in this appointment", type="token" ) + public static final String SP_SPECIALTY = "specialty"; + /** + * Fluent Client search parameter constant for specialty + *

+ * Description: The specialty of a practitioner that would be required to perform the service requested in this appointment
+ * Type: token
+ * Path: Appointment.specialty
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY); + + /** + * Search parameter: status + *

+ * Description: The overall status of the appointment
+ * Type: token
+ * Path: Appointment.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: The overall status of the appointment
+ * Type: token
+ * Path: Appointment.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + /** + * Search parameter: subject + *

+ * Description: One of the individuals of the appointment is this patient
+ * Type: reference
+ * Path: Appointment.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="Appointment.subject", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class, Patient.class } ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: One of the individuals of the appointment is this patient
+ * Type: reference
+ * Path: Appointment.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 "Appointment:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Appointment:subject").toLocked(); + + /** + * Search parameter: supporting-info + *

+ * Description: Additional information to support the appointment
+ * Type: reference
+ * Path: Appointment.supportingInformation
+ *

+ */ + @SearchParamDefinition(name="supporting-info", path="Appointment.supportingInformation", description="Additional information to support the appointment", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) + public static final String SP_SUPPORTING_INFO = "supporting-info"; + /** + * Fluent Client search parameter constant for supporting-info + *

+ * Description: Additional information to support the appointment
+ * Type: reference
+ * Path: Appointment.supportingInformation
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTING_INFO = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTING_INFO); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Appointment:supporting-info". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTING_INFO = new ca.uhn.fhir.model.api.Include("Appointment:supporting-info").toLocked(); + + /** + * Search parameter: date + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): When the event occurred +* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded +* [Appointment](appointment.html): Appointment date/time. +* [AuditEvent](auditevent.html): Time when the event was recorded +* [CarePlan](careplan.html): Time period plan covers +* [CareTeam](careteam.html): A date within the coverage time period. +* [ClinicalImpression](clinicalimpression.html): When the assessment was documented +* [Composition](composition.html): Composition editing time +* [Consent](consent.html): When consent was agreed to +* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report +* [DocumentReference](documentreference.html): When this document reference was created +* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted +* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period +* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated +* [Flag](flag.html): Time period when flag is active +* [Immunization](immunization.html): Vaccination (non)-Administration Date +* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated +* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created +* [Invoice](invoice.html): Invoice date / posting date +* [List](list.html): When the list was prepared +* [MeasureReport](measurereport.html): The date of the measure report +* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication +* [Observation](observation.html): Clinically relevant time/time-period for observation +* [Procedure](procedure.html): When the procedure occurred or is occurring +* [ResearchSubject](researchsubject.html): Start and end of participation +* [RiskAssessment](riskassessment.html): When was assessment made? +* [SupplyRequest](supplyrequest.html): When the request was made +
+ * Type: date
+ * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
+ *

+ */ + @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): When the event occurred +* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded +* [Appointment](appointment.html): Appointment date/time. +* [AuditEvent](auditevent.html): Time when the event was recorded +* [CarePlan](careplan.html): Time period plan covers +* [CareTeam](careteam.html): A date within the coverage time period. +* [ClinicalImpression](clinicalimpression.html): When the assessment was documented +* [Composition](composition.html): Composition editing time +* [Consent](consent.html): When consent was agreed to +* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report +* [DocumentReference](documentreference.html): When this document reference was created +* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted +* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period +* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated +* [Flag](flag.html): Time period when flag is active +* [Immunization](immunization.html): Vaccination (non)-Administration Date +* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated +* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created +* [Invoice](invoice.html): Invoice date / posting date +* [List](list.html): When the list was prepared +* [MeasureReport](measurereport.html): The date of the measure report +* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication +* [Observation](observation.html): Clinically relevant time/time-period for observation +* [Procedure](procedure.html): When the procedure occurred or is occurring +* [ResearchSubject](researchsubject.html): Start and end of participation +* [RiskAssessment](riskassessment.html): When was assessment made? +* [SupplyRequest](supplyrequest.html): When the request was made +
+ * Type: date
+ * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Appointment:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Appointment:patient").toLocked(); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AppointmentResponse.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AppointmentResponse.java index 3f0243e20..024ec7541 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AppointmentResponse.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AppointmentResponse.java @@ -180,7 +180,9 @@ public class AppointmentResponse extends DomainResource { throw new FHIRException("Unknown AppointmentResponseStatus code '"+codeString+"'"); } public String toCode(AppointmentResponseStatus code) { - if (code == AppointmentResponseStatus.ACCEPTED) + if (code == AppointmentResponseStatus.NULL) + return null; + if (code == AppointmentResponseStatus.ACCEPTED) return "accepted"; if (code == AppointmentResponseStatus.DECLINED) return "declined"; @@ -191,7 +193,7 @@ public class AppointmentResponse extends DomainResource { if (code == AppointmentResponseStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(AppointmentResponseStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ArtifactAssessment.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ArtifactAssessment.java index e62acf6c9..13cdfdc50 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ArtifactAssessment.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ArtifactAssessment.java @@ -180,7 +180,9 @@ public class ArtifactAssessment extends DomainResource { throw new FHIRException("Unknown ArtifactAssessmentDisposition code '"+codeString+"'"); } public String toCode(ArtifactAssessmentDisposition code) { - if (code == ArtifactAssessmentDisposition.UNRESOLVED) + if (code == ArtifactAssessmentDisposition.NULL) + return null; + if (code == ArtifactAssessmentDisposition.UNRESOLVED) return "unresolved"; if (code == ArtifactAssessmentDisposition.NOTPERSUASIVE) return "not-persuasive"; @@ -191,7 +193,7 @@ public class ArtifactAssessment extends DomainResource { if (code == ArtifactAssessmentDisposition.NOTPERSUASIVEWITHMODIFICATION) return "not-persuasive-with-modification"; return "?"; - } + } public String toSystem(ArtifactAssessmentDisposition code) { return code.getSystem(); } @@ -338,7 +340,9 @@ public class ArtifactAssessment extends DomainResource { throw new FHIRException("Unknown ArtifactAssessmentInformationType code '"+codeString+"'"); } public String toCode(ArtifactAssessmentInformationType code) { - if (code == ArtifactAssessmentInformationType.COMMENT) + if (code == ArtifactAssessmentInformationType.NULL) + return null; + if (code == ArtifactAssessmentInformationType.COMMENT) return "comment"; if (code == ArtifactAssessmentInformationType.CLASSIFIER) return "classifier"; @@ -351,7 +355,7 @@ public class ArtifactAssessment extends DomainResource { if (code == ArtifactAssessmentInformationType.CHANGEREQUEST) return "change-request"; return "?"; - } + } public String toSystem(ArtifactAssessmentInformationType code) { return code.getSystem(); } @@ -554,7 +558,9 @@ public class ArtifactAssessment extends DomainResource { throw new FHIRException("Unknown ArtifactAssessmentWorkflowStatus code '"+codeString+"'"); } public String toCode(ArtifactAssessmentWorkflowStatus code) { - if (code == ArtifactAssessmentWorkflowStatus.SUBMITTED) + if (code == ArtifactAssessmentWorkflowStatus.NULL) + return null; + if (code == ArtifactAssessmentWorkflowStatus.SUBMITTED) return "submitted"; if (code == ArtifactAssessmentWorkflowStatus.TRIAGED) return "triaged"; @@ -575,7 +581,7 @@ public class ArtifactAssessment extends DomainResource { if (code == ArtifactAssessmentWorkflowStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(ArtifactAssessmentWorkflowStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AuditEvent.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AuditEvent.java index 7a36a33c3..1cc7274a4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AuditEvent.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/AuditEvent.java @@ -180,7 +180,9 @@ public class AuditEvent extends DomainResource { throw new FHIRException("Unknown AuditEventAction code '"+codeString+"'"); } public String toCode(AuditEventAction code) { - if (code == AuditEventAction.C) + if (code == AuditEventAction.NULL) + return null; + if (code == AuditEventAction.C) return "C"; if (code == AuditEventAction.R) return "R"; @@ -191,7 +193,7 @@ public class AuditEvent extends DomainResource { if (code == AuditEventAction.E) return "E"; return "?"; - } + } public String toSystem(AuditEventAction code) { return code.getSystem(); } @@ -366,7 +368,9 @@ public class AuditEvent extends DomainResource { throw new FHIRException("Unknown AuditEventSeverity code '"+codeString+"'"); } public String toCode(AuditEventSeverity code) { - if (code == AuditEventSeverity.EMERGENCY) + if (code == AuditEventSeverity.NULL) + return null; + if (code == AuditEventSeverity.EMERGENCY) return "emergency"; if (code == AuditEventSeverity.ALERT) return "alert"; @@ -383,7 +387,7 @@ public class AuditEvent extends DomainResource { if (code == AuditEventSeverity.DEBUG) return "debug"; return "?"; - } + } public String toSystem(AuditEventSeverity code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/BiologicallyDerivedProductDispense.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/BiologicallyDerivedProductDispense.java index 765efc3be..10e33707f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/BiologicallyDerivedProductDispense.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/BiologicallyDerivedProductDispense.java @@ -222,7 +222,9 @@ public class BiologicallyDerivedProductDispense extends DomainResource { throw new FHIRException("Unknown BiologicallyDerivedProductDispenseCodes code '"+codeString+"'"); } public String toCode(BiologicallyDerivedProductDispenseCodes code) { - if (code == BiologicallyDerivedProductDispenseCodes.PREPARATION) + if (code == BiologicallyDerivedProductDispenseCodes.NULL) + return null; + if (code == BiologicallyDerivedProductDispenseCodes.PREPARATION) return "preparation"; if (code == BiologicallyDerivedProductDispenseCodes.INPROGRESS) return "in-progress"; @@ -239,7 +241,7 @@ public class BiologicallyDerivedProductDispense extends DomainResource { if (code == BiologicallyDerivedProductDispenseCodes.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(BiologicallyDerivedProductDispenseCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Bundle.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Bundle.java index 96d6baf6b..72172db4a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Bundle.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Bundle.java @@ -252,7 +252,9 @@ public class Bundle extends Resource implements IBaseBundle { throw new FHIRException("Unknown BundleType code '"+codeString+"'"); } public String toCode(BundleType code) { - if (code == BundleType.DOCUMENT) + if (code == BundleType.NULL) + return null; + if (code == BundleType.DOCUMENT) return "document"; if (code == BundleType.MESSAGE) return "message"; @@ -273,7 +275,7 @@ public class Bundle extends Resource implements IBaseBundle { if (code == BundleType.SUBSCRIPTIONNOTIFICATION) return "subscription-notification"; return "?"; - } + } public String toSystem(BundleType code) { return code.getSystem(); } @@ -420,7 +422,9 @@ public class Bundle extends Resource implements IBaseBundle { throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); } public String toCode(HTTPVerb code) { - if (code == HTTPVerb.GET) + if (code == HTTPVerb.NULL) + return null; + if (code == HTTPVerb.GET) return "GET"; if (code == HTTPVerb.HEAD) return "HEAD"; @@ -433,7 +437,7 @@ public class Bundle extends Resource implements IBaseBundle { if (code == HTTPVerb.PATCH) return "PATCH"; return "?"; - } + } public String toSystem(HTTPVerb code) { return code.getSystem(); } @@ -2176,7 +2180,9 @@ public class Bundle extends Resource implements IBaseBundle { throw new FHIRException("Unknown LinkRelationTypes code '"+codeString+"'"); } public String toCode(LinkRelationTypes code) { - if (code == LinkRelationTypes.ABOUT) + if (code == LinkRelationTypes.NULL) + return null; + if (code == LinkRelationTypes.ABOUT) return "about"; if (code == LinkRelationTypes.ACL) return "acl"; @@ -2417,7 +2423,7 @@ public class Bundle extends Resource implements IBaseBundle { if (code == LinkRelationTypes.WORKINGCOPYOF) return "working-copy-of"; return "?"; - } + } public String toSystem(LinkRelationTypes code) { return code.getSystem(); } @@ -2522,14 +2528,16 @@ public class Bundle extends Resource implements IBaseBundle { throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); } public String toCode(SearchEntryMode code) { - if (code == SearchEntryMode.MATCH) + if (code == SearchEntryMode.NULL) + return null; + if (code == SearchEntryMode.MATCH) return "match"; if (code == SearchEntryMode.INCLUDE) return "include"; if (code == SearchEntryMode.OUTCOME) return "outcome"; return "?"; - } + } public String toSystem(SearchEntryMode code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CapabilityStatement.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CapabilityStatement.java index 0250160da..e02bf68e1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CapabilityStatement.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CapabilityStatement.java @@ -153,14 +153,16 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); } public String toCode(ConditionalDeleteStatus code) { - if (code == ConditionalDeleteStatus.NOTSUPPORTED) + if (code == ConditionalDeleteStatus.NULL) + return null; + if (code == ConditionalDeleteStatus.NOTSUPPORTED) return "not-supported"; if (code == ConditionalDeleteStatus.SINGLE) return "single"; if (code == ConditionalDeleteStatus.MULTIPLE) return "multiple"; return "?"; - } + } public String toSystem(ConditionalDeleteStatus code) { return code.getSystem(); } @@ -279,7 +281,9 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown ConditionalReadStatus code '"+codeString+"'"); } public String toCode(ConditionalReadStatus code) { - if (code == ConditionalReadStatus.NOTSUPPORTED) + if (code == ConditionalReadStatus.NULL) + return null; + if (code == ConditionalReadStatus.NOTSUPPORTED) return "not-supported"; if (code == ConditionalReadStatus.MODIFIEDSINCE) return "modified-since"; @@ -288,7 +292,7 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo if (code == ConditionalReadStatus.FULLSUPPORT) return "full-support"; return "?"; - } + } public String toSystem(ConditionalReadStatus code) { return code.getSystem(); } @@ -379,12 +383,14 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); } public String toCode(DocumentMode code) { - if (code == DocumentMode.PRODUCER) + if (code == DocumentMode.NULL) + return null; + if (code == DocumentMode.PRODUCER) return "producer"; if (code == DocumentMode.CONSUMER) return "consumer"; return "?"; - } + } public String toSystem(DocumentMode code) { return code.getSystem(); } @@ -475,12 +481,14 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown EventCapabilityMode code '"+codeString+"'"); } public String toCode(EventCapabilityMode code) { - if (code == EventCapabilityMode.SENDER) + if (code == EventCapabilityMode.NULL) + return null; + if (code == EventCapabilityMode.SENDER) return "sender"; if (code == EventCapabilityMode.RECEIVER) return "receiver"; return "?"; - } + } public String toSystem(EventCapabilityMode code) { return code.getSystem(); } @@ -613,7 +621,9 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown ReferenceHandlingPolicy code '"+codeString+"'"); } public String toCode(ReferenceHandlingPolicy code) { - if (code == ReferenceHandlingPolicy.LITERAL) + if (code == ReferenceHandlingPolicy.NULL) + return null; + if (code == ReferenceHandlingPolicy.LITERAL) return "literal"; if (code == ReferenceHandlingPolicy.LOGICAL) return "logical"; @@ -624,7 +634,7 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo if (code == ReferenceHandlingPolicy.LOCAL) return "local"; return "?"; - } + } public String toSystem(ReferenceHandlingPolicy code) { return code.getSystem(); } @@ -729,14 +739,16 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); } public String toCode(ResourceVersionPolicy code) { - if (code == ResourceVersionPolicy.NOVERSION) + if (code == ResourceVersionPolicy.NULL) + return null; + if (code == ResourceVersionPolicy.NOVERSION) return "no-version"; if (code == ResourceVersionPolicy.VERSIONED) return "versioned"; if (code == ResourceVersionPolicy.VERSIONEDUPDATE) return "versioned-update"; return "?"; - } + } public String toSystem(ResourceVersionPolicy code) { return code.getSystem(); } @@ -827,12 +839,14 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'"); } public String toCode(RestfulCapabilityMode code) { - if (code == RestfulCapabilityMode.CLIENT) + if (code == RestfulCapabilityMode.NULL) + return null; + if (code == RestfulCapabilityMode.CLIENT) return "client"; if (code == RestfulCapabilityMode.SERVER) return "server"; return "?"; - } + } public String toSystem(RestfulCapabilityMode code) { return code.getSystem(); } @@ -951,7 +965,9 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); } public String toCode(SystemRestfulInteraction code) { - if (code == SystemRestfulInteraction.TRANSACTION) + if (code == SystemRestfulInteraction.NULL) + return null; + if (code == SystemRestfulInteraction.TRANSACTION) return "transaction"; if (code == SystemRestfulInteraction.BATCH) return "batch"; @@ -960,7 +976,7 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo if (code == SystemRestfulInteraction.HISTORYSYSTEM) return "history-system"; return "?"; - } + } public String toSystem(SystemRestfulInteraction code) { return code.getSystem(); } @@ -1149,7 +1165,9 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); } public String toCode(TypeRestfulInteraction code) { - if (code == TypeRestfulInteraction.READ) + if (code == TypeRestfulInteraction.NULL) + return null; + if (code == TypeRestfulInteraction.READ) return "read"; if (code == TypeRestfulInteraction.VREAD) return "vread"; @@ -1168,7 +1186,7 @@ public class CapabilityStatement extends CanonicalResource implements IBaseConfo if (code == TypeRestfulInteraction.SEARCHTYPE) return "search-type"; return "?"; - } + } public String toSystem(TypeRestfulInteraction code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CarePlan.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CarePlan.java index 26a76987a..27449788e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CarePlan.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CarePlan.java @@ -180,7 +180,9 @@ public class CarePlan extends DomainResource { throw new FHIRException("Unknown CarePlanIntent code '"+codeString+"'"); } public String toCode(CarePlanIntent code) { - if (code == CarePlanIntent.PROPOSAL) + if (code == CarePlanIntent.NULL) + return null; + if (code == CarePlanIntent.PROPOSAL) return "proposal"; if (code == CarePlanIntent.PLAN) return "plan"; @@ -191,7 +193,7 @@ public class CarePlan extends DomainResource { if (code == CarePlanIntent.DIRECTIVE) return "directive"; return "?"; - } + } public String toSystem(CarePlanIntent code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CareTeam.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CareTeam.java index 40bff280e..7e8c0d651 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CareTeam.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CareTeam.java @@ -180,7 +180,9 @@ public class CareTeam extends DomainResource { throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'"); } public String toCode(CareTeamStatus code) { - if (code == CareTeamStatus.PROPOSED) + if (code == CareTeamStatus.NULL) + return null; + if (code == CareTeamStatus.PROPOSED) return "proposed"; if (code == CareTeamStatus.ACTIVE) return "active"; @@ -191,7 +193,7 @@ public class CareTeam extends DomainResource { if (code == CareTeamStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(CareTeamStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ChargeItem.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ChargeItem.java index 168f303d2..de6695cea 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ChargeItem.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ChargeItem.java @@ -208,7 +208,9 @@ public class ChargeItem extends DomainResource { throw new FHIRException("Unknown ChargeItemStatus code '"+codeString+"'"); } public String toCode(ChargeItemStatus code) { - if (code == ChargeItemStatus.PLANNED) + if (code == ChargeItemStatus.NULL) + return null; + if (code == ChargeItemStatus.PLANNED) return "planned"; if (code == ChargeItemStatus.BILLABLE) return "billable"; @@ -223,7 +225,7 @@ public class ChargeItem extends DomainResource { if (code == ChargeItemStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(ChargeItemStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Citation.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Citation.java index ad32d793e..7d7cbfe42 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Citation.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Citation.java @@ -642,7 +642,9 @@ public class Citation extends MetadataResource { throw new FHIRException("Unknown RelatedArtifactTypeExpanded code '"+codeString+"'"); } public String toCode(RelatedArtifactTypeExpanded code) { - if (code == RelatedArtifactTypeExpanded.DOCUMENTATION) + if (code == RelatedArtifactTypeExpanded.NULL) + return null; + if (code == RelatedArtifactTypeExpanded.DOCUMENTATION) return "documentation"; if (code == RelatedArtifactTypeExpanded.JUSTIFICATION) return "justification"; @@ -719,7 +721,7 @@ public class Citation extends MetadataResource { if (code == RelatedArtifactTypeExpanded.REPRINTOF) return "reprint-of"; return "?"; - } + } public String toSystem(RelatedArtifactTypeExpanded code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ClinicalUseDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ClinicalUseDefinition.java index 856e8e12f..e3eef2b68 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ClinicalUseDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ClinicalUseDefinition.java @@ -180,7 +180,9 @@ public class ClinicalUseDefinition extends DomainResource { throw new FHIRException("Unknown ClinicalUseDefinitionType code '"+codeString+"'"); } public String toCode(ClinicalUseDefinitionType code) { - if (code == ClinicalUseDefinitionType.INDICATION) + if (code == ClinicalUseDefinitionType.NULL) + return null; + if (code == ClinicalUseDefinitionType.INDICATION) return "indication"; if (code == ClinicalUseDefinitionType.CONTRAINDICATION) return "contraindication"; @@ -191,7 +193,7 @@ public class ClinicalUseDefinition extends DomainResource { if (code == ClinicalUseDefinitionType.WARNING) return "warning"; return "?"; - } + } public String toSystem(ClinicalUseDefinitionType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CodeSystem.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CodeSystem.java index 118e193e2..82b19bb0c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CodeSystem.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CodeSystem.java @@ -166,7 +166,9 @@ public class CodeSystem extends MetadataResource { throw new FHIRException("Unknown CodeSystemHierarchyMeaning code '"+codeString+"'"); } public String toCode(CodeSystemHierarchyMeaning code) { - if (code == CodeSystemHierarchyMeaning.GROUPEDBY) + if (code == CodeSystemHierarchyMeaning.NULL) + return null; + if (code == CodeSystemHierarchyMeaning.GROUPEDBY) return "grouped-by"; if (code == CodeSystemHierarchyMeaning.ISA) return "is-a"; @@ -175,7 +177,7 @@ public class CodeSystem extends MetadataResource { if (code == CodeSystemHierarchyMeaning.CLASSIFIEDWITH) return "classified-with"; return "?"; - } + } public String toSystem(CodeSystemHierarchyMeaning code) { return code.getSystem(); } @@ -336,7 +338,9 @@ public class CodeSystem extends MetadataResource { throw new FHIRException("Unknown PropertyType code '"+codeString+"'"); } public String toCode(PropertyType code) { - if (code == PropertyType.CODE) + if (code == PropertyType.NULL) + return null; + if (code == PropertyType.CODE) return "code"; if (code == PropertyType.CODING) return "Coding"; @@ -351,7 +355,7 @@ public class CodeSystem extends MetadataResource { if (code == PropertyType.DECIMAL) return "decimal"; return "?"; - } + } public String toSystem(PropertyType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConceptMap.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConceptMap.java index e83e46265..0e6de923b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConceptMap.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConceptMap.java @@ -180,7 +180,9 @@ public class ConceptMap extends MetadataResource { throw new FHIRException("Unknown ConceptMapAttributeType code '"+codeString+"'"); } public String toCode(ConceptMapAttributeType code) { - if (code == ConceptMapAttributeType.CODE) + if (code == ConceptMapAttributeType.NULL) + return null; + if (code == ConceptMapAttributeType.CODE) return "code"; if (code == ConceptMapAttributeType.CODING) return "Coding"; @@ -191,7 +193,7 @@ public class ConceptMap extends MetadataResource { if (code == ConceptMapAttributeType.QUANTITY) return "Quantity"; return "?"; - } + } public String toSystem(ConceptMapAttributeType code) { return code.getSystem(); } @@ -296,14 +298,16 @@ public class ConceptMap extends MetadataResource { throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'"); } public String toCode(ConceptMapGroupUnmappedMode code) { - if (code == ConceptMapGroupUnmappedMode.USESOURCECODE) + if (code == ConceptMapGroupUnmappedMode.NULL) + return null; + if (code == ConceptMapGroupUnmappedMode.USESOURCECODE) return "use-source-code"; if (code == ConceptMapGroupUnmappedMode.FIXED) return "fixed"; if (code == ConceptMapGroupUnmappedMode.OTHERMAP) return "other-map"; return "?"; - } + } public String toSystem(ConceptMapGroupUnmappedMode code) { return code.getSystem(); } @@ -464,7 +468,9 @@ public class ConceptMap extends MetadataResource { throw new FHIRException("Unknown ConceptMapPropertyType code '"+codeString+"'"); } public String toCode(ConceptMapPropertyType code) { - if (code == ConceptMapPropertyType.CODING) + if (code == ConceptMapPropertyType.NULL) + return null; + if (code == ConceptMapPropertyType.CODING) return "Coding"; if (code == ConceptMapPropertyType.STRING) return "string"; @@ -479,7 +485,7 @@ public class ConceptMap extends MetadataResource { if (code == ConceptMapPropertyType.CODE) return "code"; return "?"; - } + } public String toSystem(ConceptMapPropertyType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConditionDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConditionDefinition.java index b64169c4f..52d940b1f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConditionDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ConditionDefinition.java @@ -138,12 +138,14 @@ public class ConditionDefinition extends MetadataResource { throw new FHIRException("Unknown ConditionPreconditionType code '"+codeString+"'"); } public String toCode(ConditionPreconditionType code) { - if (code == ConditionPreconditionType.SENSITIVE) + if (code == ConditionPreconditionType.NULL) + return null; + if (code == ConditionPreconditionType.SENSITIVE) return "sensitive"; if (code == ConditionPreconditionType.SPECIFIC) return "specific"; return "?"; - } + } public String toSystem(ConditionPreconditionType code) { return code.getSystem(); } @@ -248,14 +250,16 @@ public class ConditionDefinition extends MetadataResource { throw new FHIRException("Unknown ConditionQuestionnairePurpose code '"+codeString+"'"); } public String toCode(ConditionQuestionnairePurpose code) { - if (code == ConditionQuestionnairePurpose.PREADMIT) + if (code == ConditionQuestionnairePurpose.NULL) + return null; + if (code == ConditionQuestionnairePurpose.PREADMIT) return "preadmit"; if (code == ConditionQuestionnairePurpose.DIFFDIAGNOSIS) return "diff-diagnosis"; if (code == ConditionQuestionnairePurpose.OUTCOME) return "outcome"; return "?"; - } + } public String toSystem(ConditionQuestionnairePurpose code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Consent.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Consent.java index 4a054f036..3434f714c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Consent.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Consent.java @@ -194,7 +194,9 @@ public class Consent extends DomainResource { throw new FHIRException("Unknown ConsentState code '"+codeString+"'"); } public String toCode(ConsentState code) { - if (code == ConsentState.DRAFT) + if (code == ConsentState.NULL) + return null; + if (code == ConsentState.DRAFT) return "draft"; if (code == ConsentState.ACTIVE) return "active"; @@ -207,7 +209,7 @@ public class Consent extends DomainResource { if (code == ConsentState.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(ConsentState code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ContactPoint.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ContactPoint.java index 3144ac067..94ad45765 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ContactPoint.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ContactPoint.java @@ -206,7 +206,9 @@ public class ContactPoint extends DataType implements ICompositeType { throw new FHIRException("Unknown ContactPointSystem code '"+codeString+"'"); } public String toCode(ContactPointSystem code) { - if (code == ContactPointSystem.PHONE) + if (code == ContactPointSystem.NULL) + return null; + if (code == ContactPointSystem.PHONE) return "phone"; if (code == ContactPointSystem.FAX) return "fax"; @@ -221,7 +223,7 @@ public class ContactPoint extends DataType implements ICompositeType { if (code == ContactPointSystem.OTHER) return "other"; return "?"; - } + } public String toSystem(ContactPointSystem code) { return code.getSystem(); } @@ -354,7 +356,9 @@ public class ContactPoint extends DataType implements ICompositeType { throw new FHIRException("Unknown ContactPointUse code '"+codeString+"'"); } public String toCode(ContactPointUse code) { - if (code == ContactPointUse.HOME) + if (code == ContactPointUse.NULL) + return null; + if (code == ContactPointUse.HOME) return "home"; if (code == ContactPointUse.WORK) return "work"; @@ -365,7 +369,7 @@ public class ContactPoint extends DataType implements ICompositeType { if (code == ContactPointUse.MOBILE) return "mobile"; return "?"; - } + } public String toSystem(ContactPointUse code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contract.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contract.java index 31136dc7b..ca3148630 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contract.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contract.java @@ -321,7 +321,9 @@ public class Contract extends DomainResource { throw new FHIRException("Unknown ContractResourcePublicationStatusCodes code '"+codeString+"'"); } public String toCode(ContractResourcePublicationStatusCodes code) { - if (code == ContractResourcePublicationStatusCodes.AMENDED) + if (code == ContractResourcePublicationStatusCodes.NULL) + return null; + if (code == ContractResourcePublicationStatusCodes.AMENDED) return "amended"; if (code == ContractResourcePublicationStatusCodes.APPENDED) return "appended"; @@ -352,7 +354,7 @@ public class Contract extends DomainResource { if (code == ContractResourcePublicationStatusCodes.TERMINATED) return "terminated"; return "?"; - } + } public String toSystem(ContractResourcePublicationStatusCodes code) { return code.getSystem(); } @@ -625,7 +627,9 @@ public class Contract extends DomainResource { throw new FHIRException("Unknown ContractResourceStatusCodes code '"+codeString+"'"); } public String toCode(ContractResourceStatusCodes code) { - if (code == ContractResourceStatusCodes.AMENDED) + if (code == ContractResourceStatusCodes.NULL) + return null; + if (code == ContractResourceStatusCodes.AMENDED) return "amended"; if (code == ContractResourceStatusCodes.APPENDED) return "appended"; @@ -656,7 +660,7 @@ public class Contract extends DomainResource { if (code == ContractResourceStatusCodes.TERMINATED) return "terminated"; return "?"; - } + } public String toSystem(ContractResourceStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contributor.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contributor.java index b2bd45f3f..a1a925986 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contributor.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Contributor.java @@ -164,7 +164,9 @@ public class Contributor extends DataType implements ICompositeType { throw new FHIRException("Unknown ContributorType code '"+codeString+"'"); } public String toCode(ContributorType code) { - if (code == ContributorType.AUTHOR) + if (code == ContributorType.NULL) + return null; + if (code == ContributorType.AUTHOR) return "author"; if (code == ContributorType.EDITOR) return "editor"; @@ -173,7 +175,7 @@ public class Contributor extends DataType implements ICompositeType { if (code == ContributorType.ENDORSER) return "endorser"; return "?"; - } + } public String toSystem(ContributorType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Coverage.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Coverage.java index 0caacdc07..28ec719b3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Coverage.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Coverage.java @@ -152,14 +152,16 @@ public class Coverage extends DomainResource { throw new FHIRException("Unknown Kind code '"+codeString+"'"); } public String toCode(Kind code) { - if (code == Kind.INSURANCE) + if (code == Kind.NULL) + return null; + if (code == Kind.INSURANCE) return "insurance"; if (code == Kind.SELFPAY) return "self-pay"; if (code == Kind.OTHER) return "other"; return "?"; - } + } public String toSystem(Kind code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityRequest.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityRequest.java index 658c7e2ee..d8907116e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityRequest.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityRequest.java @@ -166,7 +166,9 @@ public class CoverageEligibilityRequest extends DomainResource { throw new FHIRException("Unknown EligibilityRequestPurpose code '"+codeString+"'"); } public String toCode(EligibilityRequestPurpose code) { - if (code == EligibilityRequestPurpose.AUTHREQUIREMENTS) + if (code == EligibilityRequestPurpose.NULL) + return null; + if (code == EligibilityRequestPurpose.AUTHREQUIREMENTS) return "auth-requirements"; if (code == EligibilityRequestPurpose.BENEFITS) return "benefits"; @@ -175,7 +177,7 @@ public class CoverageEligibilityRequest extends DomainResource { if (code == EligibilityRequestPurpose.VALIDATION) return "validation"; return "?"; - } + } public String toSystem(EligibilityRequestPurpose code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityResponse.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityResponse.java index 8cc915be8..528c9fd06 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityResponse.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/CoverageEligibilityResponse.java @@ -166,7 +166,9 @@ public class CoverageEligibilityResponse extends DomainResource { throw new FHIRException("Unknown EligibilityOutcome code '"+codeString+"'"); } public String toCode(EligibilityOutcome code) { - if (code == EligibilityOutcome.QUEUED) + if (code == EligibilityOutcome.NULL) + return null; + if (code == EligibilityOutcome.QUEUED) return "queued"; if (code == EligibilityOutcome.COMPLETE) return "complete"; @@ -175,7 +177,7 @@ public class CoverageEligibilityResponse extends DomainResource { if (code == EligibilityOutcome.PARTIAL) return "partial"; return "?"; - } + } public String toSystem(EligibilityOutcome code) { return code.getSystem(); } @@ -294,7 +296,9 @@ public class CoverageEligibilityResponse extends DomainResource { throw new FHIRException("Unknown EligibilityResponsePurpose code '"+codeString+"'"); } public String toCode(EligibilityResponsePurpose code) { - if (code == EligibilityResponsePurpose.AUTHREQUIREMENTS) + if (code == EligibilityResponsePurpose.NULL) + return null; + if (code == EligibilityResponsePurpose.AUTHREQUIREMENTS) return "auth-requirements"; if (code == EligibilityResponsePurpose.BENEFITS) return "benefits"; @@ -303,7 +307,7 @@ public class CoverageEligibilityResponse extends DomainResource { if (code == EligibilityResponsePurpose.VALIDATION) return "validation"; return "?"; - } + } public String toSystem(EligibilityResponsePurpose code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DataRequirement.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DataRequirement.java index 700090a3d..a912586d4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DataRequirement.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DataRequirement.java @@ -136,12 +136,14 @@ public class DataRequirement extends DataType implements ICompositeType { throw new FHIRException("Unknown SortDirection code '"+codeString+"'"); } public String toCode(SortDirection code) { - if (code == SortDirection.ASCENDING) + if (code == SortDirection.NULL) + return null; + if (code == SortDirection.ASCENDING) return "ascending"; if (code == SortDirection.DESCENDING) return "descending"; return "?"; - } + } public String toSystem(SortDirection code) { return code.getSystem(); } @@ -302,7 +304,9 @@ public class DataRequirement extends DataType implements ICompositeType { throw new FHIRException("Unknown ValueFilterComparator code '"+codeString+"'"); } public String toCode(ValueFilterComparator code) { - if (code == ValueFilterComparator.EQ) + if (code == ValueFilterComparator.NULL) + return null; + if (code == ValueFilterComparator.EQ) return "eq"; if (code == ValueFilterComparator.GT) return "gt"; @@ -317,7 +321,7 @@ public class DataRequirement extends DataType implements ICompositeType { if (code == ValueFilterComparator.EB) return "eb"; return "?"; - } + } public String toSystem(ValueFilterComparator code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DetectedIssue.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DetectedIssue.java index c8674efa0..02637dce7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DetectedIssue.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DetectedIssue.java @@ -152,14 +152,16 @@ public class DetectedIssue extends DomainResource { throw new FHIRException("Unknown DetectedIssueSeverity code '"+codeString+"'"); } public String toCode(DetectedIssueSeverity code) { - if (code == DetectedIssueSeverity.HIGH) + if (code == DetectedIssueSeverity.NULL) + return null; + if (code == DetectedIssueSeverity.HIGH) return "high"; if (code == DetectedIssueSeverity.MODERATE) return "moderate"; if (code == DetectedIssueSeverity.LOW) return "low"; return "?"; - } + } public String toSystem(DetectedIssueSeverity code) { return code.getSystem(); } @@ -278,7 +280,9 @@ public class DetectedIssue extends DomainResource { throw new FHIRException("Unknown DetectedIssueStatus code '"+codeString+"'"); } public String toCode(DetectedIssueStatus code) { - if (code == DetectedIssueStatus.PRELIMINARY) + if (code == DetectedIssueStatus.NULL) + return null; + if (code == DetectedIssueStatus.PRELIMINARY) return "preliminary"; if (code == DetectedIssueStatus.FINAL) return "final"; @@ -287,7 +291,7 @@ public class DetectedIssue extends DomainResource { if (code == DetectedIssueStatus.MITIGATED) return "mitigated"; return "?"; - } + } public String toSystem(DetectedIssueStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Device.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Device.java index 9c166d0c9..fe0083edc 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Device.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Device.java @@ -152,14 +152,16 @@ public class Device extends DomainResource { throw new FHIRException("Unknown FHIRDeviceStatus code '"+codeString+"'"); } public String toCode(FHIRDeviceStatus code) { - if (code == FHIRDeviceStatus.ACTIVE) + if (code == FHIRDeviceStatus.NULL) + return null; + if (code == FHIRDeviceStatus.ACTIVE) return "active"; if (code == FHIRDeviceStatus.INACTIVE) return "inactive"; if (code == FHIRDeviceStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(FHIRDeviceStatus code) { return code.getSystem(); } @@ -320,7 +322,9 @@ public class Device extends DomainResource { throw new FHIRException("Unknown UDIEntryType code '"+codeString+"'"); } public String toCode(UDIEntryType code) { - if (code == UDIEntryType.BARCODE) + if (code == UDIEntryType.NULL) + return null; + if (code == UDIEntryType.BARCODE) return "barcode"; if (code == UDIEntryType.RFID) return "rfid"; @@ -335,7 +339,7 @@ public class Device extends DomainResource { if (code == UDIEntryType.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(UDIEntryType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDefinition.java index 2060fd64c..e1d09e128 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDefinition.java @@ -152,14 +152,16 @@ public class DeviceDefinition extends DomainResource { throw new FHIRException("Unknown DeviceCorrectiveActionScope code '"+codeString+"'"); } public String toCode(DeviceCorrectiveActionScope code) { - if (code == DeviceCorrectiveActionScope.MODEL) + if (code == DeviceCorrectiveActionScope.NULL) + return null; + if (code == DeviceCorrectiveActionScope.MODEL) return "model"; if (code == DeviceCorrectiveActionScope.LOTNUMBERS) return "lot-numbers"; if (code == DeviceCorrectiveActionScope.SERIALNUMBERS) return "serial-numbers"; return "?"; - } + } public String toSystem(DeviceCorrectiveActionScope code) { return code.getSystem(); } @@ -264,14 +266,16 @@ public class DeviceDefinition extends DomainResource { throw new FHIRException("Unknown DeviceDefinitionRegulatoryIdentifierType code '"+codeString+"'"); } public String toCode(DeviceDefinitionRegulatoryIdentifierType code) { - if (code == DeviceDefinitionRegulatoryIdentifierType.BASIC) + if (code == DeviceDefinitionRegulatoryIdentifierType.NULL) + return null; + if (code == DeviceDefinitionRegulatoryIdentifierType.BASIC) return "basic"; if (code == DeviceDefinitionRegulatoryIdentifierType.MASTER) return "master"; if (code == DeviceDefinitionRegulatoryIdentifierType.LICENSE) return "license"; return "?"; - } + } public String toSystem(DeviceDefinitionRegulatoryIdentifierType code) { return code.getSystem(); } @@ -418,7 +422,9 @@ public class DeviceDefinition extends DomainResource { throw new FHIRException("Unknown DeviceProductionIdentifierInUDI code '"+codeString+"'"); } public String toCode(DeviceProductionIdentifierInUDI code) { - if (code == DeviceProductionIdentifierInUDI.LOTNUMBER) + if (code == DeviceProductionIdentifierInUDI.NULL) + return null; + if (code == DeviceProductionIdentifierInUDI.LOTNUMBER) return "lot-number"; if (code == DeviceProductionIdentifierInUDI.MANUFACTUREDDATE) return "manufactured-date"; @@ -431,7 +437,7 @@ public class DeviceDefinition extends DomainResource { if (code == DeviceProductionIdentifierInUDI.SOFTWAREVERSION) return "software-version"; return "?"; - } + } public String toSystem(DeviceProductionIdentifierInUDI code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDispense.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDispense.java index a8264c26f..88b575b55 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDispense.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceDispense.java @@ -236,7 +236,9 @@ public class DeviceDispense extends DomainResource { throw new FHIRException("Unknown DeviceDispenseStatusCodes code '"+codeString+"'"); } public String toCode(DeviceDispenseStatusCodes code) { - if (code == DeviceDispenseStatusCodes.PREPARATION) + if (code == DeviceDispenseStatusCodes.NULL) + return null; + if (code == DeviceDispenseStatusCodes.PREPARATION) return "preparation"; if (code == DeviceDispenseStatusCodes.INPROGRESS) return "in-progress"; @@ -255,7 +257,7 @@ public class DeviceDispense extends DomainResource { if (code == DeviceDispenseStatusCodes.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(DeviceDispenseStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceMetric.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceMetric.java index 522b108c1..091894951 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceMetric.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceMetric.java @@ -166,7 +166,9 @@ public class DeviceMetric extends DomainResource { throw new FHIRException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); } public String toCode(DeviceMetricCalibrationState code) { - if (code == DeviceMetricCalibrationState.NOTCALIBRATED) + if (code == DeviceMetricCalibrationState.NULL) + return null; + if (code == DeviceMetricCalibrationState.NOTCALIBRATED) return "not-calibrated"; if (code == DeviceMetricCalibrationState.CALIBRATIONREQUIRED) return "calibration-required"; @@ -175,7 +177,7 @@ public class DeviceMetric extends DomainResource { if (code == DeviceMetricCalibrationState.UNSPECIFIED) return "unspecified"; return "?"; - } + } public String toSystem(DeviceMetricCalibrationState code) { return code.getSystem(); } @@ -294,7 +296,9 @@ public class DeviceMetric extends DomainResource { throw new FHIRException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); } public String toCode(DeviceMetricCalibrationType code) { - if (code == DeviceMetricCalibrationType.UNSPECIFIED) + if (code == DeviceMetricCalibrationType.NULL) + return null; + if (code == DeviceMetricCalibrationType.UNSPECIFIED) return "unspecified"; if (code == DeviceMetricCalibrationType.OFFSET) return "offset"; @@ -303,7 +307,7 @@ public class DeviceMetric extends DomainResource { if (code == DeviceMetricCalibrationType.TWOPOINT) return "two-point"; return "?"; - } + } public String toSystem(DeviceMetricCalibrationType code) { return code.getSystem(); } @@ -422,7 +426,9 @@ public class DeviceMetric extends DomainResource { throw new FHIRException("Unknown DeviceMetricCategory code '"+codeString+"'"); } public String toCode(DeviceMetricCategory code) { - if (code == DeviceMetricCategory.MEASUREMENT) + if (code == DeviceMetricCategory.NULL) + return null; + if (code == DeviceMetricCategory.MEASUREMENT) return "measurement"; if (code == DeviceMetricCategory.SETTING) return "setting"; @@ -431,7 +437,7 @@ public class DeviceMetric extends DomainResource { if (code == DeviceMetricCategory.UNSPECIFIED) return "unspecified"; return "?"; - } + } public String toSystem(DeviceMetricCategory code) { return code.getSystem(); } @@ -550,7 +556,9 @@ public class DeviceMetric extends DomainResource { throw new FHIRException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); } public String toCode(DeviceMetricOperationalStatus code) { - if (code == DeviceMetricOperationalStatus.ON) + if (code == DeviceMetricOperationalStatus.NULL) + return null; + if (code == DeviceMetricOperationalStatus.ON) return "on"; if (code == DeviceMetricOperationalStatus.OFF) return "off"; @@ -559,7 +567,7 @@ public class DeviceMetric extends DomainResource { if (code == DeviceMetricOperationalStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(DeviceMetricOperationalStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceUsage.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceUsage.java index 3ef3f7fb0..e98d5a263 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceUsage.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DeviceUsage.java @@ -208,7 +208,9 @@ public class DeviceUsage extends DomainResource { throw new FHIRException("Unknown DeviceUsageStatus code '"+codeString+"'"); } public String toCode(DeviceUsageStatus code) { - if (code == DeviceUsageStatus.ACTIVE) + if (code == DeviceUsageStatus.NULL) + return null; + if (code == DeviceUsageStatus.ACTIVE) return "active"; if (code == DeviceUsageStatus.COMPLETED) return "completed"; @@ -223,7 +225,7 @@ public class DeviceUsage extends DomainResource { if (code == DeviceUsageStatus.ONHOLD) return "on-hold"; return "?"; - } + } public String toSystem(DeviceUsageStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DiagnosticReport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DiagnosticReport.java index 870f016fa..d3b7f4eda 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DiagnosticReport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DiagnosticReport.java @@ -264,7 +264,9 @@ public class DiagnosticReport extends DomainResource { throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); } public String toCode(DiagnosticReportStatus code) { - if (code == DiagnosticReportStatus.REGISTERED) + if (code == DiagnosticReportStatus.NULL) + return null; + if (code == DiagnosticReportStatus.REGISTERED) return "registered"; if (code == DiagnosticReportStatus.PARTIAL) return "partial"; @@ -287,7 +289,7 @@ public class DiagnosticReport extends DomainResource { if (code == DiagnosticReportStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(DiagnosticReportStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DocumentReference.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DocumentReference.java index 6a046e628..b78bb004c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DocumentReference.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/DocumentReference.java @@ -152,14 +152,16 @@ public class DocumentReference extends DomainResource { throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'"); } public String toCode(DocumentReferenceStatus code) { - if (code == DocumentReferenceStatus.CURRENT) + if (code == DocumentReferenceStatus.NULL) + return null; + if (code == DocumentReferenceStatus.CURRENT) return "current"; if (code == DocumentReferenceStatus.SUPERSEDED) return "superseded"; if (code == DocumentReferenceStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(DocumentReferenceStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java index 26f0748d6..a2ea355d4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ElementDefinition.java @@ -254,7 +254,9 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown AdditionalBindingPurposeVS code '"+codeString+"'"); } public String toCode(AdditionalBindingPurposeVS code) { - if (code == AdditionalBindingPurposeVS.MAXIMUM) + if (code == AdditionalBindingPurposeVS.NULL) + return null; + if (code == AdditionalBindingPurposeVS.MAXIMUM) return "maximum"; if (code == AdditionalBindingPurposeVS.MINIMUM) return "minimum"; @@ -275,7 +277,7 @@ public class ElementDefinition extends BackboneType implements ICompositeType { if (code == AdditionalBindingPurposeVS.COMPONENT) return "component"; return "?"; - } + } public String toSystem(AdditionalBindingPurposeVS code) { return code.getSystem(); } @@ -380,14 +382,16 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown AggregationMode code '"+codeString+"'"); } public String toCode(AggregationMode code) { - if (code == AggregationMode.CONTAINED) + if (code == AggregationMode.NULL) + return null; + if (code == AggregationMode.CONTAINED) return "contained"; if (code == AggregationMode.REFERENCED) return "referenced"; if (code == AggregationMode.BUNDLED) return "bundled"; return "?"; - } + } public String toSystem(AggregationMode code) { return code.getSystem(); } @@ -478,12 +482,14 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown ConstraintSeverity code '"+codeString+"'"); } public String toCode(ConstraintSeverity code) { - if (code == ConstraintSeverity.ERROR) + if (code == ConstraintSeverity.NULL) + return null; + if (code == ConstraintSeverity.ERROR) return "error"; if (code == ConstraintSeverity.WARNING) return "warning"; return "?"; - } + } public String toSystem(ConstraintSeverity code) { return code.getSystem(); } @@ -630,7 +636,9 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown DiscriminatorType code '"+codeString+"'"); } public String toCode(DiscriminatorType code) { - if (code == DiscriminatorType.VALUE) + if (code == DiscriminatorType.NULL) + return null; + if (code == DiscriminatorType.VALUE) return "value"; if (code == DiscriminatorType.EXISTS) return "exists"; @@ -643,7 +651,7 @@ public class ElementDefinition extends BackboneType implements ICompositeType { if (code == DiscriminatorType.POSITION) return "position"; return "?"; - } + } public String toSystem(DiscriminatorType code) { return code.getSystem(); } @@ -776,7 +784,9 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); } public String toCode(PropertyRepresentation code) { - if (code == PropertyRepresentation.XMLATTR) + if (code == PropertyRepresentation.NULL) + return null; + if (code == PropertyRepresentation.XMLATTR) return "xmlAttr"; if (code == PropertyRepresentation.XMLTEXT) return "xmlText"; @@ -787,7 +797,7 @@ public class ElementDefinition extends BackboneType implements ICompositeType { if (code == PropertyRepresentation.XHTML) return "xhtml"; return "?"; - } + } public String toSystem(PropertyRepresentation code) { return code.getSystem(); } @@ -892,14 +902,16 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); } public String toCode(ReferenceVersionRules code) { - if (code == ReferenceVersionRules.EITHER) + if (code == ReferenceVersionRules.NULL) + return null; + 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(); } @@ -1004,14 +1016,16 @@ public class ElementDefinition extends BackboneType implements ICompositeType { throw new FHIRException("Unknown SlicingRules code '"+codeString+"'"); } public String toCode(SlicingRules code) { - if (code == SlicingRules.CLOSED) + if (code == SlicingRules.NULL) + return null; + if (code == SlicingRules.CLOSED) return "closed"; if (code == SlicingRules.OPEN) return "open"; if (code == SlicingRules.OPENATEND) return "openAtEnd"; return "?"; - } + } public String toSystem(SlicingRules code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Encounter.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Encounter.java index a640929c9..9ab5fe556 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Encounter.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Encounter.java @@ -1,4884 +1,4898 @@ -package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.r5.model.Enumerations.*; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Block; - -/** - * An interaction between healthcare provider(s), and/or patient(s) for the purpose of providing healthcare service(s) or assessing the health status of patient(s). - */ -@ResourceDef(name="Encounter", profile="http://hl7.org/fhir/StructureDefinition/Encounter") -public class Encounter extends DomainResource { - - public enum EncounterLocationStatus { - /** - * The patient is planned to be moved to this location at some point in the future. - */ - PLANNED, - /** - * The patient is currently at this location, or was between the period specified.\r\rA system may update these records when the patient leaves the location to either reserved, or completed. - */ - ACTIVE, - /** - * This location is held empty for this patient. - */ - RESERVED, - /** - * The patient was at this location during the period specified.\r\rNot to be used when the patient is currently at the location. - */ - COMPLETED, - /** - * added to help the parsers with the generic types - */ - NULL; - public static EncounterLocationStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("planned".equals(codeString)) - return PLANNED; - if ("active".equals(codeString)) - return ACTIVE; - if ("reserved".equals(codeString)) - return RESERVED; - if ("completed".equals(codeString)) - return COMPLETED; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PLANNED: return "planned"; - case ACTIVE: return "active"; - case RESERVED: return "reserved"; - case COMPLETED: return "completed"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PLANNED: return "http://hl7.org/fhir/encounter-location-status"; - case ACTIVE: return "http://hl7.org/fhir/encounter-location-status"; - case RESERVED: return "http://hl7.org/fhir/encounter-location-status"; - case COMPLETED: return "http://hl7.org/fhir/encounter-location-status"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PLANNED: return "The patient is planned to be moved to this location at some point in the future."; - case ACTIVE: return "The patient is currently at this location, or was between the period specified.\r\rA system may update these records when the patient leaves the location to either reserved, or completed."; - case RESERVED: return "This location is held empty for this patient."; - case COMPLETED: return "The patient was at this location during the period specified.\r\rNot to be used when the patient is currently at the location."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PLANNED: return "Planned"; - case ACTIVE: return "Active"; - case RESERVED: return "Reserved"; - case COMPLETED: return "Completed"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class EncounterLocationStatusEnumFactory implements EnumFactory { - public EncounterLocationStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("planned".equals(codeString)) - return EncounterLocationStatus.PLANNED; - if ("active".equals(codeString)) - return EncounterLocationStatus.ACTIVE; - if ("reserved".equals(codeString)) - return EncounterLocationStatus.RESERVED; - if ("completed".equals(codeString)) - return EncounterLocationStatus.COMPLETED; - throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, EncounterLocationStatus.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, EncounterLocationStatus.NULL, code); - if ("planned".equals(codeString)) - return new Enumeration(this, EncounterLocationStatus.PLANNED, code); - if ("active".equals(codeString)) - return new Enumeration(this, EncounterLocationStatus.ACTIVE, code); - if ("reserved".equals(codeString)) - return new Enumeration(this, EncounterLocationStatus.RESERVED, code); - if ("completed".equals(codeString)) - return new Enumeration(this, EncounterLocationStatus.COMPLETED, code); - throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); - } - public String toCode(EncounterLocationStatus code) { - if (code == EncounterLocationStatus.PLANNED) - return "planned"; - if (code == EncounterLocationStatus.ACTIVE) - return "active"; - if (code == EncounterLocationStatus.RESERVED) - return "reserved"; - if (code == EncounterLocationStatus.COMPLETED) - return "completed"; - return "?"; - } - public String toSystem(EncounterLocationStatus code) { - return code.getSystem(); - } - } - - @Block() - public static class EncounterParticipantComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Role of participant in encounter. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Role of participant in encounter", formalDefinition="Role of participant in encounter." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-participant-type") - protected List type; - - /** - * The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period. - */ - @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Period of time during the encounter that the participant participated", formalDefinition="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period." ) - protected Period period; - - /** - * Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times. - */ - @Child(name = "actor", type = {Patient.class, Group.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Device.class, HealthcareService.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The individual, device, or service participating in the encounter", formalDefinition="Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times." ) - protected Reference actor; - - private static final long serialVersionUID = 1982623707L; - - /** - * Constructor - */ - public EncounterParticipantComponent() { - super(); - } - - /** - * @return {@link #type} (Role of participant in encounter.) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public EncounterParticipantComponent setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public EncounterParticipantComponent addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #period} (The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterParticipantComponent.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 that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.) - */ - public EncounterParticipantComponent setPeriod(Period value) { - this.period = value; - return this; - } - - /** - * @return {@link #actor} (Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.) - */ - public Reference getActor() { - if (this.actor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterParticipantComponent.actor"); - else if (Configuration.doAutoCreate()) - this.actor = new Reference(); // cc - return this.actor; - } - - public boolean hasActor() { - return this.actor != null && !this.actor.isEmpty(); - } - - /** - * @param value {@link #actor} (Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.) - */ - public EncounterParticipantComponent setActor(Reference value) { - this.actor = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("type", "CodeableConcept", "Role of participant in encounter.", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("period", "Period", "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", 0, 1, period)); - children.add(new Property("actor", "Reference(Patient|Group|RelatedPerson|Practitioner|PractitionerRole|Device|HealthcareService)", "Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.", 0, 1, actor)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Role of participant in encounter.", 0, java.lang.Integer.MAX_VALUE, type); - case -991726143: /*period*/ return new Property("period", "Period", "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", 0, 1, period); - case 92645877: /*actor*/ return new Property("actor", "Reference(Patient|Group|RelatedPerson|Practitioner|PractitionerRole|Device|HealthcareService)", "Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.", 0, 1, actor); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period - case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -991726143: // period - this.period = TypeConvertor.castToPeriod(value); // Period - return value; - case 92645877: // actor - this.actor = TypeConvertor.castToReference(value); // Reference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("period")) { - this.period = TypeConvertor.castToPeriod(value); // Period - } else if (name.equals("actor")) { - this.actor = TypeConvertor.castToReference(value); // Reference - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("period")) { - this.period = null; - } else if (name.equals("actor")) { - this.actor = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3575610: return addType(); - case -991726143: return getPeriod(); - case 92645877: return getActor(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case -991726143: /*period*/ return new String[] {"Period"}; - case 92645877: /*actor*/ return new String[] {"Reference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("type")) { - return addType(); - } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; - } - else if (name.equals("actor")) { - this.actor = new Reference(); - return this.actor; - } - else - return super.addChild(name); - } - - public EncounterParticipantComponent copy() { - EncounterParticipantComponent dst = new EncounterParticipantComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(EncounterParticipantComponent dst) { - super.copyValues(dst); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - dst.period = period == null ? null : period.copy(); - dst.actor = actor == null ? null : actor.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof EncounterParticipantComponent)) - return false; - EncounterParticipantComponent o = (EncounterParticipantComponent) other_; - return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof EncounterParticipantComponent)) - return false; - EncounterParticipantComponent o = (EncounterParticipantComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor); - } - - public String fhirType() { - return "Encounter.participant"; - - } - - } - - @Block() - public static class ReasonComponent extends BackboneElement implements IBaseBackboneElement { - /** - * What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening). - */ - @Child(name = "use", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="What the reason value should be used for/as", formalDefinition="What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason-use") - protected List use; - - /** - * Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis. - */ - @Child(name = "value", type = {CodeableReference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Reason the encounter takes place (core or reference)", formalDefinition="Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason") - protected List value; - - private static final long serialVersionUID = 1305979913L; - - /** - * Constructor - */ - public ReasonComponent() { - super(); - } - - /** - * @return {@link #use} (What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).) - */ - public List getUse() { - if (this.use == null) - this.use = new ArrayList(); - return this.use; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public ReasonComponent setUse(List theUse) { - this.use = theUse; - return this; - } - - public boolean hasUse() { - if (this.use == null) - return false; - for (CodeableConcept item : this.use) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addUse() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.use == null) - this.use = new ArrayList(); - this.use.add(t); - return t; - } - - public ReasonComponent addUse(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.use == null) - this.use = new ArrayList(); - this.use.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #use}, creating it if it does not already exist {3} - */ - public CodeableConcept getUseFirstRep() { - if (getUse().isEmpty()) { - addUse(); - } - return getUse().get(0); - } - - /** - * @return {@link #value} (Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.) - */ - public List getValue() { - if (this.value == null) - this.value = new ArrayList(); - return this.value; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public ReasonComponent setValue(List theValue) { - this.value = theValue; - return this; - } - - public boolean hasValue() { - if (this.value == null) - return false; - for (CodeableReference item : this.value) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addValue() { //3 - CodeableReference t = new CodeableReference(); - if (this.value == null) - this.value = new ArrayList(); - this.value.add(t); - return t; - } - - public ReasonComponent addValue(CodeableReference t) { //3 - if (t == null) - return this; - if (this.value == null) - this.value = new ArrayList(); - this.value.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #value}, creating it if it does not already exist {3} - */ - public CodeableReference getValueFirstRep() { - if (getValue().isEmpty()) { - addValue(); - } - return getValue().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, java.lang.Integer.MAX_VALUE, use)); - children.add(new Property("value", "CodeableReference(Condition|DiagnosticReport|Observation|ImmunizationRecommendation|Procedure)", "Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, value)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 116103: /*use*/ return new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, java.lang.Integer.MAX_VALUE, use); - case 111972721: /*value*/ return new Property("value", "CodeableReference(Condition|DiagnosticReport|Observation|ImmunizationRecommendation|Procedure)", "Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, value); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 116103: /*use*/ return this.use == null ? new Base[0] : this.use.toArray(new Base[this.use.size()]); // CodeableConcept - case 111972721: /*value*/ return this.value == null ? new Base[0] : this.value.toArray(new Base[this.value.size()]); // CodeableReference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 116103: // use - this.getUse().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 111972721: // value - this.getValue().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("use")) { - this.getUse().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("value")) { - this.getValue().add(TypeConvertor.castToCodeableReference(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("use")) { - this.getUse().remove(value); - } else if (name.equals("value")) { - this.getValue().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 116103: return addUse(); - case 111972721: return addValue(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 116103: /*use*/ return new String[] {"CodeableConcept"}; - case 111972721: /*value*/ return new String[] {"CodeableReference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("use")) { - return addUse(); - } - else if (name.equals("value")) { - return addValue(); - } - else - return super.addChild(name); - } - - public ReasonComponent copy() { - ReasonComponent dst = new ReasonComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(ReasonComponent dst) { - super.copyValues(dst); - if (use != null) { - dst.use = new ArrayList(); - for (CodeableConcept i : use) - dst.use.add(i.copy()); - }; - if (value != null) { - dst.value = new ArrayList(); - for (CodeableReference i : value) - dst.value.add(i.copy()); - }; - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof ReasonComponent)) - return false; - ReasonComponent o = (ReasonComponent) other_; - return 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 ReasonComponent)) - return false; - ReasonComponent o = (ReasonComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, value); - } - - public String fhirType() { - return "Encounter.reason"; - - } - - } - - @Block() - public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis. - */ - @Child(name = "condition", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The diagnosis relevant to the encounter", formalDefinition="The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") - protected List condition; - - /** - * Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …). - */ - @Child(name = "use", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)", formalDefinition="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diagnosis-use") - protected List use; - - private static final long serialVersionUID = 1029565663L; - - /** - * Constructor - */ - public DiagnosisComponent() { - super(); - } - - /** - * @return {@link #condition} (The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public DiagnosisComponent setCondition(List theCondition) { - this.condition = theCondition; - return this; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (CodeableReference item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addCondition() { //3 - CodeableReference t = new CodeableReference(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - public DiagnosisComponent addCondition(CodeableReference t) { //3 - if (t == null) - return this; - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist {3} - */ - public CodeableReference getConditionFirstRep() { - if (getCondition().isEmpty()) { - addCondition(); - } - return getCondition().get(0); - } - - /** - * @return {@link #use} (Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).) - */ - public List getUse() { - if (this.use == null) - this.use = new ArrayList(); - return this.use; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public DiagnosisComponent setUse(List theUse) { - this.use = theUse; - return this; - } - - public boolean hasUse() { - if (this.use == null) - return false; - for (CodeableConcept item : this.use) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addUse() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.use == null) - this.use = new ArrayList(); - this.use.add(t); - return t; - } - - public DiagnosisComponent addUse(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.use == null) - this.use = new ArrayList(); - this.use.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #use}, creating it if it does not already exist {3} - */ - public CodeableConcept getUseFirstRep() { - if (getUse().isEmpty()) { - addUse(); - } - return getUse().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("condition", "CodeableReference(Condition)", "The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.", 0, java.lang.Integer.MAX_VALUE, condition)); - children.add(new Property("use", "CodeableConcept", "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, use)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -861311717: /*condition*/ return new Property("condition", "CodeableReference(Condition)", "The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.", 0, java.lang.Integer.MAX_VALUE, condition); - case 116103: /*use*/ return new Property("use", "CodeableConcept", "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, use); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // CodeableReference - case 116103: /*use*/ return this.use == null ? new Base[0] : this.use.toArray(new Base[this.use.size()]); // CodeableConcept - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -861311717: // condition - this.getCondition().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case 116103: // use - this.getUse().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("condition")) { - this.getCondition().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("use")) { - this.getUse().add(TypeConvertor.castToCodeableConcept(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("condition")) { - this.getCondition().remove(value); - } else if (name.equals("use")) { - this.getUse().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -861311717: return addCondition(); - case 116103: return addUse(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -861311717: /*condition*/ return new String[] {"CodeableReference"}; - case 116103: /*use*/ return new String[] {"CodeableConcept"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("condition")) { - return addCondition(); - } - else if (name.equals("use")) { - return addUse(); - } - else - return super.addChild(name); - } - - public DiagnosisComponent copy() { - DiagnosisComponent dst = new DiagnosisComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(DiagnosisComponent dst) { - super.copyValues(dst); - if (condition != null) { - dst.condition = new ArrayList(); - for (CodeableReference i : condition) - dst.condition.add(i.copy()); - }; - if (use != null) { - dst.use = new ArrayList(); - for (CodeableConcept i : use) - dst.use.add(i.copy()); - }; - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other_; - return compareDeep(condition, o.condition, true) && compareDeep(use, o.use, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(condition, use); - } - - public String fhirType() { - return "Encounter.diagnosis"; - - } - - } - - @Block() - public static class EncounterAdmissionComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Pre-admission identifier. - */ - @Child(name = "preAdmissionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Pre-admission identifier", formalDefinition="Pre-admission identifier." ) - protected Identifier preAdmissionIdentifier; - - /** - * The location/organization from which the patient came before admission. - */ - @Child(name = "origin", type = {Location.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The location/organization from which the patient came before admission", formalDefinition="The location/organization from which the patient came before admission." ) - protected Reference origin; - - /** - * From where patient was admitted (physician referral, transfer). - */ - @Child(name = "admitSource", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="From where patient was admitted (physician referral, transfer)", formalDefinition="From where patient was admitted (physician referral, transfer)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-admit-source") - protected CodeableConcept admitSource; - - /** - * Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed. - */ - @Child(name = "reAdmission", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Indicates that the patient is being re-admitted", formalDefinition="Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0092") - protected CodeableConcept reAdmission; - - /** - * Location/organization to which the patient is discharged. - */ - @Child(name = "destination", type = {Location.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Location/organization to which the patient is discharged", formalDefinition="Location/organization to which the patient is discharged." ) - protected Reference destination; - - /** - * Category or kind of location after discharge. - */ - @Child(name = "dischargeDisposition", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Category or kind of location after discharge", formalDefinition="Category or kind of location after discharge." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition") - protected CodeableConcept dischargeDisposition; - - private static final long serialVersionUID = -1702856594L; - - /** - * Constructor - */ - public EncounterAdmissionComponent() { - super(); - } - - /** - * @return {@link #preAdmissionIdentifier} (Pre-admission identifier.) - */ - public Identifier getPreAdmissionIdentifier() { - if (this.preAdmissionIdentifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.preAdmissionIdentifier"); - else if (Configuration.doAutoCreate()) - this.preAdmissionIdentifier = new Identifier(); // cc - return this.preAdmissionIdentifier; - } - - public boolean hasPreAdmissionIdentifier() { - return this.preAdmissionIdentifier != null && !this.preAdmissionIdentifier.isEmpty(); - } - - /** - * @param value {@link #preAdmissionIdentifier} (Pre-admission identifier.) - */ - public EncounterAdmissionComponent setPreAdmissionIdentifier(Identifier value) { - this.preAdmissionIdentifier = value; - return this; - } - - /** - * @return {@link #origin} (The location/organization from which the patient came before admission.) - */ - public Reference getOrigin() { - if (this.origin == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.origin"); - else if (Configuration.doAutoCreate()) - this.origin = new Reference(); // cc - return this.origin; - } - - public boolean hasOrigin() { - return this.origin != null && !this.origin.isEmpty(); - } - - /** - * @param value {@link #origin} (The location/organization from which the patient came before admission.) - */ - public EncounterAdmissionComponent setOrigin(Reference value) { - this.origin = value; - return this; - } - - /** - * @return {@link #admitSource} (From where patient was admitted (physician referral, transfer).) - */ - public CodeableConcept getAdmitSource() { - if (this.admitSource == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.admitSource"); - else if (Configuration.doAutoCreate()) - this.admitSource = new CodeableConcept(); // cc - return this.admitSource; - } - - public boolean hasAdmitSource() { - return this.admitSource != null && !this.admitSource.isEmpty(); - } - - /** - * @param value {@link #admitSource} (From where patient was admitted (physician referral, transfer).) - */ - public EncounterAdmissionComponent setAdmitSource(CodeableConcept value) { - this.admitSource = value; - return this; - } - - /** - * @return {@link #reAdmission} (Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.) - */ - public CodeableConcept getReAdmission() { - if (this.reAdmission == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.reAdmission"); - else if (Configuration.doAutoCreate()) - this.reAdmission = new CodeableConcept(); // cc - return this.reAdmission; - } - - public boolean hasReAdmission() { - return this.reAdmission != null && !this.reAdmission.isEmpty(); - } - - /** - * @param value {@link #reAdmission} (Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.) - */ - public EncounterAdmissionComponent setReAdmission(CodeableConcept value) { - this.reAdmission = value; - return this; - } - - /** - * @return {@link #destination} (Location/organization to which the patient is discharged.) - */ - public Reference getDestination() { - if (this.destination == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.destination"); - else if (Configuration.doAutoCreate()) - this.destination = new Reference(); // cc - return this.destination; - } - - public boolean hasDestination() { - return this.destination != null && !this.destination.isEmpty(); - } - - /** - * @param value {@link #destination} (Location/organization to which the patient is discharged.) - */ - public EncounterAdmissionComponent setDestination(Reference value) { - this.destination = value; - return this; - } - - /** - * @return {@link #dischargeDisposition} (Category or kind of location after discharge.) - */ - public CodeableConcept getDischargeDisposition() { - if (this.dischargeDisposition == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterAdmissionComponent.dischargeDisposition"); - else if (Configuration.doAutoCreate()) - this.dischargeDisposition = new CodeableConcept(); // cc - return this.dischargeDisposition; - } - - public boolean hasDischargeDisposition() { - return this.dischargeDisposition != null && !this.dischargeDisposition.isEmpty(); - } - - /** - * @param value {@link #dischargeDisposition} (Category or kind of location after discharge.) - */ - public EncounterAdmissionComponent setDischargeDisposition(CodeableConcept value) { - this.dischargeDisposition = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("preAdmissionIdentifier", "Identifier", "Pre-admission identifier.", 0, 1, preAdmissionIdentifier)); - children.add(new Property("origin", "Reference(Location|Organization)", "The location/organization from which the patient came before admission.", 0, 1, origin)); - children.add(new Property("admitSource", "CodeableConcept", "From where patient was admitted (physician referral, transfer).", 0, 1, admitSource)); - children.add(new Property("reAdmission", "CodeableConcept", "Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.", 0, 1, reAdmission)); - children.add(new Property("destination", "Reference(Location|Organization)", "Location/organization to which the patient is discharged.", 0, 1, destination)); - children.add(new Property("dischargeDisposition", "CodeableConcept", "Category or kind of location after discharge.", 0, 1, dischargeDisposition)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -965394961: /*preAdmissionIdentifier*/ return new Property("preAdmissionIdentifier", "Identifier", "Pre-admission identifier.", 0, 1, preAdmissionIdentifier); - case -1008619738: /*origin*/ return new Property("origin", "Reference(Location|Organization)", "The location/organization from which the patient came before admission.", 0, 1, origin); - case 538887120: /*admitSource*/ return new Property("admitSource", "CodeableConcept", "From where patient was admitted (physician referral, transfer).", 0, 1, admitSource); - case 669348630: /*reAdmission*/ return new Property("reAdmission", "CodeableConcept", "Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.", 0, 1, reAdmission); - case -1429847026: /*destination*/ return new Property("destination", "Reference(Location|Organization)", "Location/organization to which the patient is discharged.", 0, 1, destination); - case 528065941: /*dischargeDisposition*/ return new Property("dischargeDisposition", "CodeableConcept", "Category or kind of location after discharge.", 0, 1, dischargeDisposition); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -965394961: /*preAdmissionIdentifier*/ return this.preAdmissionIdentifier == null ? new Base[0] : new Base[] {this.preAdmissionIdentifier}; // Identifier - case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // Reference - case 538887120: /*admitSource*/ return this.admitSource == null ? new Base[0] : new Base[] {this.admitSource}; // CodeableConcept - case 669348630: /*reAdmission*/ return this.reAdmission == null ? new Base[0] : new Base[] {this.reAdmission}; // CodeableConcept - case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference - case 528065941: /*dischargeDisposition*/ return this.dischargeDisposition == null ? new Base[0] : new Base[] {this.dischargeDisposition}; // CodeableConcept - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -965394961: // preAdmissionIdentifier - this.preAdmissionIdentifier = TypeConvertor.castToIdentifier(value); // Identifier - return value; - case -1008619738: // origin - this.origin = TypeConvertor.castToReference(value); // Reference - return value; - case 538887120: // admitSource - this.admitSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 669348630: // reAdmission - this.reAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1429847026: // destination - this.destination = TypeConvertor.castToReference(value); // Reference - return value; - case 528065941: // dischargeDisposition - this.dischargeDisposition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("preAdmissionIdentifier")) { - this.preAdmissionIdentifier = TypeConvertor.castToIdentifier(value); // Identifier - } else if (name.equals("origin")) { - this.origin = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("admitSource")) { - this.admitSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("reAdmission")) { - this.reAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("destination")) { - this.destination = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("dischargeDisposition")) { - this.dischargeDisposition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("preAdmissionIdentifier")) { - this.preAdmissionIdentifier = null; - } else if (name.equals("origin")) { - this.origin = null; - } else if (name.equals("admitSource")) { - this.admitSource = null; - } else if (name.equals("reAdmission")) { - this.reAdmission = null; - } else if (name.equals("destination")) { - this.destination = null; - } else if (name.equals("dischargeDisposition")) { - this.dischargeDisposition = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -965394961: return getPreAdmissionIdentifier(); - case -1008619738: return getOrigin(); - case 538887120: return getAdmitSource(); - case 669348630: return getReAdmission(); - case -1429847026: return getDestination(); - case 528065941: return getDischargeDisposition(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -965394961: /*preAdmissionIdentifier*/ return new String[] {"Identifier"}; - case -1008619738: /*origin*/ return new String[] {"Reference"}; - case 538887120: /*admitSource*/ return new String[] {"CodeableConcept"}; - case 669348630: /*reAdmission*/ return new String[] {"CodeableConcept"}; - case -1429847026: /*destination*/ return new String[] {"Reference"}; - case 528065941: /*dischargeDisposition*/ return new String[] {"CodeableConcept"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("preAdmissionIdentifier")) { - this.preAdmissionIdentifier = new Identifier(); - return this.preAdmissionIdentifier; - } - else if (name.equals("origin")) { - this.origin = new Reference(); - return this.origin; - } - else if (name.equals("admitSource")) { - this.admitSource = new CodeableConcept(); - return this.admitSource; - } - else if (name.equals("reAdmission")) { - this.reAdmission = new CodeableConcept(); - return this.reAdmission; - } - else if (name.equals("destination")) { - this.destination = new Reference(); - return this.destination; - } - else if (name.equals("dischargeDisposition")) { - this.dischargeDisposition = new CodeableConcept(); - return this.dischargeDisposition; - } - else - return super.addChild(name); - } - - public EncounterAdmissionComponent copy() { - EncounterAdmissionComponent dst = new EncounterAdmissionComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(EncounterAdmissionComponent dst) { - super.copyValues(dst); - dst.preAdmissionIdentifier = preAdmissionIdentifier == null ? null : preAdmissionIdentifier.copy(); - dst.origin = origin == null ? null : origin.copy(); - dst.admitSource = admitSource == null ? null : admitSource.copy(); - dst.reAdmission = reAdmission == null ? null : reAdmission.copy(); - dst.destination = destination == null ? null : destination.copy(); - dst.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof EncounterAdmissionComponent)) - return false; - EncounterAdmissionComponent o = (EncounterAdmissionComponent) other_; - return compareDeep(preAdmissionIdentifier, o.preAdmissionIdentifier, true) && compareDeep(origin, o.origin, true) - && compareDeep(admitSource, o.admitSource, true) && compareDeep(reAdmission, o.reAdmission, true) - && compareDeep(destination, o.destination, true) && compareDeep(dischargeDisposition, o.dischargeDisposition, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof EncounterAdmissionComponent)) - return false; - EncounterAdmissionComponent o = (EncounterAdmissionComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(preAdmissionIdentifier, origin - , admitSource, reAdmission, destination, dischargeDisposition); - } - - public String fhirType() { - return "Encounter.admission"; - - } - - } - - @Block() - public static class EncounterLocationComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The location where the encounter takes place. - */ - @Child(name = "location", type = {Location.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Location the encounter takes place", formalDefinition="The location where the encounter takes place." ) - protected Reference location; - - /** - * The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. - */ - @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="planned | active | reserved | completed", formalDefinition="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-location-status") - protected Enumeration status; - - /** - * This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query. - */ - @Child(name = "form", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The physical type of the location (usually the level in the location hierarchy - bed, room, ward, virtual etc.)", formalDefinition="This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-form") - protected CodeableConcept form; - - /** - * Time period during which the patient was present at the location. - */ - @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Time period during which the patient was present at the location", formalDefinition="Time period during which the patient was present at the location." ) - protected Period period; - - private static final long serialVersionUID = -1665957440L; - - /** - * Constructor - */ - public EncounterLocationComponent() { - super(); - } - - /** - * Constructor - */ - public EncounterLocationComponent(Reference location) { - super(); - this.setLocation(location); - } - - /** - * @return {@link #location} (The location where the encounter takes place.) - */ - public Reference getLocation() { - if (this.location == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterLocationComponent.location"); - else if (Configuration.doAutoCreate()) - this.location = new Reference(); // cc - return this.location; - } - - public boolean hasLocation() { - return this.location != null && !this.location.isEmpty(); - } - - /** - * @param value {@link #location} (The location where the encounter takes place.) - */ - public EncounterLocationComponent setLocation(Reference value) { - this.location = value; - return this; - } - - /** - * @return {@link #status} (The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.). 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 EncounterLocationComponent.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); // 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 participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public EncounterLocationComponent setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. - */ - public EncounterLocationStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. - */ - public EncounterLocationComponent setStatus(EncounterLocationStatus value) { - if (value == null) - this.status = null; - else { - if (this.status == null) - this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); - this.status.setValue(value); - } - return this; - } - - /** - * @return {@link #form} (This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.) - */ - public CodeableConcept getForm() { - if (this.form == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterLocationComponent.form"); - else if (Configuration.doAutoCreate()) - this.form = new CodeableConcept(); // cc - return this.form; - } - - public boolean hasForm() { - return this.form != null && !this.form.isEmpty(); - } - - /** - * @param value {@link #form} (This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.) - */ - public EncounterLocationComponent setForm(CodeableConcept value) { - this.form = value; - return this; - } - - /** - * @return {@link #period} (Time period during which the patient was present at the location.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EncounterLocationComponent.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} (Time period during which the patient was present at the location.) - */ - public EncounterLocationComponent setPeriod(Period value) { - this.period = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("location", "Reference(Location)", "The location where the encounter takes place.", 0, 1, location)); - children.add(new Property("status", "code", "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", 0, 1, status)); - children.add(new Property("form", "CodeableConcept", "This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.", 0, 1, form)); - children.add(new Property("period", "Period", "Time period during which the patient was present at the location.", 0, 1, period)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The location where the encounter takes place.", 0, 1, location); - case -892481550: /*status*/ return new Property("status", "code", "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", 0, 1, status); - case 3148996: /*form*/ return new Property("form", "CodeableConcept", "This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.", 0, 1, form); - case -991726143: /*period*/ return new Property("period", "Period", "Time period during which the patient was present at the location.", 0, 1, period); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept - case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 1901043637: // location - this.location = TypeConvertor.castToReference(value); // Reference - return value; - case -892481550: // status - value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case 3148996: // form - this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -991726143: // period - this.period = TypeConvertor.castToPeriod(value); // Period - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("location")) { - this.location = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("status")) { - value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("form")) { - this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("period")) { - this.period = TypeConvertor.castToPeriod(value); // Period - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("location")) { - this.location = null; - } else if (name.equals("status")) { - value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("form")) { - this.form = null; - } else if (name.equals("period")) { - this.period = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1901043637: return getLocation(); - case -892481550: return getStatusElement(); - case 3148996: return getForm(); - case -991726143: return getPeriod(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1901043637: /*location*/ return new String[] {"Reference"}; - case -892481550: /*status*/ return new String[] {"code"}; - case 3148996: /*form*/ return new String[] {"CodeableConcept"}; - case -991726143: /*period*/ return new String[] {"Period"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("location")) { - this.location = new Reference(); - return this.location; - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Encounter.location.status"); - } - else if (name.equals("form")) { - this.form = new CodeableConcept(); - return this.form; - } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; - } - else - return super.addChild(name); - } - - public EncounterLocationComponent copy() { - EncounterLocationComponent dst = new EncounterLocationComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(EncounterLocationComponent dst) { - super.copyValues(dst); - dst.location = location == null ? null : location.copy(); - dst.status = status == null ? null : status.copy(); - dst.form = form == null ? null : form.copy(); - dst.period = period == null ? null : period.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof EncounterLocationComponent)) - return false; - EncounterLocationComponent o = (EncounterLocationComponent) other_; - return compareDeep(location, o.location, true) && compareDeep(status, o.status, true) && compareDeep(form, o.form, true) - && compareDeep(period, o.period, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof EncounterLocationComponent)) - return false; - EncounterLocationComponent o = (EncounterLocationComponent) other_; - return compareValues(status, o.status, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(location, status, form, period - ); - } - - public String fhirType() { - return "Encounter.location"; - - } - - } - - /** - * Identifier(s) by which this encounter is known. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Identifier(s) by which this encounter is known", formalDefinition="Identifier(s) by which this encounter is known." ) - protected List identifier; - - /** - * The current state of the encounter (not the state of the patient within the encounter - that is subjectState). - */ - @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="planned | in-progress | on-hold | discharged | completed | cancelled | discontinued | entered-in-error | unknown", formalDefinition="The current state of the encounter (not the state of the patient within the encounter - that is subjectState)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-status") - protected Enumeration status; - - /** - * Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations. - */ - @Child(name = "class", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Classification of patient encounter context - e.g. Inpatient, outpatient", formalDefinition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/encounter-class") - protected List class_; - - /** - * Indicates the urgency of the encounter. - */ - @Child(name = "priority", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActPriority") - protected CodeableConcept priority; - - /** - * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). - */ - @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, ...)", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-type") - protected List type; - - /** - * Broad categorization of the service that is to be provided (e.g. cardiology). - */ - @Child(name = "serviceType", type = {CodeableReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Specific type of service", formalDefinition="Broad categorization of the service that is to be provided (e.g. cardiology)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type") - protected List serviceType; - - /** - * The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam. - */ - @Child(name = "subject", type = {Patient.class, Group.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The patient or group related to this encounter", formalDefinition="The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam." ) - protected Reference subject; - - /** - * The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status. - */ - @Child(name = "subjectStatus", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The current status of the subject in relation to the Encounter", formalDefinition="The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-subject-status") - protected CodeableConcept subjectStatus; - - /** - * Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years). - */ - @Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Episode(s) of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)." ) - protected List episodeOfCare; - - /** - * The request this encounter satisfies (e.g. incoming referral or procedure request). - */ - @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The request that initiated this encounter", formalDefinition="The request this encounter satisfies (e.g. incoming referral or procedure request)." ) - protected List basedOn; - - /** - * The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter. - */ - @Child(name = "careTeam", type = {CareTeam.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The group(s) that are allocated to participate in this encounter", formalDefinition="The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter." ) - protected List careTeam; - - /** - * Another Encounter of which this encounter is a part of (administratively or in time). - */ - @Child(name = "partOf", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Another Encounter this encounter is part of", formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." ) - protected Reference partOf; - - /** - * The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab. - */ - @Child(name = "serviceProvider", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The organization (facility) responsible for this encounter", formalDefinition="The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab." ) - protected Reference serviceProvider; - - /** - * The list of people responsible for providing the service. - */ - @Child(name = "participant", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The list of people responsible for providing the service." ) - protected List participant; - - /** - * The appointment that scheduled this encounter. - */ - @Child(name = "appointment", type = {Appointment.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." ) - protected List appointment; - - /** - * Connection details of a virtual service (e.g. conference call). - */ - @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. conference call)." ) - protected List virtualService; - - /** - * The actual start and end time of the encounter. - */ - @Child(name = "actualPeriod", type = {Period.class}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The actual start and end time of the encounter", formalDefinition="The actual start and end time of the encounter." ) - protected Period actualPeriod; - - /** - * The planned start date/time (or admission date) of the encounter. - */ - @Child(name = "plannedStartDate", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The planned start date/time (or admission date) of the encounter", formalDefinition="The planned start date/time (or admission date) of the encounter." ) - protected DateTimeType plannedStartDate; - - /** - * The planned end date/time (or discharge date) of the encounter. - */ - @Child(name = "plannedEndDate", type = {DateTimeType.class}, order=18, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The planned end date/time (or discharge date) of the encounter", formalDefinition="The planned end date/time (or discharge date) of the encounter." ) - protected DateTimeType plannedEndDate; - - /** - * Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. When missing it is the time in between the start and end values. - */ - @Child(name = "length", type = {Duration.class}, order=19, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Actual quantity of time the encounter lasted (less time absent)", formalDefinition="Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values." ) - protected Duration length; - - /** - * The list of medical reasons that are expected to be addressed during the episode of care. - */ - @Child(name = "reason", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The list of medical reasons that are expected to be addressed during the episode of care", formalDefinition="The list of medical reasons that are expected to be addressed during the episode of care." ) - protected List reason; - - /** - * The list of diagnosis relevant to this encounter. - */ - @Child(name = "diagnosis", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The list of diagnosis relevant to this encounter", formalDefinition="The list of diagnosis relevant to this encounter." ) - protected List diagnosis; - - /** - * The set of accounts that may be used for billing for this Encounter. - */ - @Child(name = "account", type = {Account.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The set of accounts that may be used for billing for this Encounter", formalDefinition="The set of accounts that may be used for billing for this Encounter." ) - protected List account; - - /** - * Diet preferences reported by the patient. - */ - @Child(name = "dietPreference", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Diet preferences reported by the patient", formalDefinition="Diet preferences reported by the patient." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diet") - protected List dietPreference; - - /** - * Any special requests that have been made for this encounter, such as the provision of specific equipment or other things. - */ - @Child(name = "specialArrangement", type = {CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Wheelchair, translator, stretcher, etc", formalDefinition="Any special requests that have been made for this encounter, such as the provision of specific equipment or other things." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-special-arrangements") - protected List specialArrangement; - - /** - * Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy). - */ - @Child(name = "specialCourtesy", type = {CodeableConcept.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Special courtesies (VIP, board member)", formalDefinition="Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-special-courtesy") - protected List specialCourtesy; - - /** - * Details about the stay during which a healthcare service is provided. This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge. - */ - @Child(name = "admission", type = {}, order=26, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Details about the admission to a healthcare service", formalDefinition="Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge." ) - protected EncounterAdmissionComponent admission; - - /** - * List of locations where the patient has been during this encounter. - */ - @Child(name = "location", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="List of locations where the patient has been", formalDefinition="List of locations where the patient has been during this encounter." ) - protected List location; - - private static final long serialVersionUID = -1336316477L; - - /** - * Constructor - */ - public Encounter() { - super(); - } - - /** - * Constructor - */ - public Encounter(EncounterStatus status) { - super(); - this.setStatus(status); - } - - /** - * @return {@link #identifier} (Identifier(s) by which this encounter is known.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setIdentifier(List theIdentifier) { - this.identifier = theIdentifier; - return this; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - public Encounter addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} - */ - public Identifier getIdentifierFirstRep() { - if (getIdentifier().isEmpty()) { - addIdentifier(); - } - return getIdentifier().get(0); - } - - /** - * @return {@link #status} (The current state of the encounter (not the state of the patient within the encounter - that is subjectState).). 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 Encounter.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new EncounterStatusEnumFactory()); // 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 state of the encounter (not the state of the patient within the encounter - that is subjectState).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Encounter setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The current state of the encounter (not the state of the patient within the encounter - that is subjectState). - */ - public EncounterStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The current state of the encounter (not the state of the patient within the encounter - that is subjectState). - */ - public Encounter setStatus(EncounterStatus value) { - if (this.status == null) - this.status = new Enumeration(new EncounterStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #class_} (Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.) - */ - public List getClass_() { - if (this.class_ == null) - this.class_ = new ArrayList(); - return this.class_; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setClass_(List theClass_) { - this.class_ = theClass_; - return this; - } - - public boolean hasClass_() { - if (this.class_ == null) - return false; - for (CodeableConcept item : this.class_) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addClass_() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.class_ == null) - this.class_ = new ArrayList(); - this.class_.add(t); - return t; - } - - public Encounter addClass_(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.class_ == null) - this.class_ = new ArrayList(); - this.class_.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} - */ - public CodeableConcept getClass_FirstRep() { - if (getClass_().isEmpty()) { - addClass_(); - } - return getClass_().get(0); - } - - /** - * @return {@link #priority} (Indicates the urgency of the encounter.) - */ - public CodeableConcept getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new CodeableConcept(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (Indicates the urgency of the encounter.) - */ - public Encounter setPriority(CodeableConcept value) { - this.priority = value; - return this; - } - - /** - * @return {@link #type} (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public Encounter addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #serviceType} (Broad categorization of the service that is to be provided (e.g. cardiology).) - */ - public List getServiceType() { - if (this.serviceType == null) - this.serviceType = new ArrayList(); - return this.serviceType; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setServiceType(List theServiceType) { - this.serviceType = theServiceType; - return this; - } - - public boolean hasServiceType() { - if (this.serviceType == null) - return false; - for (CodeableReference item : this.serviceType) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addServiceType() { //3 - CodeableReference t = new CodeableReference(); - if (this.serviceType == null) - this.serviceType = new ArrayList(); - this.serviceType.add(t); - return t; - } - - public Encounter addServiceType(CodeableReference t) { //3 - if (t == null) - return this; - if (this.serviceType == null) - this.serviceType = new ArrayList(); - this.serviceType.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist {3} - */ - public CodeableReference getServiceTypeFirstRep() { - if (getServiceType().isEmpty()) { - addServiceType(); - } - return getServiceType().get(0); - } - - /** - * @return {@link #subject} (The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.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 patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.) - */ - public Encounter setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subjectStatus} (The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.) - */ - public CodeableConcept getSubjectStatus() { - if (this.subjectStatus == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.subjectStatus"); - else if (Configuration.doAutoCreate()) - this.subjectStatus = new CodeableConcept(); // cc - return this.subjectStatus; - } - - public boolean hasSubjectStatus() { - return this.subjectStatus != null && !this.subjectStatus.isEmpty(); - } - - /** - * @param value {@link #subjectStatus} (The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.) - */ - public Encounter setSubjectStatus(CodeableConcept value) { - this.subjectStatus = value; - return this; - } - - /** - * @return {@link #episodeOfCare} (Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) - */ - public List getEpisodeOfCare() { - if (this.episodeOfCare == null) - this.episodeOfCare = new ArrayList(); - return this.episodeOfCare; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setEpisodeOfCare(List theEpisodeOfCare) { - this.episodeOfCare = theEpisodeOfCare; - return this; - } - - public boolean hasEpisodeOfCare() { - if (this.episodeOfCare == null) - return false; - for (Reference item : this.episodeOfCare) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addEpisodeOfCare() { //3 - Reference t = new Reference(); - if (this.episodeOfCare == null) - this.episodeOfCare = new ArrayList(); - this.episodeOfCare.add(t); - return t; - } - - public Encounter addEpisodeOfCare(Reference t) { //3 - if (t == null) - return this; - if (this.episodeOfCare == null) - this.episodeOfCare = new ArrayList(); - this.episodeOfCare.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #episodeOfCare}, creating it if it does not already exist {3} - */ - public Reference getEpisodeOfCareFirstRep() { - if (getEpisodeOfCare().isEmpty()) { - addEpisodeOfCare(); - } - return getEpisodeOfCare().get(0); - } - - /** - * @return {@link #basedOn} (The request this encounter satisfies (e.g. incoming referral or procedure request).) - */ - public List getBasedOn() { - if (this.basedOn == null) - this.basedOn = new ArrayList(); - return this.basedOn; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setBasedOn(List theBasedOn) { - this.basedOn = theBasedOn; - return this; - } - - public boolean hasBasedOn() { - if (this.basedOn == null) - return false; - for (Reference item : this.basedOn) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addBasedOn() { //3 - Reference t = new Reference(); - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return t; - } - - public Encounter addBasedOn(Reference t) { //3 - if (t == null) - return this; - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} - */ - public Reference getBasedOnFirstRep() { - if (getBasedOn().isEmpty()) { - addBasedOn(); - } - return getBasedOn().get(0); - } - - /** - * @return {@link #careTeam} (The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.) - */ - public List getCareTeam() { - if (this.careTeam == null) - this.careTeam = new ArrayList(); - return this.careTeam; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setCareTeam(List theCareTeam) { - this.careTeam = theCareTeam; - return this; - } - - public boolean hasCareTeam() { - if (this.careTeam == null) - return false; - for (Reference item : this.careTeam) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addCareTeam() { //3 - Reference t = new Reference(); - if (this.careTeam == null) - this.careTeam = new ArrayList(); - this.careTeam.add(t); - return t; - } - - public Encounter addCareTeam(Reference t) { //3 - if (t == null) - return this; - if (this.careTeam == null) - this.careTeam = new ArrayList(); - this.careTeam.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3} - */ - public Reference getCareTeamFirstRep() { - if (getCareTeam().isEmpty()) { - addCareTeam(); - } - return getCareTeam().get(0); - } - - /** - * @return {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) - */ - public Reference getPartOf() { - if (this.partOf == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.partOf"); - else if (Configuration.doAutoCreate()) - this.partOf = new Reference(); // cc - return this.partOf; - } - - public boolean hasPartOf() { - return this.partOf != null && !this.partOf.isEmpty(); - } - - /** - * @param value {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) - */ - public Encounter setPartOf(Reference value) { - this.partOf = value; - return this; - } - - /** - * @return {@link #serviceProvider} (The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.) - */ - public Reference getServiceProvider() { - if (this.serviceProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.serviceProvider"); - else if (Configuration.doAutoCreate()) - this.serviceProvider = new Reference(); // cc - return this.serviceProvider; - } - - public boolean hasServiceProvider() { - return this.serviceProvider != null && !this.serviceProvider.isEmpty(); - } - - /** - * @param value {@link #serviceProvider} (The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.) - */ - public Encounter setServiceProvider(Reference value) { - this.serviceProvider = value; - return this; - } - - /** - * @return {@link #participant} (The list of people responsible for providing the service.) - */ - public List getParticipant() { - if (this.participant == null) - this.participant = new ArrayList(); - return this.participant; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setParticipant(List theParticipant) { - this.participant = theParticipant; - return this; - } - - public boolean hasParticipant() { - if (this.participant == null) - return false; - for (EncounterParticipantComponent item : this.participant) - if (!item.isEmpty()) - return true; - return false; - } - - public EncounterParticipantComponent addParticipant() { //3 - EncounterParticipantComponent t = new EncounterParticipantComponent(); - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return t; - } - - public Encounter addParticipant(EncounterParticipantComponent t) { //3 - if (t == null) - return this; - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3} - */ - public EncounterParticipantComponent getParticipantFirstRep() { - if (getParticipant().isEmpty()) { - addParticipant(); - } - return getParticipant().get(0); - } - - /** - * @return {@link #appointment} (The appointment that scheduled this encounter.) - */ - public List getAppointment() { - if (this.appointment == null) - this.appointment = new ArrayList(); - return this.appointment; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setAppointment(List theAppointment) { - this.appointment = theAppointment; - return this; - } - - public boolean hasAppointment() { - if (this.appointment == null) - return false; - for (Reference item : this.appointment) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addAppointment() { //3 - Reference t = new Reference(); - if (this.appointment == null) - this.appointment = new ArrayList(); - this.appointment.add(t); - return t; - } - - public Encounter addAppointment(Reference t) { //3 - if (t == null) - return this; - if (this.appointment == null) - this.appointment = new ArrayList(); - this.appointment.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #appointment}, creating it if it does not already exist {3} - */ - public Reference getAppointmentFirstRep() { - if (getAppointment().isEmpty()) { - addAppointment(); - } - return getAppointment().get(0); - } - - /** - * @return {@link #virtualService} (Connection details of a virtual service (e.g. conference call).) - */ - public List getVirtualService() { - if (this.virtualService == null) - this.virtualService = new ArrayList(); - return this.virtualService; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setVirtualService(List theVirtualService) { - this.virtualService = theVirtualService; - return this; - } - - public boolean hasVirtualService() { - if (this.virtualService == null) - return false; - for (VirtualServiceDetail item : this.virtualService) - if (!item.isEmpty()) - return true; - return false; - } - - public VirtualServiceDetail addVirtualService() { //3 - VirtualServiceDetail t = new VirtualServiceDetail(); - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return t; - } - - public Encounter addVirtualService(VirtualServiceDetail t) { //3 - if (t == null) - return this; - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} - */ - public VirtualServiceDetail getVirtualServiceFirstRep() { - if (getVirtualService().isEmpty()) { - addVirtualService(); - } - return getVirtualService().get(0); - } - - /** - * @return {@link #actualPeriod} (The actual start and end time of the encounter.) - */ - public Period getActualPeriod() { - if (this.actualPeriod == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.actualPeriod"); - else if (Configuration.doAutoCreate()) - this.actualPeriod = new Period(); // cc - return this.actualPeriod; - } - - public boolean hasActualPeriod() { - return this.actualPeriod != null && !this.actualPeriod.isEmpty(); - } - - /** - * @param value {@link #actualPeriod} (The actual start and end time of the encounter.) - */ - public Encounter setActualPeriod(Period value) { - this.actualPeriod = value; - return this; - } - - /** - * @return {@link #plannedStartDate} (The planned start date/time (or admission date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedStartDate" gives direct access to the value - */ - public DateTimeType getPlannedStartDateElement() { - if (this.plannedStartDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.plannedStartDate"); - else if (Configuration.doAutoCreate()) - this.plannedStartDate = new DateTimeType(); // bb - return this.plannedStartDate; - } - - public boolean hasPlannedStartDateElement() { - return this.plannedStartDate != null && !this.plannedStartDate.isEmpty(); - } - - public boolean hasPlannedStartDate() { - return this.plannedStartDate != null && !this.plannedStartDate.isEmpty(); - } - - /** - * @param value {@link #plannedStartDate} (The planned start date/time (or admission date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedStartDate" gives direct access to the value - */ - public Encounter setPlannedStartDateElement(DateTimeType value) { - this.plannedStartDate = value; - return this; - } - - /** - * @return The planned start date/time (or admission date) of the encounter. - */ - public Date getPlannedStartDate() { - return this.plannedStartDate == null ? null : this.plannedStartDate.getValue(); - } - - /** - * @param value The planned start date/time (or admission date) of the encounter. - */ - public Encounter setPlannedStartDate(Date value) { - if (value == null) - this.plannedStartDate = null; - else { - if (this.plannedStartDate == null) - this.plannedStartDate = new DateTimeType(); - this.plannedStartDate.setValue(value); - } - return this; - } - - /** - * @return {@link #plannedEndDate} (The planned end date/time (or discharge date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedEndDate" gives direct access to the value - */ - public DateTimeType getPlannedEndDateElement() { - if (this.plannedEndDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.plannedEndDate"); - else if (Configuration.doAutoCreate()) - this.plannedEndDate = new DateTimeType(); // bb - return this.plannedEndDate; - } - - public boolean hasPlannedEndDateElement() { - return this.plannedEndDate != null && !this.plannedEndDate.isEmpty(); - } - - public boolean hasPlannedEndDate() { - return this.plannedEndDate != null && !this.plannedEndDate.isEmpty(); - } - - /** - * @param value {@link #plannedEndDate} (The planned end date/time (or discharge date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedEndDate" gives direct access to the value - */ - public Encounter setPlannedEndDateElement(DateTimeType value) { - this.plannedEndDate = value; - return this; - } - - /** - * @return The planned end date/time (or discharge date) of the encounter. - */ - public Date getPlannedEndDate() { - return this.plannedEndDate == null ? null : this.plannedEndDate.getValue(); - } - - /** - * @param value The planned end date/time (or discharge date) of the encounter. - */ - public Encounter setPlannedEndDate(Date value) { - if (value == null) - this.plannedEndDate = null; - else { - if (this.plannedEndDate == null) - this.plannedEndDate = new DateTimeType(); - this.plannedEndDate.setValue(value); - } - return this; - } - - /** - * @return {@link #length} (Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. When missing it is the time in between the start and end values.) - */ - public Duration getLength() { - if (this.length == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.length"); - else if (Configuration.doAutoCreate()) - this.length = new Duration(); // cc - return this.length; - } - - public boolean hasLength() { - return this.length != null && !this.length.isEmpty(); - } - - /** - * @param value {@link #length} (Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. When missing it is the time in between the start and end values.) - */ - public Encounter setLength(Duration value) { - this.length = value; - return this; - } - - /** - * @return {@link #reason} (The list of medical reasons that are expected to be addressed during the episode of care.) - */ - public List getReason() { - if (this.reason == null) - this.reason = new ArrayList(); - return this.reason; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setReason(List theReason) { - this.reason = theReason; - return this; - } - - public boolean hasReason() { - if (this.reason == null) - return false; - for (ReasonComponent item : this.reason) - if (!item.isEmpty()) - return true; - return false; - } - - public ReasonComponent addReason() { //3 - ReasonComponent t = new ReasonComponent(); - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return t; - } - - public Encounter addReason(ReasonComponent t) { //3 - if (t == null) - return this; - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} - */ - public ReasonComponent getReasonFirstRep() { - if (getReason().isEmpty()) { - addReason(); - } - return getReason().get(0); - } - - /** - * @return {@link #diagnosis} (The list of diagnosis relevant to this encounter.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setDiagnosis(List theDiagnosis) { - this.diagnosis = theDiagnosis; - return this; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (DiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - public DiagnosisComponent addDiagnosis() { //3 - DiagnosisComponent t = new DiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - public Encounter addDiagnosis(DiagnosisComponent t) { //3 - if (t == null) - return this; - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3} - */ - public DiagnosisComponent getDiagnosisFirstRep() { - if (getDiagnosis().isEmpty()) { - addDiagnosis(); - } - return getDiagnosis().get(0); - } - - /** - * @return {@link #account} (The set of accounts that may be used for billing for this Encounter.) - */ - public List getAccount() { - if (this.account == null) - this.account = new ArrayList(); - return this.account; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setAccount(List theAccount) { - this.account = theAccount; - return this; - } - - public boolean hasAccount() { - if (this.account == null) - return false; - for (Reference item : this.account) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addAccount() { //3 - Reference t = new Reference(); - if (this.account == null) - this.account = new ArrayList(); - this.account.add(t); - return t; - } - - public Encounter addAccount(Reference t) { //3 - if (t == null) - return this; - if (this.account == null) - this.account = new ArrayList(); - this.account.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3} - */ - public Reference getAccountFirstRep() { - if (getAccount().isEmpty()) { - addAccount(); - } - return getAccount().get(0); - } - - /** - * @return {@link #dietPreference} (Diet preferences reported by the patient.) - */ - public List getDietPreference() { - if (this.dietPreference == null) - this.dietPreference = new ArrayList(); - return this.dietPreference; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setDietPreference(List theDietPreference) { - this.dietPreference = theDietPreference; - return this; - } - - public boolean hasDietPreference() { - if (this.dietPreference == null) - return false; - for (CodeableConcept item : this.dietPreference) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addDietPreference() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.dietPreference == null) - this.dietPreference = new ArrayList(); - this.dietPreference.add(t); - return t; - } - - public Encounter addDietPreference(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.dietPreference == null) - this.dietPreference = new ArrayList(); - this.dietPreference.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #dietPreference}, creating it if it does not already exist {3} - */ - public CodeableConcept getDietPreferenceFirstRep() { - if (getDietPreference().isEmpty()) { - addDietPreference(); - } - return getDietPreference().get(0); - } - - /** - * @return {@link #specialArrangement} (Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.) - */ - public List getSpecialArrangement() { - if (this.specialArrangement == null) - this.specialArrangement = new ArrayList(); - return this.specialArrangement; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setSpecialArrangement(List theSpecialArrangement) { - this.specialArrangement = theSpecialArrangement; - return this; - } - - public boolean hasSpecialArrangement() { - if (this.specialArrangement == null) - return false; - for (CodeableConcept item : this.specialArrangement) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addSpecialArrangement() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialArrangement == null) - this.specialArrangement = new ArrayList(); - this.specialArrangement.add(t); - return t; - } - - public Encounter addSpecialArrangement(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.specialArrangement == null) - this.specialArrangement = new ArrayList(); - this.specialArrangement.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #specialArrangement}, creating it if it does not already exist {3} - */ - public CodeableConcept getSpecialArrangementFirstRep() { - if (getSpecialArrangement().isEmpty()) { - addSpecialArrangement(); - } - return getSpecialArrangement().get(0); - } - - /** - * @return {@link #specialCourtesy} (Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).) - */ - public List getSpecialCourtesy() { - if (this.specialCourtesy == null) - this.specialCourtesy = new ArrayList(); - return this.specialCourtesy; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setSpecialCourtesy(List theSpecialCourtesy) { - this.specialCourtesy = theSpecialCourtesy; - return this; - } - - public boolean hasSpecialCourtesy() { - if (this.specialCourtesy == null) - return false; - for (CodeableConcept item : this.specialCourtesy) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addSpecialCourtesy() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialCourtesy == null) - this.specialCourtesy = new ArrayList(); - this.specialCourtesy.add(t); - return t; - } - - public Encounter addSpecialCourtesy(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.specialCourtesy == null) - this.specialCourtesy = new ArrayList(); - this.specialCourtesy.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #specialCourtesy}, creating it if it does not already exist {3} - */ - public CodeableConcept getSpecialCourtesyFirstRep() { - if (getSpecialCourtesy().isEmpty()) { - addSpecialCourtesy(); - } - return getSpecialCourtesy().get(0); - } - - /** - * @return {@link #admission} (Details about the stay during which a healthcare service is provided. This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.) - */ - public EncounterAdmissionComponent getAdmission() { - if (this.admission == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Encounter.admission"); - else if (Configuration.doAutoCreate()) - this.admission = new EncounterAdmissionComponent(); // cc - return this.admission; - } - - public boolean hasAdmission() { - return this.admission != null && !this.admission.isEmpty(); - } - - /** - * @param value {@link #admission} (Details about the stay during which a healthcare service is provided. This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.) - */ - public Encounter setAdmission(EncounterAdmissionComponent value) { - this.admission = value; - return this; - } - - /** - * @return {@link #location} (List of locations where the patient has been during this encounter.) - */ - public List getLocation() { - if (this.location == null) - this.location = new ArrayList(); - return this.location; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Encounter setLocation(List theLocation) { - this.location = theLocation; - return this; - } - - public boolean hasLocation() { - if (this.location == null) - return false; - for (EncounterLocationComponent item : this.location) - if (!item.isEmpty()) - return true; - return false; - } - - public EncounterLocationComponent addLocation() { //3 - EncounterLocationComponent t = new EncounterLocationComponent(); - if (this.location == null) - this.location = new ArrayList(); - this.location.add(t); - return t; - } - - public Encounter addLocation(EncounterLocationComponent t) { //3 - if (t == null) - return this; - if (this.location == null) - this.location = new ArrayList(); - this.location.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3} - */ - public EncounterLocationComponent getLocationFirstRep() { - if (getLocation().isEmpty()) { - addLocation(); - } - return getLocation().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("identifier", "Identifier", "Identifier(s) by which this encounter is known.", 0, java.lang.Integer.MAX_VALUE, identifier)); - children.add(new Property("status", "code", "The current state of the encounter (not the state of the patient within the encounter - that is subjectState).", 0, 1, status)); - children.add(new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_)); - children.add(new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, 1, priority)); - children.add(new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("serviceType", "CodeableReference(HealthcareService)", "Broad categorization of the service that is to be provided (e.g. cardiology).", 0, java.lang.Integer.MAX_VALUE, serviceType)); - children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.", 0, 1, subject)); - children.add(new Property("subjectStatus", "CodeableConcept", "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.", 0, 1, subjectStatus)); - children.add(new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare)); - children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this encounter satisfies (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn)); - children.add(new Property("careTeam", "Reference(CareTeam)", "The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.", 0, java.lang.Integer.MAX_VALUE, careTeam)); - children.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, 1, partOf)); - children.add(new Property("serviceProvider", "Reference(Organization)", "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.", 0, 1, serviceProvider)); - children.add(new Property("participant", "", "The list of people responsible for providing the service.", 0, java.lang.Integer.MAX_VALUE, participant)); - children.add(new Property("appointment", "Reference(Appointment)", "The appointment that scheduled this encounter.", 0, java.lang.Integer.MAX_VALUE, appointment)); - children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService)); - children.add(new Property("actualPeriod", "Period", "The actual start and end time of the encounter.", 0, 1, actualPeriod)); - children.add(new Property("plannedStartDate", "dateTime", "The planned start date/time (or admission date) of the encounter.", 0, 1, plannedStartDate)); - children.add(new Property("plannedEndDate", "dateTime", "The planned end date/time (or discharge date) of the encounter.", 0, 1, plannedEndDate)); - children.add(new Property("length", "Duration", "Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.", 0, 1, length)); - children.add(new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason)); - children.add(new Property("diagnosis", "", "The list of diagnosis relevant to this encounter.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - children.add(new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this Encounter.", 0, java.lang.Integer.MAX_VALUE, account)); - children.add(new Property("dietPreference", "CodeableConcept", "Diet preferences reported by the patient.", 0, java.lang.Integer.MAX_VALUE, dietPreference)); - children.add(new Property("specialArrangement", "CodeableConcept", "Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.", 0, java.lang.Integer.MAX_VALUE, specialArrangement)); - children.add(new Property("specialCourtesy", "CodeableConcept", "Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).", 0, java.lang.Integer.MAX_VALUE, specialCourtesy)); - children.add(new Property("admission", "", "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.", 0, 1, admission)); - children.add(new Property("location", "", "List of locations where the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier(s) by which this encounter is known.", 0, java.lang.Integer.MAX_VALUE, identifier); - case -892481550: /*status*/ return new Property("status", "code", "The current state of the encounter (not the state of the patient within the encounter - that is subjectState).", 0, 1, status); - case 94742904: /*class*/ return new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_); - case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, 1, priority); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type); - case -1928370289: /*serviceType*/ return new Property("serviceType", "CodeableReference(HealthcareService)", "Broad categorization of the service that is to be provided (e.g. cardiology).", 0, java.lang.Integer.MAX_VALUE, serviceType); - case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.", 0, 1, subject); - case 110854206: /*subjectStatus*/ return new Property("subjectStatus", "CodeableConcept", "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.", 0, 1, subjectStatus); - case -1892140189: /*episodeOfCare*/ return new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare); - case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this encounter satisfies (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn); - case -7323378: /*careTeam*/ return new Property("careTeam", "Reference(CareTeam)", "The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.", 0, java.lang.Integer.MAX_VALUE, careTeam); - case -995410646: /*partOf*/ return new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, 1, partOf); - case 243182534: /*serviceProvider*/ return new Property("serviceProvider", "Reference(Organization)", "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.", 0, 1, serviceProvider); - case 767422259: /*participant*/ return new Property("participant", "", "The list of people responsible for providing the service.", 0, java.lang.Integer.MAX_VALUE, participant); - case -1474995297: /*appointment*/ return new Property("appointment", "Reference(Appointment)", "The appointment that scheduled this encounter.", 0, java.lang.Integer.MAX_VALUE, appointment); - case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService); - case 789194991: /*actualPeriod*/ return new Property("actualPeriod", "Period", "The actual start and end time of the encounter.", 0, 1, actualPeriod); - case 460857804: /*plannedStartDate*/ return new Property("plannedStartDate", "dateTime", "The planned start date/time (or admission date) of the encounter.", 0, 1, plannedStartDate); - case 1657534661: /*plannedEndDate*/ return new Property("plannedEndDate", "dateTime", "The planned end date/time (or discharge date) of the encounter.", 0, 1, plannedEndDate); - case -1106363674: /*length*/ return new Property("length", "Duration", "Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.", 0, 1, length); - case -934964668: /*reason*/ return new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason); - case 1196993265: /*diagnosis*/ return new Property("diagnosis", "", "The list of diagnosis relevant to this encounter.", 0, java.lang.Integer.MAX_VALUE, diagnosis); - case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this Encounter.", 0, java.lang.Integer.MAX_VALUE, account); - case -1360641041: /*dietPreference*/ return new Property("dietPreference", "CodeableConcept", "Diet preferences reported by the patient.", 0, java.lang.Integer.MAX_VALUE, dietPreference); - case 47410321: /*specialArrangement*/ return new Property("specialArrangement", "CodeableConcept", "Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.", 0, java.lang.Integer.MAX_VALUE, specialArrangement); - case 1583588345: /*specialCourtesy*/ return new Property("specialCourtesy", "CodeableConcept", "Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).", 0, java.lang.Integer.MAX_VALUE, specialCourtesy); - case 27400201: /*admission*/ return new Property("admission", "", "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.", 0, 1, admission); - case 1901043637: /*location*/ return new Property("location", "", "List of locations where the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // CodeableConcept - case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableReference - case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference - case 110854206: /*subjectStatus*/ return this.subjectStatus == null ? new Base[0] : new Base[] {this.subjectStatus}; // CodeableConcept - case -1892140189: /*episodeOfCare*/ return this.episodeOfCare == null ? new Base[0] : this.episodeOfCare.toArray(new Base[this.episodeOfCare.size()]); // Reference - case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference - case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference - case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference - case 243182534: /*serviceProvider*/ return this.serviceProvider == null ? new Base[0] : new Base[] {this.serviceProvider}; // Reference - case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // EncounterParticipantComponent - case -1474995297: /*appointment*/ return this.appointment == null ? new Base[0] : this.appointment.toArray(new Base[this.appointment.size()]); // Reference - case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail - case 789194991: /*actualPeriod*/ return this.actualPeriod == null ? new Base[0] : new Base[] {this.actualPeriod}; // Period - case 460857804: /*plannedStartDate*/ return this.plannedStartDate == null ? new Base[0] : new Base[] {this.plannedStartDate}; // DateTimeType - case 1657534661: /*plannedEndDate*/ return this.plannedEndDate == null ? new Base[0] : new Base[] {this.plannedEndDate}; // DateTimeType - case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // Duration - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // ReasonComponent - case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent - case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference - case -1360641041: /*dietPreference*/ return this.dietPreference == null ? new Base[0] : this.dietPreference.toArray(new Base[this.dietPreference.size()]); // CodeableConcept - case 47410321: /*specialArrangement*/ return this.specialArrangement == null ? new Base[0] : this.specialArrangement.toArray(new Base[this.specialArrangement.size()]); // CodeableConcept - case 1583588345: /*specialCourtesy*/ return this.specialCourtesy == null ? new Base[0] : this.specialCourtesy.toArray(new Base[this.specialCourtesy.size()]); // CodeableConcept - case 27400201: /*admission*/ return this.admission == null ? new Base[0] : new Base[] {this.admission}; // EncounterAdmissionComponent - case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // EncounterLocationComponent - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1618432855: // identifier - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier - return value; - case -892481550: // status - value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case 94742904: // class - this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1165461084: // priority - this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1928370289: // serviceType - this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case -1867885268: // subject - this.subject = TypeConvertor.castToReference(value); // Reference - return value; - case 110854206: // subjectStatus - this.subjectStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1892140189: // episodeOfCare - this.getEpisodeOfCare().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -332612366: // basedOn - this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -7323378: // careTeam - this.getCareTeam().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -995410646: // partOf - this.partOf = TypeConvertor.castToReference(value); // Reference - return value; - case 243182534: // serviceProvider - this.serviceProvider = TypeConvertor.castToReference(value); // Reference - return value; - case 767422259: // participant - this.getParticipant().add((EncounterParticipantComponent) value); // EncounterParticipantComponent - return value; - case -1474995297: // appointment - this.getAppointment().add(TypeConvertor.castToReference(value)); // Reference - return value; - case 1420774698: // virtualService - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail - return value; - case 789194991: // actualPeriod - this.actualPeriod = TypeConvertor.castToPeriod(value); // Period - return value; - case 460857804: // plannedStartDate - this.plannedStartDate = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 1657534661: // plannedEndDate - this.plannedEndDate = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case -1106363674: // length - this.length = TypeConvertor.castToDuration(value); // Duration - return value; - case -934964668: // reason - this.getReason().add((ReasonComponent) value); // ReasonComponent - return value; - case 1196993265: // diagnosis - this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent - return value; - case -1177318867: // account - this.getAccount().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -1360641041: // dietPreference - this.getDietPreference().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 47410321: // specialArrangement - this.getSpecialArrangement().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 1583588345: // specialCourtesy - this.getSpecialCourtesy().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 27400201: // admission - this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent - return value; - case 1901043637: // location - this.getLocation().add((EncounterLocationComponent) value); // EncounterLocationComponent - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); - } else if (name.equals("status")) { - value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("class")) { - this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("priority")) { - this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("serviceType")) { - this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("subject")) { - this.subject = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("subjectStatus")) { - this.subjectStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("episodeOfCare")) { - this.getEpisodeOfCare().add(TypeConvertor.castToReference(value)); - } else if (name.equals("basedOn")) { - this.getBasedOn().add(TypeConvertor.castToReference(value)); - } else if (name.equals("careTeam")) { - this.getCareTeam().add(TypeConvertor.castToReference(value)); - } else if (name.equals("partOf")) { - this.partOf = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("serviceProvider")) { - this.serviceProvider = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("participant")) { - this.getParticipant().add((EncounterParticipantComponent) value); - } else if (name.equals("appointment")) { - this.getAppointment().add(TypeConvertor.castToReference(value)); - } else if (name.equals("virtualService")) { - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); - } else if (name.equals("actualPeriod")) { - this.actualPeriod = TypeConvertor.castToPeriod(value); // Period - } else if (name.equals("plannedStartDate")) { - this.plannedStartDate = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("plannedEndDate")) { - this.plannedEndDate = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("length")) { - this.length = TypeConvertor.castToDuration(value); // Duration - } else if (name.equals("reason")) { - this.getReason().add((ReasonComponent) value); - } else if (name.equals("diagnosis")) { - this.getDiagnosis().add((DiagnosisComponent) value); - } else if (name.equals("account")) { - this.getAccount().add(TypeConvertor.castToReference(value)); - } else if (name.equals("dietPreference")) { - this.getDietPreference().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("specialArrangement")) { - this.getSpecialArrangement().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("specialCourtesy")) { - this.getSpecialCourtesy().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("admission")) { - this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent - } else if (name.equals("location")) { - this.getLocation().add((EncounterLocationComponent) value); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().remove(value); - } else if (name.equals("status")) { - value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("class")) { - this.getClass_().remove(value); - } else if (name.equals("priority")) { - this.priority = null; - } else if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("serviceType")) { - this.getServiceType().remove(value); - } else if (name.equals("subject")) { - this.subject = null; - } else if (name.equals("subjectStatus")) { - this.subjectStatus = null; - } else if (name.equals("episodeOfCare")) { - this.getEpisodeOfCare().remove(value); - } else if (name.equals("basedOn")) { - this.getBasedOn().remove(value); - } else if (name.equals("careTeam")) { - this.getCareTeam().remove(value); - } else if (name.equals("partOf")) { - this.partOf = null; - } else if (name.equals("serviceProvider")) { - this.serviceProvider = null; - } else if (name.equals("participant")) { - this.getParticipant().remove((EncounterParticipantComponent) value); - } else if (name.equals("appointment")) { - this.getAppointment().remove(value); - } else if (name.equals("virtualService")) { - this.getVirtualService().remove(value); - } else if (name.equals("actualPeriod")) { - this.actualPeriod = null; - } else if (name.equals("plannedStartDate")) { - this.plannedStartDate = null; - } else if (name.equals("plannedEndDate")) { - this.plannedEndDate = null; - } else if (name.equals("length")) { - this.length = null; - } else if (name.equals("reason")) { - this.getReason().remove((ReasonComponent) value); - } else if (name.equals("diagnosis")) { - this.getDiagnosis().remove((DiagnosisComponent) value); - } else if (name.equals("account")) { - this.getAccount().remove(value); - } else if (name.equals("dietPreference")) { - this.getDietPreference().remove(value); - } else if (name.equals("specialArrangement")) { - this.getSpecialArrangement().remove(value); - } else if (name.equals("specialCourtesy")) { - this.getSpecialCourtesy().remove(value); - } else if (name.equals("admission")) { - this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent - } else if (name.equals("location")) { - this.getLocation().remove((EncounterLocationComponent) value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: return addIdentifier(); - case -892481550: return getStatusElement(); - case 94742904: return addClass_(); - case -1165461084: return getPriority(); - case 3575610: return addType(); - case -1928370289: return addServiceType(); - case -1867885268: return getSubject(); - case 110854206: return getSubjectStatus(); - case -1892140189: return addEpisodeOfCare(); - case -332612366: return addBasedOn(); - case -7323378: return addCareTeam(); - case -995410646: return getPartOf(); - case 243182534: return getServiceProvider(); - case 767422259: return addParticipant(); - case -1474995297: return addAppointment(); - case 1420774698: return addVirtualService(); - case 789194991: return getActualPeriod(); - case 460857804: return getPlannedStartDateElement(); - case 1657534661: return getPlannedEndDateElement(); - case -1106363674: return getLength(); - case -934964668: return addReason(); - case 1196993265: return addDiagnosis(); - case -1177318867: return addAccount(); - case -1360641041: return addDietPreference(); - case 47410321: return addSpecialArrangement(); - case 1583588345: return addSpecialCourtesy(); - case 27400201: return getAdmission(); - case 1901043637: return addLocation(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case -892481550: /*status*/ return new String[] {"code"}; - case 94742904: /*class*/ return new String[] {"CodeableConcept"}; - case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case -1928370289: /*serviceType*/ return new String[] {"CodeableReference"}; - case -1867885268: /*subject*/ return new String[] {"Reference"}; - case 110854206: /*subjectStatus*/ return new String[] {"CodeableConcept"}; - case -1892140189: /*episodeOfCare*/ return new String[] {"Reference"}; - case -332612366: /*basedOn*/ return new String[] {"Reference"}; - case -7323378: /*careTeam*/ return new String[] {"Reference"}; - case -995410646: /*partOf*/ return new String[] {"Reference"}; - case 243182534: /*serviceProvider*/ return new String[] {"Reference"}; - case 767422259: /*participant*/ return new String[] {}; - case -1474995297: /*appointment*/ return new String[] {"Reference"}; - case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; - case 789194991: /*actualPeriod*/ return new String[] {"Period"}; - case 460857804: /*plannedStartDate*/ return new String[] {"dateTime"}; - case 1657534661: /*plannedEndDate*/ return new String[] {"dateTime"}; - case -1106363674: /*length*/ return new String[] {"Duration"}; - case -934964668: /*reason*/ return new String[] {}; - case 1196993265: /*diagnosis*/ return new String[] {}; - case -1177318867: /*account*/ return new String[] {"Reference"}; - case -1360641041: /*dietPreference*/ return new String[] {"CodeableConcept"}; - case 47410321: /*specialArrangement*/ return new String[] {"CodeableConcept"}; - case 1583588345: /*specialCourtesy*/ return new String[] {"CodeableConcept"}; - case 27400201: /*admission*/ return new String[] {}; - case 1901043637: /*location*/ return new String[] {}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Encounter.status"); - } - else if (name.equals("class")) { - return addClass_(); - } - else if (name.equals("priority")) { - this.priority = new CodeableConcept(); - return this.priority; - } - else if (name.equals("type")) { - return addType(); - } - else if (name.equals("serviceType")) { - return addServiceType(); - } - else if (name.equals("subject")) { - this.subject = new Reference(); - return this.subject; - } - else if (name.equals("subjectStatus")) { - this.subjectStatus = new CodeableConcept(); - return this.subjectStatus; - } - else if (name.equals("episodeOfCare")) { - return addEpisodeOfCare(); - } - else if (name.equals("basedOn")) { - return addBasedOn(); - } - else if (name.equals("careTeam")) { - return addCareTeam(); - } - else if (name.equals("partOf")) { - this.partOf = new Reference(); - return this.partOf; - } - else if (name.equals("serviceProvider")) { - this.serviceProvider = new Reference(); - return this.serviceProvider; - } - else if (name.equals("participant")) { - return addParticipant(); - } - else if (name.equals("appointment")) { - return addAppointment(); - } - else if (name.equals("virtualService")) { - return addVirtualService(); - } - else if (name.equals("actualPeriod")) { - this.actualPeriod = new Period(); - return this.actualPeriod; - } - else if (name.equals("plannedStartDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Encounter.plannedStartDate"); - } - else if (name.equals("plannedEndDate")) { - throw new FHIRException("Cannot call addChild on a singleton property Encounter.plannedEndDate"); - } - else if (name.equals("length")) { - this.length = new Duration(); - return this.length; - } - else if (name.equals("reason")) { - return addReason(); - } - else if (name.equals("diagnosis")) { - return addDiagnosis(); - } - else if (name.equals("account")) { - return addAccount(); - } - else if (name.equals("dietPreference")) { - return addDietPreference(); - } - else if (name.equals("specialArrangement")) { - return addSpecialArrangement(); - } - else if (name.equals("specialCourtesy")) { - return addSpecialCourtesy(); - } - else if (name.equals("admission")) { - this.admission = new EncounterAdmissionComponent(); - return this.admission; - } - else if (name.equals("location")) { - return addLocation(); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Encounter"; - - } - - public Encounter copy() { - Encounter dst = new Encounter(); - copyValues(dst); - return dst; - } - - public void copyValues(Encounter dst) { - super.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 (class_ != null) { - dst.class_ = new ArrayList(); - for (CodeableConcept i : class_) - dst.class_.add(i.copy()); - }; - dst.priority = priority == null ? null : priority.copy(); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - if (serviceType != null) { - dst.serviceType = new ArrayList(); - for (CodeableReference i : serviceType) - dst.serviceType.add(i.copy()); - }; - dst.subject = subject == null ? null : subject.copy(); - dst.subjectStatus = subjectStatus == null ? null : subjectStatus.copy(); - if (episodeOfCare != null) { - dst.episodeOfCare = new ArrayList(); - for (Reference i : episodeOfCare) - dst.episodeOfCare.add(i.copy()); - }; - if (basedOn != null) { - dst.basedOn = new ArrayList(); - for (Reference i : basedOn) - dst.basedOn.add(i.copy()); - }; - if (careTeam != null) { - dst.careTeam = new ArrayList(); - for (Reference i : careTeam) - dst.careTeam.add(i.copy()); - }; - dst.partOf = partOf == null ? null : partOf.copy(); - dst.serviceProvider = serviceProvider == null ? null : serviceProvider.copy(); - if (participant != null) { - dst.participant = new ArrayList(); - for (EncounterParticipantComponent i : participant) - dst.participant.add(i.copy()); - }; - if (appointment != null) { - dst.appointment = new ArrayList(); - for (Reference i : appointment) - dst.appointment.add(i.copy()); - }; - if (virtualService != null) { - dst.virtualService = new ArrayList(); - for (VirtualServiceDetail i : virtualService) - dst.virtualService.add(i.copy()); - }; - dst.actualPeriod = actualPeriod == null ? null : actualPeriod.copy(); - dst.plannedStartDate = plannedStartDate == null ? null : plannedStartDate.copy(); - dst.plannedEndDate = plannedEndDate == null ? null : plannedEndDate.copy(); - dst.length = length == null ? null : length.copy(); - if (reason != null) { - dst.reason = new ArrayList(); - for (ReasonComponent i : reason) - dst.reason.add(i.copy()); - }; - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (DiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (account != null) { - dst.account = new ArrayList(); - for (Reference i : account) - dst.account.add(i.copy()); - }; - if (dietPreference != null) { - dst.dietPreference = new ArrayList(); - for (CodeableConcept i : dietPreference) - dst.dietPreference.add(i.copy()); - }; - if (specialArrangement != null) { - dst.specialArrangement = new ArrayList(); - for (CodeableConcept i : specialArrangement) - dst.specialArrangement.add(i.copy()); - }; - if (specialCourtesy != null) { - dst.specialCourtesy = new ArrayList(); - for (CodeableConcept i : specialCourtesy) - dst.specialCourtesy.add(i.copy()); - }; - dst.admission = admission == null ? null : admission.copy(); - if (location != null) { - dst.location = new ArrayList(); - for (EncounterLocationComponent i : location) - dst.location.add(i.copy()); - }; - } - - protected Encounter typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof Encounter)) - return false; - Encounter o = (Encounter) other_; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(class_, o.class_, true) - && compareDeep(priority, o.priority, true) && compareDeep(type, o.type, true) && compareDeep(serviceType, o.serviceType, true) - && compareDeep(subject, o.subject, true) && compareDeep(subjectStatus, o.subjectStatus, true) && compareDeep(episodeOfCare, o.episodeOfCare, true) - && compareDeep(basedOn, o.basedOn, true) && compareDeep(careTeam, o.careTeam, true) && compareDeep(partOf, o.partOf, true) - && compareDeep(serviceProvider, o.serviceProvider, true) && compareDeep(participant, o.participant, true) - && compareDeep(appointment, o.appointment, true) && compareDeep(virtualService, o.virtualService, true) - && compareDeep(actualPeriod, o.actualPeriod, true) && compareDeep(plannedStartDate, o.plannedStartDate, true) - && compareDeep(plannedEndDate, o.plannedEndDate, true) && compareDeep(length, o.length, true) && compareDeep(reason, o.reason, true) - && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(account, o.account, true) && compareDeep(dietPreference, o.dietPreference, true) - && compareDeep(specialArrangement, o.specialArrangement, true) && compareDeep(specialCourtesy, o.specialCourtesy, true) - && compareDeep(admission, o.admission, true) && compareDeep(location, o.location, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof Encounter)) - return false; - Encounter o = (Encounter) other_; - return compareValues(status, o.status, true) && compareValues(plannedStartDate, o.plannedStartDate, true) - && compareValues(plannedEndDate, o.plannedEndDate, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, class_ - , priority, type, serviceType, subject, subjectStatus, episodeOfCare, basedOn - , careTeam, partOf, serviceProvider, participant, appointment, virtualService, actualPeriod - , plannedStartDate, plannedEndDate, length, reason, diagnosis, account, dietPreference - , specialArrangement, specialCourtesy, admission, location); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Encounter; - } - - /** - * Search parameter: account - *

- * Description: The set of accounts that may be used for billing for this Encounter
- * Type: reference
- * Path: Encounter.account
- *

- */ - @SearchParamDefinition(name="account", path="Encounter.account", description="The set of accounts that may be used for billing for this Encounter", type="reference", target={Account.class } ) - public static final String SP_ACCOUNT = "account"; - /** - * Fluent Client search parameter constant for account - *

- * Description: The set of accounts that may be used for billing for this Encounter
- * Type: reference
- * Path: Encounter.account
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACCOUNT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:account". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ACCOUNT = new ca.uhn.fhir.model.api.Include("Encounter:account").toLocked(); - - /** - * Search parameter: appointment - *

- * Description: The appointment that scheduled this encounter
- * Type: reference
- * Path: Encounter.appointment
- *

- */ - @SearchParamDefinition(name="appointment", path="Encounter.appointment", description="The appointment that scheduled this encounter", type="reference", target={Appointment.class } ) - public static final String SP_APPOINTMENT = "appointment"; - /** - * Fluent Client search parameter constant for appointment - *

- * Description: The appointment that scheduled this encounter
- * Type: reference
- * Path: Encounter.appointment
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam APPOINTMENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_APPOINTMENT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:appointment". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_APPOINTMENT = new ca.uhn.fhir.model.api.Include("Encounter:appointment").toLocked(); - - /** - * Search parameter: based-on - *

- * Description: The ServiceRequest that initiated this encounter
- * Type: reference
- * Path: Encounter.basedOn
- *

- */ - @SearchParamDefinition(name="based-on", path="Encounter.basedOn", description="The ServiceRequest that initiated this encounter", type="reference", target={CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class } ) - public static final String SP_BASED_ON = "based-on"; - /** - * Fluent Client search parameter constant for based-on - *

- * Description: The ServiceRequest that initiated this encounter
- * Type: reference
- * Path: Encounter.basedOn
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:based-on". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Encounter:based-on").toLocked(); - - /** - * Search parameter: careteam - *

- * Description: Careteam allocated to participate in the encounter
- * Type: reference
- * Path: Encounter.careTeam
- *

- */ - @SearchParamDefinition(name="careteam", path="Encounter.careTeam", description="Careteam allocated to participate in the encounter", type="reference", target={CareTeam.class } ) - public static final String SP_CARETEAM = "careteam"; - /** - * Fluent Client search parameter constant for careteam - *

- * Description: Careteam allocated to participate in the encounter
- * Type: reference
- * Path: Encounter.careTeam
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARETEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARETEAM); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:careteam". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_CARETEAM = new ca.uhn.fhir.model.api.Include("Encounter:careteam").toLocked(); - - /** - * Search parameter: class - *

- * Description: Classification of patient encounter
- * Type: token
- * Path: Encounter.class
- *

- */ - @SearchParamDefinition(name="class", path="Encounter.class", description="Classification of patient encounter", type="token" ) - public static final String SP_CLASS = "class"; - /** - * Fluent Client search parameter constant for class - *

- * Description: Classification of patient encounter
- * Type: token
- * Path: Encounter.class
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLASS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLASS); - - /** - * Search parameter: date-start - *

- * Description: The actual start date of the Encounter
- * Type: date
- * Path: Encounter.actualPeriod.start
- *

- */ - @SearchParamDefinition(name="date-start", path="Encounter.actualPeriod.start", description="The actual start date of the Encounter", type="date" ) - public static final String SP_DATE_START = "date-start"; - /** - * Fluent Client search parameter constant for date-start - *

- * Description: The actual start date of the Encounter
- * Type: date
- * Path: Encounter.actualPeriod.start
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE_START = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE_START); - - /** - * Search parameter: diagnosis-code - *

- * Description: The diagnosis or procedure relevant to the encounter (coded)
- * Type: token
- * Path: Encounter.diagnosis.condition.concept
- *

- */ - @SearchParamDefinition(name="diagnosis-code", path="Encounter.diagnosis.condition.concept", description="The diagnosis or procedure relevant to the encounter (coded)", type="token" ) - public static final String SP_DIAGNOSIS_CODE = "diagnosis-code"; - /** - * Fluent Client search parameter constant for diagnosis-code - *

- * Description: The diagnosis or procedure relevant to the encounter (coded)
- * Type: token
- * Path: Encounter.diagnosis.condition.concept
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam DIAGNOSIS_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DIAGNOSIS_CODE); - - /** - * Search parameter: diagnosis-reference - *

- * Description: The diagnosis or procedure relevant to the encounter (resource reference)
- * Type: reference
- * Path: Encounter.diagnosis.condition.reference
- *

- */ - @SearchParamDefinition(name="diagnosis-reference", path="Encounter.diagnosis.condition.reference", description="The diagnosis or procedure relevant to the encounter (resource reference)", type="reference", target={Condition.class } ) - public static final String SP_DIAGNOSIS_REFERENCE = "diagnosis-reference"; - /** - * Fluent Client search parameter constant for diagnosis-reference - *

- * Description: The diagnosis or procedure relevant to the encounter (resource reference)
- * Type: reference
- * Path: Encounter.diagnosis.condition.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DIAGNOSIS_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DIAGNOSIS_REFERENCE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:diagnosis-reference". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_DIAGNOSIS_REFERENCE = new ca.uhn.fhir.model.api.Include("Encounter:diagnosis-reference").toLocked(); - - /** - * Search parameter: end-date - *

- * Description: The actual end date of the Encounter
- * Type: date
- * Path: Encounter.actualPeriod.end
- *

- */ - @SearchParamDefinition(name="end-date", path="Encounter.actualPeriod.end", description="The actual end date of the Encounter", type="date" ) - public static final String SP_END_DATE = "end-date"; - /** - * Fluent Client search parameter constant for end-date - *

- * Description: The actual end date of the Encounter
- * Type: date
- * Path: Encounter.actualPeriod.end
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam END_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_END_DATE); - - /** - * Search parameter: episode-of-care - *

- * Description: Episode(s) of care that this encounter should be recorded against
- * Type: reference
- * Path: Encounter.episodeOfCare
- *

- */ - @SearchParamDefinition(name="episode-of-care", path="Encounter.episodeOfCare", description="Episode(s) of care that this encounter should be recorded against", type="reference", target={EpisodeOfCare.class } ) - public static final String SP_EPISODE_OF_CARE = "episode-of-care"; - /** - * Fluent Client search parameter constant for episode-of-care - *

- * Description: Episode(s) of care that this encounter should be recorded against
- * Type: reference
- * Path: Encounter.episodeOfCare
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EPISODE_OF_CARE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EPISODE_OF_CARE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:episode-of-care". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_EPISODE_OF_CARE = new ca.uhn.fhir.model.api.Include("Encounter:episode-of-care").toLocked(); - - /** - * Search parameter: length - *

- * Description: Length of encounter in days
- * Type: quantity
- * Path: Encounter.length
- *

- */ - @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="quantity" ) - public static final String SP_LENGTH = "length"; - /** - * Fluent Client search parameter constant for length - *

- * Description: Length of encounter in days
- * Type: quantity
- * Path: Encounter.length
- *

- */ - public static final ca.uhn.fhir.rest.gclient.QuantityClientParam LENGTH = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_LENGTH); - - /** - * Search parameter: location - *

- * Description: Location the encounter takes place
- * Type: reference
- * Path: Encounter.location.location
- *

- */ - @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference", target={Location.class } ) - public static final String SP_LOCATION = "location"; - /** - * Fluent Client search parameter constant for location - *

- * Description: Location the encounter takes place
- * Type: reference
- * Path: Encounter.location.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 "Encounter:location". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Encounter:location").toLocked(); - - /** - * Search parameter: part-of - *

- * Description: Another Encounter this encounter is part of
- * Type: reference
- * Path: Encounter.partOf
- *

- */ - @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference", target={Encounter.class } ) - public static final String SP_PART_OF = "part-of"; - /** - * Fluent Client search parameter constant for part-of - *

- * Description: Another Encounter this encounter is part of
- * Type: reference
- * Path: Encounter.partOf
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:part-of". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Encounter:part-of").toLocked(); - - /** - * Search parameter: participant-type - *

- * Description: Role of participant in encounter
- * Type: token
- * Path: Encounter.participant.type
- *

- */ - @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) - public static final String SP_PARTICIPANT_TYPE = "participant-type"; - /** - * Fluent Client search parameter constant for participant-type - *

- * Description: Role of participant in encounter
- * Type: token
- * Path: Encounter.participant.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam PARTICIPANT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PARTICIPANT_TYPE); - - /** - * Search parameter: participant - *

- * Description: Persons involved in the encounter other than the patient
- * Type: reference
- * Path: Encounter.participant.actor
- *

- */ - @SearchParamDefinition(name="participant", path="Encounter.participant.actor", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Group.class, HealthcareService.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) - public static final String SP_PARTICIPANT = "participant"; - /** - * Fluent Client search parameter constant for participant - *

- * Description: Persons involved in the encounter other than the patient
- * Type: reference
- * Path: Encounter.participant.actor
- *

- */ - 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 "Encounter:participant". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("Encounter:participant").toLocked(); - - /** - * Search parameter: practitioner - *

- * Description: Persons involved in the encounter other than the patient
- * Type: reference
- * Path: Encounter.participant.actor.where(resolve() is Practitioner)
- *

- */ - @SearchParamDefinition(name="practitioner", path="Encounter.participant.actor.where(resolve() is Practitioner)", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class } ) - public static final String SP_PRACTITIONER = "practitioner"; - /** - * Fluent Client search parameter constant for practitioner - *

- * Description: Persons involved in the encounter other than the patient
- * Type: reference
- * Path: Encounter.participant.actor.where(resolve() is 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 "Encounter:practitioner". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Encounter:practitioner").toLocked(); - - /** - * Search parameter: reason-code - *

- * Description: Reference to a concept (coded)
- * Type: token
- * Path: Encounter.reason.value.concept
- *

- */ - @SearchParamDefinition(name="reason-code", path="Encounter.reason.value.concept", description="Reference to a concept (coded)", type="token" ) - public static final String SP_REASON_CODE = "reason-code"; - /** - * Fluent Client search parameter constant for reason-code - *

- * Description: Reference to a concept (coded)
- * Type: token
- * Path: Encounter.reason.value.concept
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE); - - /** - * Search parameter: reason-reference - *

- * Description: Reference to a resource (resource reference)
- * Type: reference
- * Path: Encounter.reason.value.reference
- *

- */ - @SearchParamDefinition(name="reason-reference", path="Encounter.reason.value.reference", description="Reference to a resource (resource reference)", type="reference", target={Condition.class, DiagnosticReport.class, ImmunizationRecommendation.class, Observation.class, Procedure.class } ) - public static final String SP_REASON_REFERENCE = "reason-reference"; - /** - * Fluent Client search parameter constant for reason-reference - *

- * Description: Reference to a resource (resource reference)
- * Type: reference
- * Path: Encounter.reason.value.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:reason-reference". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Encounter:reason-reference").toLocked(); - - /** - * Search parameter: service-provider - *

- * Description: The organization (facility) responsible for this encounter
- * Type: reference
- * Path: Encounter.serviceProvider
- *

- */ - @SearchParamDefinition(name="service-provider", path="Encounter.serviceProvider", description="The organization (facility) responsible for this encounter", type="reference", target={Organization.class } ) - public static final String SP_SERVICE_PROVIDER = "service-provider"; - /** - * Fluent Client search parameter constant for service-provider - *

- * Description: The organization (facility) responsible for this encounter
- * Type: reference
- * Path: Encounter.serviceProvider
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE_PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE_PROVIDER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Encounter:service-provider". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE_PROVIDER = new ca.uhn.fhir.model.api.Include("Encounter:service-provider").toLocked(); - - /** - * Search parameter: special-arrangement - *

- * Description: Wheelchair, translator, stretcher, etc.
- * Type: token
- * Path: Encounter.specialArrangement
- *

- */ - @SearchParamDefinition(name="special-arrangement", path="Encounter.specialArrangement", description="Wheelchair, translator, stretcher, etc.", type="token" ) - public static final String SP_SPECIAL_ARRANGEMENT = "special-arrangement"; - /** - * Fluent Client search parameter constant for special-arrangement - *

- * Description: Wheelchair, translator, stretcher, etc.
- * Type: token
- * Path: Encounter.specialArrangement
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIAL_ARRANGEMENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIAL_ARRANGEMENT); - - /** - * Search parameter: status - *

- * Description: planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown
- * Type: token
- * Path: Encounter.status
- *

- */ - @SearchParamDefinition(name="status", path="Encounter.status", description="planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown", type="token" ) - public static final String SP_STATUS = "status"; - /** - * Fluent Client search parameter constant for status - *

- * Description: planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown
- * Type: token
- * Path: Encounter.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - - /** - * Search parameter: subject-status - *

- * Description: The current status of the subject in relation to the Encounter
- * Type: token
- * Path: Encounter.subjectStatus
- *

- */ - @SearchParamDefinition(name="subject-status", path="Encounter.subjectStatus", description="The current status of the subject in relation to the Encounter", type="token" ) - public static final String SP_SUBJECT_STATUS = "subject-status"; - /** - * Fluent Client search parameter constant for subject-status - *

- * Description: The current status of the subject in relation to the Encounter
- * Type: token
- * Path: Encounter.subjectStatus
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBJECT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBJECT_STATUS); - - /** - * Search parameter: subject - *

- * Description: The patient or group present at the encounter
- * Type: reference
- * Path: Encounter.subject
- *

- */ - @SearchParamDefinition(name="subject", path="Encounter.subject", description="The patient or group present at the encounter", type="reference", target={Group.class, Patient.class } ) - public static final String SP_SUBJECT = "subject"; - /** - * Fluent Client search parameter constant for subject - *

- * Description: The patient or group present at the encounter
- * Type: reference
- * Path: Encounter.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 "Encounter:subject". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Encounter:subject").toLocked(); - - /** - * Search parameter: date - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): When the event occurred -* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded -* [Appointment](appointment.html): Appointment date/time. -* [AuditEvent](auditevent.html): Time when the event was recorded -* [CarePlan](careplan.html): Time period plan covers -* [CareTeam](careteam.html): A date within the coverage time period. -* [ClinicalImpression](clinicalimpression.html): When the assessment was documented -* [Composition](composition.html): Composition editing time -* [Consent](consent.html): When consent was agreed to -* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report -* [DocumentReference](documentreference.html): When this document reference was created -* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted -* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period -* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated -* [Flag](flag.html): Time period when flag is active -* [Immunization](immunization.html): Vaccination (non)-Administration Date -* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated -* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created -* [Invoice](invoice.html): Invoice date / posting date -* [List](list.html): When the list was prepared -* [MeasureReport](measurereport.html): The date of the measure report -* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication -* [Observation](observation.html): Clinically relevant time/time-period for observation -* [Procedure](procedure.html): When the procedure occurred or is occurring -* [ResearchSubject](researchsubject.html): Start and end of participation -* [RiskAssessment](riskassessment.html): When was assessment made? -* [SupplyRequest](supplyrequest.html): When the request was made -
- * Type: date
- * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
- *

- */ - @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) - public static final String SP_DATE = "date"; - /** - * Fluent Client search parameter constant for date - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): When the event occurred -* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded -* [Appointment](appointment.html): Appointment date/time. -* [AuditEvent](auditevent.html): Time when the event was recorded -* [CarePlan](careplan.html): Time period plan covers -* [CareTeam](careteam.html): A date within the coverage time period. -* [ClinicalImpression](clinicalimpression.html): When the assessment was documented -* [Composition](composition.html): Composition editing time -* [Consent](consent.html): When consent was agreed to -* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report -* [DocumentReference](documentreference.html): When this document reference was created -* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted -* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period -* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated -* [Flag](flag.html): Time period when flag is active -* [Immunization](immunization.html): Vaccination (non)-Administration Date -* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated -* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created -* [Invoice](invoice.html): Invoice date / posting date -* [List](list.html): When the list was prepared -* [MeasureReport](measurereport.html): The date of the measure report -* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication -* [Observation](observation.html): Clinically relevant time/time-period for observation -* [Procedure](procedure.html): When the procedure occurred or is occurring -* [ResearchSubject](researchsubject.html): Start and end of participation -* [RiskAssessment](riskassessment.html): When was assessment made? -* [SupplyRequest](supplyrequest.html): When the request was made -
- * Type: date
- * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
- *

- */ - @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Encounter:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Encounter:patient").toLocked(); - - /** - * Search parameter: type - *

- * Description: Multiple Resources: - -* [Account](account.html): E.g. patient, expense, depreciation -* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) -* [Composition](composition.html): Kind of composition (LOINC if possible) -* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) -* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) -* [Encounter](encounter.html): Specific type of encounter -* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management -* [Invoice](invoice.html): Type of Invoice -* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type -* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence -* [Specimen](specimen.html): The specimen type -
- * Type: token
- * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
- *

- */ - @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" ) - public static final String SP_TYPE = "type"; - /** - * Fluent Client search parameter constant for type - *

- * Description: Multiple Resources: - -* [Account](account.html): E.g. patient, expense, depreciation -* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) -* [Composition](composition.html): Kind of composition (LOINC if possible) -* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) -* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) -* [Encounter](encounter.html): Specific type of encounter -* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management -* [Invoice](invoice.html): Type of Invoice -* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type -* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence -* [Specimen](specimen.html): The specimen type -
- * Type: token
- * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); - - -} - +package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; + +/** + * An interaction between healthcare provider(s), and/or patient(s) for the purpose of providing healthcare service(s) or assessing the health status of patient(s). + */ +@ResourceDef(name="Encounter", profile="http://hl7.org/fhir/StructureDefinition/Encounter") +public class Encounter extends DomainResource { + + public enum EncounterLocationStatus { + /** + * The patient is planned to be moved to this location at some point in the future. + */ + PLANNED, + /** + * The patient is currently at this location, or was between the period specified.\r\rA system may update these records when the patient leaves the location to either reserved, or completed. + */ + ACTIVE, + /** + * This location is held empty for this patient. + */ + RESERVED, + /** + * The patient was at this location during the period specified.\r\rNot to be used when the patient is currently at the location. + */ + COMPLETED, + /** + * added to help the parsers with the generic types + */ + NULL; + public static EncounterLocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return PLANNED; + if ("active".equals(codeString)) + return ACTIVE; + if ("reserved".equals(codeString)) + return RESERVED; + if ("completed".equals(codeString)) + return COMPLETED; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PLANNED: return "planned"; + case ACTIVE: return "active"; + case RESERVED: return "reserved"; + case COMPLETED: return "completed"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PLANNED: return "http://hl7.org/fhir/encounter-location-status"; + case ACTIVE: return "http://hl7.org/fhir/encounter-location-status"; + case RESERVED: return "http://hl7.org/fhir/encounter-location-status"; + case COMPLETED: return "http://hl7.org/fhir/encounter-location-status"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PLANNED: return "The patient is planned to be moved to this location at some point in the future."; + case ACTIVE: return "The patient is currently at this location, or was between the period specified.\r\rA system may update these records when the patient leaves the location to either reserved, or completed."; + case RESERVED: return "This location is held empty for this patient."; + case COMPLETED: return "The patient was at this location during the period specified.\r\rNot to be used when the patient is currently at the location."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PLANNED: return "Planned"; + case ACTIVE: return "Active"; + case RESERVED: return "Reserved"; + case COMPLETED: return "Completed"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class EncounterLocationStatusEnumFactory implements EnumFactory { + public EncounterLocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("planned".equals(codeString)) + return EncounterLocationStatus.PLANNED; + if ("active".equals(codeString)) + return EncounterLocationStatus.ACTIVE; + if ("reserved".equals(codeString)) + return EncounterLocationStatus.RESERVED; + if ("completed".equals(codeString)) + return EncounterLocationStatus.COMPLETED; + throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, EncounterLocationStatus.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.NULL, code); + if ("planned".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.PLANNED, code); + if ("active".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.ACTIVE, code); + if ("reserved".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.RESERVED, code); + if ("completed".equals(codeString)) + return new Enumeration(this, EncounterLocationStatus.COMPLETED, code); + throw new FHIRException("Unknown EncounterLocationStatus code '"+codeString+"'"); + } + public String toCode(EncounterLocationStatus code) { + if (code == EncounterLocationStatus.NULL) + return null; + if (code == EncounterLocationStatus.PLANNED) + return "planned"; + if (code == EncounterLocationStatus.ACTIVE) + return "active"; + if (code == EncounterLocationStatus.RESERVED) + return "reserved"; + if (code == EncounterLocationStatus.COMPLETED) + return "completed"; + return "?"; + } + public String toSystem(EncounterLocationStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class EncounterParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of participant in encounter. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Role of participant in encounter", formalDefinition="Role of participant in encounter." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-participant-type") + protected List type; + + /** + * The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period. + */ + @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Period of time during the encounter that the participant participated", formalDefinition="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period." ) + protected Period period; + + /** + * Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times. + */ + @Child(name = "actor", type = {Patient.class, Group.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Device.class, HealthcareService.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The individual, device, or service participating in the encounter", formalDefinition="Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times." ) + protected Reference actor; + + private static final long serialVersionUID = 1982623707L; + + /** + * Constructor + */ + public EncounterParticipantComponent() { + super(); + } + + /** + * @return {@link #type} (Role of participant in encounter.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public EncounterParticipantComponent setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public EncounterParticipantComponent addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #period} (The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterParticipantComponent.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 that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.) + */ + public EncounterParticipantComponent setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #actor} (Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.) + */ + public Reference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterParticipantComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new Reference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.) + */ + public EncounterParticipantComponent setActor(Reference value) { + this.actor = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("type", "CodeableConcept", "Role of participant in encounter.", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("period", "Period", "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", 0, 1, period)); + children.add(new Property("actor", "Reference(Patient|Group|RelatedPerson|Practitioner|PractitionerRole|Device|HealthcareService)", "Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.", 0, 1, actor)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Role of participant in encounter.", 0, java.lang.Integer.MAX_VALUE, type); + case -991726143: /*period*/ return new Property("period", "Period", "The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.", 0, 1, period); + case 92645877: /*actor*/ return new Property("actor", "Reference(Patient|Group|RelatedPerson|Practitioner|PractitionerRole|Device|HealthcareService)", "Person involved in the encounter, the patient/group is also included here to indicate that the patient was actually participating in the encounter. Not including the patient here covers use cases such as a case meeting between practitioners about a patient - non contact times.", 0, 1, actor); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period + case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -991726143: // period + this.period = TypeConvertor.castToPeriod(value); // Period + return value; + case 92645877: // actor + this.actor = TypeConvertor.castToReference(value); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("period")) { + this.period = TypeConvertor.castToPeriod(value); // Period + } else if (name.equals("actor")) { + this.actor = TypeConvertor.castToReference(value); // Reference + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("period")) { + this.period = null; + } else if (name.equals("actor")) { + this.actor = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: return addType(); + case -991726143: return getPeriod(); + case 92645877: return getActor(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -991726143: /*period*/ return new String[] {"Period"}; + case 92645877: /*actor*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + return addType(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; + } + else + return super.addChild(name); + } + + public EncounterParticipantComponent copy() { + EncounterParticipantComponent dst = new EncounterParticipantComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(EncounterParticipantComponent dst) { + super.copyValues(dst); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + dst.actor = actor == null ? null : actor.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof EncounterParticipantComponent)) + return false; + EncounterParticipantComponent o = (EncounterParticipantComponent) other_; + return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof EncounterParticipantComponent)) + return false; + EncounterParticipantComponent o = (EncounterParticipantComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor); + } + + public String fhirType() { + return "Encounter.participant"; + + } + + } + + @Block() + public static class ReasonComponent extends BackboneElement implements IBaseBackboneElement { + /** + * What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening). + */ + @Child(name = "use", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="What the reason value should be used for/as", formalDefinition="What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason-use") + protected List use; + + /** + * Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis. + */ + @Child(name = "value", type = {CodeableReference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reason the encounter takes place (core or reference)", formalDefinition="Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason") + protected List value; + + private static final long serialVersionUID = 1305979913L; + + /** + * Constructor + */ + public ReasonComponent() { + super(); + } + + /** + * @return {@link #use} (What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).) + */ + public List getUse() { + if (this.use == null) + this.use = new ArrayList(); + return this.use; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ReasonComponent setUse(List theUse) { + this.use = theUse; + return this; + } + + public boolean hasUse() { + if (this.use == null) + return false; + for (CodeableConcept item : this.use) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addUse() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.use == null) + this.use = new ArrayList(); + this.use.add(t); + return t; + } + + public ReasonComponent addUse(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.use == null) + this.use = new ArrayList(); + this.use.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #use}, creating it if it does not already exist {3} + */ + public CodeableConcept getUseFirstRep() { + if (getUse().isEmpty()) { + addUse(); + } + return getUse().get(0); + } + + /** + * @return {@link #value} (Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.) + */ + public List getValue() { + if (this.value == null) + this.value = new ArrayList(); + return this.value; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public ReasonComponent setValue(List theValue) { + this.value = theValue; + return this; + } + + public boolean hasValue() { + if (this.value == null) + return false; + for (CodeableReference item : this.value) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addValue() { //3 + CodeableReference t = new CodeableReference(); + if (this.value == null) + this.value = new ArrayList(); + this.value.add(t); + return t; + } + + public ReasonComponent addValue(CodeableReference t) { //3 + if (t == null) + return this; + if (this.value == null) + this.value = new ArrayList(); + this.value.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #value}, creating it if it does not already exist {3} + */ + public CodeableReference getValueFirstRep() { + if (getValue().isEmpty()) { + addValue(); + } + return getValue().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, java.lang.Integer.MAX_VALUE, use)); + children.add(new Property("value", "CodeableReference(Condition|DiagnosticReport|Observation|ImmunizationRecommendation|Procedure)", "Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 116103: /*use*/ return new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, java.lang.Integer.MAX_VALUE, use); + case 111972721: /*value*/ return new Property("value", "CodeableReference(Condition|DiagnosticReport|Observation|ImmunizationRecommendation|Procedure)", "Reason the encounter takes place, expressed as a code or a reference to another resource. For admissions, this can be used for a coded admission diagnosis.", 0, java.lang.Integer.MAX_VALUE, value); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 116103: /*use*/ return this.use == null ? new Base[0] : this.use.toArray(new Base[this.use.size()]); // CodeableConcept + case 111972721: /*value*/ return this.value == null ? new Base[0] : this.value.toArray(new Base[this.value.size()]); // CodeableReference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 116103: // use + this.getUse().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 111972721: // value + this.getValue().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("use")) { + this.getUse().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("value")) { + this.getValue().add(TypeConvertor.castToCodeableReference(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("use")) { + this.getUse().remove(value); + } else if (name.equals("value")) { + this.getValue().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 116103: return addUse(); + case 111972721: return addValue(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 116103: /*use*/ return new String[] {"CodeableConcept"}; + case 111972721: /*value*/ return new String[] {"CodeableReference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("use")) { + return addUse(); + } + else if (name.equals("value")) { + return addValue(); + } + else + return super.addChild(name); + } + + public ReasonComponent copy() { + ReasonComponent dst = new ReasonComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(ReasonComponent dst) { + super.copyValues(dst); + if (use != null) { + dst.use = new ArrayList(); + for (CodeableConcept i : use) + dst.use.add(i.copy()); + }; + if (value != null) { + dst.value = new ArrayList(); + for (CodeableReference i : value) + dst.value.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof ReasonComponent)) + return false; + ReasonComponent o = (ReasonComponent) other_; + return 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 ReasonComponent)) + return false; + ReasonComponent o = (ReasonComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, value); + } + + public String fhirType() { + return "Encounter.reason"; + + } + + } + + @Block() + public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis. + */ + @Child(name = "condition", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The diagnosis relevant to the encounter", formalDefinition="The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code") + protected List condition; + + /** + * Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …). + */ + @Child(name = "use", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)", formalDefinition="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diagnosis-use") + protected List use; + + private static final long serialVersionUID = 1029565663L; + + /** + * Constructor + */ + public DiagnosisComponent() { + super(); + } + + /** + * @return {@link #condition} (The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public DiagnosisComponent setCondition(List theCondition) { + this.condition = theCondition; + return this; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (CodeableReference item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addCondition() { //3 + CodeableReference t = new CodeableReference(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + public DiagnosisComponent addCondition(CodeableReference t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist {3} + */ + public CodeableReference getConditionFirstRep() { + if (getCondition().isEmpty()) { + addCondition(); + } + return getCondition().get(0); + } + + /** + * @return {@link #use} (Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).) + */ + public List getUse() { + if (this.use == null) + this.use = new ArrayList(); + return this.use; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public DiagnosisComponent setUse(List theUse) { + this.use = theUse; + return this; + } + + public boolean hasUse() { + if (this.use == null) + return false; + for (CodeableConcept item : this.use) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addUse() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.use == null) + this.use = new ArrayList(); + this.use.add(t); + return t; + } + + public DiagnosisComponent addUse(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.use == null) + this.use = new ArrayList(); + this.use.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #use}, creating it if it does not already exist {3} + */ + public CodeableConcept getUseFirstRep() { + if (getUse().isEmpty()) { + addUse(); + } + return getUse().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("condition", "CodeableReference(Condition)", "The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.", 0, java.lang.Integer.MAX_VALUE, condition)); + children.add(new Property("use", "CodeableConcept", "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, use)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -861311717: /*condition*/ return new Property("condition", "CodeableReference(Condition)", "The coded diagnosis or a reference to a Condition (with other resources referenced in the evidence.detail), the use property will indicate the purpose of this specific diagnosis.", 0, java.lang.Integer.MAX_VALUE, condition); + case 116103: /*use*/ return new Property("use", "CodeableConcept", "Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).", 0, java.lang.Integer.MAX_VALUE, use); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // CodeableReference + case 116103: /*use*/ return this.use == null ? new Base[0] : this.use.toArray(new Base[this.use.size()]); // CodeableConcept + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -861311717: // condition + this.getCondition().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case 116103: // use + this.getUse().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("condition")) { + this.getCondition().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("use")) { + this.getUse().add(TypeConvertor.castToCodeableConcept(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("condition")) { + this.getCondition().remove(value); + } else if (name.equals("use")) { + this.getUse().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -861311717: return addCondition(); + case 116103: return addUse(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -861311717: /*condition*/ return new String[] {"CodeableReference"}; + case 116103: /*use*/ return new String[] {"CodeableConcept"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("condition")) { + return addCondition(); + } + else if (name.equals("use")) { + return addUse(); + } + else + return super.addChild(name); + } + + public DiagnosisComponent copy() { + DiagnosisComponent dst = new DiagnosisComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(DiagnosisComponent dst) { + super.copyValues(dst); + if (condition != null) { + dst.condition = new ArrayList(); + for (CodeableReference i : condition) + dst.condition.add(i.copy()); + }; + if (use != null) { + dst.use = new ArrayList(); + for (CodeableConcept i : use) + dst.use.add(i.copy()); + }; + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof DiagnosisComponent)) + return false; + DiagnosisComponent o = (DiagnosisComponent) other_; + return compareDeep(condition, o.condition, true) && compareDeep(use, o.use, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof DiagnosisComponent)) + return false; + DiagnosisComponent o = (DiagnosisComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(condition, use); + } + + public String fhirType() { + return "Encounter.diagnosis"; + + } + + } + + @Block() + public static class EncounterAdmissionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Pre-admission identifier. + */ + @Child(name = "preAdmissionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Pre-admission identifier", formalDefinition="Pre-admission identifier." ) + protected Identifier preAdmissionIdentifier; + + /** + * The location/organization from which the patient came before admission. + */ + @Child(name = "origin", type = {Location.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The location/organization from which the patient came before admission", formalDefinition="The location/organization from which the patient came before admission." ) + protected Reference origin; + + /** + * From where patient was admitted (physician referral, transfer). + */ + @Child(name = "admitSource", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="From where patient was admitted (physician referral, transfer)", formalDefinition="From where patient was admitted (physician referral, transfer)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-admit-source") + protected CodeableConcept admitSource; + + /** + * Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed. + */ + @Child(name = "reAdmission", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates that the patient is being re-admitted", formalDefinition="Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0092") + protected CodeableConcept reAdmission; + + /** + * Location/organization to which the patient is discharged. + */ + @Child(name = "destination", type = {Location.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Location/organization to which the patient is discharged", formalDefinition="Location/organization to which the patient is discharged." ) + protected Reference destination; + + /** + * Category or kind of location after discharge. + */ + @Child(name = "dischargeDisposition", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Category or kind of location after discharge", formalDefinition="Category or kind of location after discharge." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition") + protected CodeableConcept dischargeDisposition; + + private static final long serialVersionUID = -1702856594L; + + /** + * Constructor + */ + public EncounterAdmissionComponent() { + super(); + } + + /** + * @return {@link #preAdmissionIdentifier} (Pre-admission identifier.) + */ + public Identifier getPreAdmissionIdentifier() { + if (this.preAdmissionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.preAdmissionIdentifier"); + else if (Configuration.doAutoCreate()) + this.preAdmissionIdentifier = new Identifier(); // cc + return this.preAdmissionIdentifier; + } + + public boolean hasPreAdmissionIdentifier() { + return this.preAdmissionIdentifier != null && !this.preAdmissionIdentifier.isEmpty(); + } + + /** + * @param value {@link #preAdmissionIdentifier} (Pre-admission identifier.) + */ + public EncounterAdmissionComponent setPreAdmissionIdentifier(Identifier value) { + this.preAdmissionIdentifier = value; + return this; + } + + /** + * @return {@link #origin} (The location/organization from which the patient came before admission.) + */ + public Reference getOrigin() { + if (this.origin == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.origin"); + else if (Configuration.doAutoCreate()) + this.origin = new Reference(); // cc + return this.origin; + } + + public boolean hasOrigin() { + return this.origin != null && !this.origin.isEmpty(); + } + + /** + * @param value {@link #origin} (The location/organization from which the patient came before admission.) + */ + public EncounterAdmissionComponent setOrigin(Reference value) { + this.origin = value; + return this; + } + + /** + * @return {@link #admitSource} (From where patient was admitted (physician referral, transfer).) + */ + public CodeableConcept getAdmitSource() { + if (this.admitSource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.admitSource"); + else if (Configuration.doAutoCreate()) + this.admitSource = new CodeableConcept(); // cc + return this.admitSource; + } + + public boolean hasAdmitSource() { + return this.admitSource != null && !this.admitSource.isEmpty(); + } + + /** + * @param value {@link #admitSource} (From where patient was admitted (physician referral, transfer).) + */ + public EncounterAdmissionComponent setAdmitSource(CodeableConcept value) { + this.admitSource = value; + return this; + } + + /** + * @return {@link #reAdmission} (Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.) + */ + public CodeableConcept getReAdmission() { + if (this.reAdmission == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.reAdmission"); + else if (Configuration.doAutoCreate()) + this.reAdmission = new CodeableConcept(); // cc + return this.reAdmission; + } + + public boolean hasReAdmission() { + return this.reAdmission != null && !this.reAdmission.isEmpty(); + } + + /** + * @param value {@link #reAdmission} (Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.) + */ + public EncounterAdmissionComponent setReAdmission(CodeableConcept value) { + this.reAdmission = value; + return this; + } + + /** + * @return {@link #destination} (Location/organization to which the patient is discharged.) + */ + public Reference getDestination() { + if (this.destination == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.destination"); + else if (Configuration.doAutoCreate()) + this.destination = new Reference(); // cc + return this.destination; + } + + public boolean hasDestination() { + return this.destination != null && !this.destination.isEmpty(); + } + + /** + * @param value {@link #destination} (Location/organization to which the patient is discharged.) + */ + public EncounterAdmissionComponent setDestination(Reference value) { + this.destination = value; + return this; + } + + /** + * @return {@link #dischargeDisposition} (Category or kind of location after discharge.) + */ + public CodeableConcept getDischargeDisposition() { + if (this.dischargeDisposition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterAdmissionComponent.dischargeDisposition"); + else if (Configuration.doAutoCreate()) + this.dischargeDisposition = new CodeableConcept(); // cc + return this.dischargeDisposition; + } + + public boolean hasDischargeDisposition() { + return this.dischargeDisposition != null && !this.dischargeDisposition.isEmpty(); + } + + /** + * @param value {@link #dischargeDisposition} (Category or kind of location after discharge.) + */ + public EncounterAdmissionComponent setDischargeDisposition(CodeableConcept value) { + this.dischargeDisposition = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("preAdmissionIdentifier", "Identifier", "Pre-admission identifier.", 0, 1, preAdmissionIdentifier)); + children.add(new Property("origin", "Reference(Location|Organization)", "The location/organization from which the patient came before admission.", 0, 1, origin)); + children.add(new Property("admitSource", "CodeableConcept", "From where patient was admitted (physician referral, transfer).", 0, 1, admitSource)); + children.add(new Property("reAdmission", "CodeableConcept", "Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.", 0, 1, reAdmission)); + children.add(new Property("destination", "Reference(Location|Organization)", "Location/organization to which the patient is discharged.", 0, 1, destination)); + children.add(new Property("dischargeDisposition", "CodeableConcept", "Category or kind of location after discharge.", 0, 1, dischargeDisposition)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -965394961: /*preAdmissionIdentifier*/ return new Property("preAdmissionIdentifier", "Identifier", "Pre-admission identifier.", 0, 1, preAdmissionIdentifier); + case -1008619738: /*origin*/ return new Property("origin", "Reference(Location|Organization)", "The location/organization from which the patient came before admission.", 0, 1, origin); + case 538887120: /*admitSource*/ return new Property("admitSource", "CodeableConcept", "From where patient was admitted (physician referral, transfer).", 0, 1, admitSource); + case 669348630: /*reAdmission*/ return new Property("reAdmission", "CodeableConcept", "Indicates that this encounter is directly related to a prior admission, often because the conditions addressed in the prior admission were not fully addressed.", 0, 1, reAdmission); + case -1429847026: /*destination*/ return new Property("destination", "Reference(Location|Organization)", "Location/organization to which the patient is discharged.", 0, 1, destination); + case 528065941: /*dischargeDisposition*/ return new Property("dischargeDisposition", "CodeableConcept", "Category or kind of location after discharge.", 0, 1, dischargeDisposition); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -965394961: /*preAdmissionIdentifier*/ return this.preAdmissionIdentifier == null ? new Base[0] : new Base[] {this.preAdmissionIdentifier}; // Identifier + case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // Reference + case 538887120: /*admitSource*/ return this.admitSource == null ? new Base[0] : new Base[] {this.admitSource}; // CodeableConcept + case 669348630: /*reAdmission*/ return this.reAdmission == null ? new Base[0] : new Base[] {this.reAdmission}; // CodeableConcept + case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference + case 528065941: /*dischargeDisposition*/ return this.dischargeDisposition == null ? new Base[0] : new Base[] {this.dischargeDisposition}; // CodeableConcept + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -965394961: // preAdmissionIdentifier + this.preAdmissionIdentifier = TypeConvertor.castToIdentifier(value); // Identifier + return value; + case -1008619738: // origin + this.origin = TypeConvertor.castToReference(value); // Reference + return value; + case 538887120: // admitSource + this.admitSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 669348630: // reAdmission + this.reAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1429847026: // destination + this.destination = TypeConvertor.castToReference(value); // Reference + return value; + case 528065941: // dischargeDisposition + this.dischargeDisposition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("preAdmissionIdentifier")) { + this.preAdmissionIdentifier = TypeConvertor.castToIdentifier(value); // Identifier + } else if (name.equals("origin")) { + this.origin = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("admitSource")) { + this.admitSource = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("reAdmission")) { + this.reAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("destination")) { + this.destination = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("dischargeDisposition")) { + this.dischargeDisposition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("preAdmissionIdentifier")) { + this.preAdmissionIdentifier = null; + } else if (name.equals("origin")) { + this.origin = null; + } else if (name.equals("admitSource")) { + this.admitSource = null; + } else if (name.equals("reAdmission")) { + this.reAdmission = null; + } else if (name.equals("destination")) { + this.destination = null; + } else if (name.equals("dischargeDisposition")) { + this.dischargeDisposition = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -965394961: return getPreAdmissionIdentifier(); + case -1008619738: return getOrigin(); + case 538887120: return getAdmitSource(); + case 669348630: return getReAdmission(); + case -1429847026: return getDestination(); + case 528065941: return getDischargeDisposition(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -965394961: /*preAdmissionIdentifier*/ return new String[] {"Identifier"}; + case -1008619738: /*origin*/ return new String[] {"Reference"}; + case 538887120: /*admitSource*/ return new String[] {"CodeableConcept"}; + case 669348630: /*reAdmission*/ return new String[] {"CodeableConcept"}; + case -1429847026: /*destination*/ return new String[] {"Reference"}; + case 528065941: /*dischargeDisposition*/ return new String[] {"CodeableConcept"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("preAdmissionIdentifier")) { + this.preAdmissionIdentifier = new Identifier(); + return this.preAdmissionIdentifier; + } + else if (name.equals("origin")) { + this.origin = new Reference(); + return this.origin; + } + else if (name.equals("admitSource")) { + this.admitSource = new CodeableConcept(); + return this.admitSource; + } + else if (name.equals("reAdmission")) { + this.reAdmission = new CodeableConcept(); + return this.reAdmission; + } + else if (name.equals("destination")) { + this.destination = new Reference(); + return this.destination; + } + else if (name.equals("dischargeDisposition")) { + this.dischargeDisposition = new CodeableConcept(); + return this.dischargeDisposition; + } + else + return super.addChild(name); + } + + public EncounterAdmissionComponent copy() { + EncounterAdmissionComponent dst = new EncounterAdmissionComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(EncounterAdmissionComponent dst) { + super.copyValues(dst); + dst.preAdmissionIdentifier = preAdmissionIdentifier == null ? null : preAdmissionIdentifier.copy(); + dst.origin = origin == null ? null : origin.copy(); + dst.admitSource = admitSource == null ? null : admitSource.copy(); + dst.reAdmission = reAdmission == null ? null : reAdmission.copy(); + dst.destination = destination == null ? null : destination.copy(); + dst.dischargeDisposition = dischargeDisposition == null ? null : dischargeDisposition.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof EncounterAdmissionComponent)) + return false; + EncounterAdmissionComponent o = (EncounterAdmissionComponent) other_; + return compareDeep(preAdmissionIdentifier, o.preAdmissionIdentifier, true) && compareDeep(origin, o.origin, true) + && compareDeep(admitSource, o.admitSource, true) && compareDeep(reAdmission, o.reAdmission, true) + && compareDeep(destination, o.destination, true) && compareDeep(dischargeDisposition, o.dischargeDisposition, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof EncounterAdmissionComponent)) + return false; + EncounterAdmissionComponent o = (EncounterAdmissionComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(preAdmissionIdentifier, origin + , admitSource, reAdmission, destination, dischargeDisposition); + } + + public String fhirType() { + return "Encounter.admission"; + + } + + } + + @Block() + public static class EncounterLocationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The location where the encounter takes place. + */ + @Child(name = "location", type = {Location.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Location the encounter takes place", formalDefinition="The location where the encounter takes place." ) + protected Reference location; + + /** + * The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="planned | active | reserved | completed", formalDefinition="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-location-status") + protected Enumeration status; + + /** + * This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query. + */ + @Child(name = "form", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The physical type of the location (usually the level in the location hierarchy - bed, room, ward, virtual etc.)", formalDefinition="This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-form") + protected CodeableConcept form; + + /** + * Time period during which the patient was present at the location. + */ + @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time period during which the patient was present at the location", formalDefinition="Time period during which the patient was present at the location." ) + protected Period period; + + private static final long serialVersionUID = -1665957440L; + + /** + * Constructor + */ + public EncounterLocationComponent() { + super(); + } + + /** + * Constructor + */ + public EncounterLocationComponent(Reference location) { + super(); + this.setLocation(location); + } + + /** + * @return {@link #location} (The location where the encounter takes place.) + */ + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.location"); + else if (Configuration.doAutoCreate()) + this.location = new Reference(); // cc + return this.location; + } + + public boolean hasLocation() { + return this.location != null && !this.location.isEmpty(); + } + + /** + * @param value {@link #location} (The location where the encounter takes place.) + */ + public EncounterLocationComponent setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #status} (The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.). 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 EncounterLocationComponent.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); // 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 participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public EncounterLocationComponent setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. + */ + public EncounterLocationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time. + */ + public EncounterLocationComponent setStatus(EncounterLocationStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new EncounterLocationStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #form} (This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.) + */ + public CodeableConcept getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.form"); + else if (Configuration.doAutoCreate()) + this.form = new CodeableConcept(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.) + */ + public EncounterLocationComponent setForm(CodeableConcept value) { + this.form = value; + return this; + } + + /** + * @return {@link #period} (Time period during which the patient was present at the location.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create EncounterLocationComponent.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} (Time period during which the patient was present at the location.) + */ + public EncounterLocationComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("location", "Reference(Location)", "The location where the encounter takes place.", 0, 1, location)); + children.add(new Property("status", "code", "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", 0, 1, status)); + children.add(new Property("form", "CodeableConcept", "This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.", 0, 1, form)); + children.add(new Property("period", "Period", "Time period during which the patient was present at the location.", 0, 1, period)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The location where the encounter takes place.", 0, 1, location); + case -892481550: /*status*/ return new Property("status", "code", "The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time.", 0, 1, status); + case 3148996: /*form*/ return new Property("form", "CodeableConcept", "This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query.", 0, 1, form); + case -991726143: /*period*/ return new Property("period", "Period", "Time period during which the patient was present at the location.", 0, 1, period); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept + case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 1901043637: // location + this.location = TypeConvertor.castToReference(value); // Reference + return value; + case -892481550: // status + value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case 3148996: // form + this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -991726143: // period + this.period = TypeConvertor.castToPeriod(value); // Period + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("location")) { + this.location = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("status")) { + value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("form")) { + this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("period")) { + this.period = TypeConvertor.castToPeriod(value); // Period + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("location")) { + this.location = null; + } else if (name.equals("status")) { + value = new EncounterLocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("form")) { + this.form = null; + } else if (name.equals("period")) { + this.period = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1901043637: return getLocation(); + case -892481550: return getStatusElement(); + case 3148996: return getForm(); + case -991726143: return getPeriod(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1901043637: /*location*/ return new String[] {"Reference"}; + case -892481550: /*status*/ return new String[] {"code"}; + case 3148996: /*form*/ return new String[] {"CodeableConcept"}; + case -991726143: /*period*/ return new String[] {"Period"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("location")) { + this.location = new Reference(); + return this.location; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Encounter.location.status"); + } + else if (name.equals("form")) { + this.form = new CodeableConcept(); + return this.form; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public EncounterLocationComponent copy() { + EncounterLocationComponent dst = new EncounterLocationComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(EncounterLocationComponent dst) { + super.copyValues(dst); + dst.location = location == null ? null : location.copy(); + dst.status = status == null ? null : status.copy(); + dst.form = form == null ? null : form.copy(); + dst.period = period == null ? null : period.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof EncounterLocationComponent)) + return false; + EncounterLocationComponent o = (EncounterLocationComponent) other_; + return compareDeep(location, o.location, true) && compareDeep(status, o.status, true) && compareDeep(form, o.form, true) + && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof EncounterLocationComponent)) + return false; + EncounterLocationComponent o = (EncounterLocationComponent) other_; + return compareValues(status, o.status, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(location, status, form, period + ); + } + + public String fhirType() { + return "Encounter.location"; + + } + + } + + /** + * Identifier(s) by which this encounter is known. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Identifier(s) by which this encounter is known", formalDefinition="Identifier(s) by which this encounter is known." ) + protected List identifier; + + /** + * The current state of the encounter (not the state of the patient within the encounter - that is subjectState). + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="planned | in-progress | on-hold | discharged | completed | cancelled | discontinued | entered-in-error | unknown", formalDefinition="The current state of the encounter (not the state of the patient within the encounter - that is subjectState)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-status") + protected Enumeration status; + + /** + * Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations. + */ + @Child(name = "class", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Classification of patient encounter context - e.g. Inpatient, outpatient", formalDefinition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/encounter-class") + protected List class_; + + /** + * Indicates the urgency of the encounter. + */ + @Child(name = "priority", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Indicates the urgency of the encounter", formalDefinition="Indicates the urgency of the encounter." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActPriority") + protected CodeableConcept priority; + + /** + * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation). + */ + @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, ...)", formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-type") + protected List type; + + /** + * Broad categorization of the service that is to be provided (e.g. cardiology). + */ + @Child(name = "serviceType", type = {CodeableReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific type of service", formalDefinition="Broad categorization of the service that is to be provided (e.g. cardiology)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type") + protected List serviceType; + + /** + * The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The patient or group related to this encounter", formalDefinition="The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam." ) + protected Reference subject; + + /** + * The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status. + */ + @Child(name = "subjectStatus", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The current status of the subject in relation to the Encounter", formalDefinition="The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-subject-status") + protected CodeableConcept subjectStatus; + + /** + * Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years). + */ + @Child(name = "episodeOfCare", type = {EpisodeOfCare.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Episode(s) of care that this encounter should be recorded against", formalDefinition="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)." ) + protected List episodeOfCare; + + /** + * The request this encounter satisfies (e.g. incoming referral or procedure request). + */ + @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The request that initiated this encounter", formalDefinition="The request this encounter satisfies (e.g. incoming referral or procedure request)." ) + protected List basedOn; + + /** + * The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter. + */ + @Child(name = "careTeam", type = {CareTeam.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The group(s) that are allocated to participate in this encounter", formalDefinition="The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter." ) + protected List careTeam; + + /** + * Another Encounter of which this encounter is a part of (administratively or in time). + */ + @Child(name = "partOf", type = {Encounter.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Another Encounter this encounter is part of", formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." ) + protected Reference partOf; + + /** + * The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab. + */ + @Child(name = "serviceProvider", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The organization (facility) responsible for this encounter", formalDefinition="The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab." ) + protected Reference serviceProvider; + + /** + * The list of people responsible for providing the service. + */ + @Child(name = "participant", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="List of participants involved in the encounter", formalDefinition="The list of people responsible for providing the service." ) + protected List participant; + + /** + * The appointment that scheduled this encounter. + */ + @Child(name = "appointment", type = {Appointment.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The appointment that scheduled this encounter", formalDefinition="The appointment that scheduled this encounter." ) + protected List appointment; + + /** + * Connection details of a virtual service (e.g. conference call). + */ + @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. conference call)." ) + protected List virtualService; + + /** + * The actual start and end time of the encounter. + */ + @Child(name = "actualPeriod", type = {Period.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The actual start and end time of the encounter", formalDefinition="The actual start and end time of the encounter." ) + protected Period actualPeriod; + + /** + * The planned start date/time (or admission date) of the encounter. + */ + @Child(name = "plannedStartDate", type = {DateTimeType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The planned start date/time (or admission date) of the encounter", formalDefinition="The planned start date/time (or admission date) of the encounter." ) + protected DateTimeType plannedStartDate; + + /** + * The planned end date/time (or discharge date) of the encounter. + */ + @Child(name = "plannedEndDate", type = {DateTimeType.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The planned end date/time (or discharge date) of the encounter", formalDefinition="The planned end date/time (or discharge date) of the encounter." ) + protected DateTimeType plannedEndDate; + + /** + * Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. + +When missing it is the time in between the start and end values. + */ + @Child(name = "length", type = {Duration.class}, order=19, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Actual quantity of time the encounter lasted (less time absent)", formalDefinition="Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values." ) + protected Duration length; + + /** + * The list of medical reasons that are expected to be addressed during the episode of care. + */ + @Child(name = "reason", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The list of medical reasons that are expected to be addressed during the episode of care", formalDefinition="The list of medical reasons that are expected to be addressed during the episode of care." ) + protected List reason; + + /** + * The list of diagnosis relevant to this encounter. + */ + @Child(name = "diagnosis", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The list of diagnosis relevant to this encounter", formalDefinition="The list of diagnosis relevant to this encounter." ) + protected List diagnosis; + + /** + * The set of accounts that may be used for billing for this Encounter. + */ + @Child(name = "account", type = {Account.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The set of accounts that may be used for billing for this Encounter", formalDefinition="The set of accounts that may be used for billing for this Encounter." ) + protected List account; + + /** + * Diet preferences reported by the patient. + */ + @Child(name = "dietPreference", type = {CodeableConcept.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Diet preferences reported by the patient", formalDefinition="Diet preferences reported by the patient." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diet") + protected List dietPreference; + + /** + * Any special requests that have been made for this encounter, such as the provision of specific equipment or other things. + */ + @Child(name = "specialArrangement", type = {CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Wheelchair, translator, stretcher, etc", formalDefinition="Any special requests that have been made for this encounter, such as the provision of specific equipment or other things." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-special-arrangements") + protected List specialArrangement; + + /** + * Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy). + */ + @Child(name = "specialCourtesy", type = {CodeableConcept.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Special courtesies (VIP, board member)", formalDefinition="Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-special-courtesy") + protected List specialCourtesy; + + /** + * Details about the stay during which a healthcare service is provided. + +This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge. + */ + @Child(name = "admission", type = {}, order=26, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details about the admission to a healthcare service", formalDefinition="Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge." ) + protected EncounterAdmissionComponent admission; + + /** + * List of locations where the patient has been during this encounter. + */ + @Child(name = "location", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="List of locations where the patient has been", formalDefinition="List of locations where the patient has been during this encounter." ) + protected List location; + + private static final long serialVersionUID = -1336316477L; + + /** + * Constructor + */ + public Encounter() { + super(); + } + + /** + * Constructor + */ + public Encounter(EncounterStatus status) { + super(); + this.setStatus(status); + } + + /** + * @return {@link #identifier} (Identifier(s) by which this encounter is known.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public Encounter addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #status} (The current state of the encounter (not the state of the patient within the encounter - that is subjectState).). 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 Encounter.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new EncounterStatusEnumFactory()); // 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 state of the encounter (not the state of the patient within the encounter - that is subjectState).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Encounter setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The current state of the encounter (not the state of the patient within the encounter - that is subjectState). + */ + public EncounterStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The current state of the encounter (not the state of the patient within the encounter - that is subjectState). + */ + public Encounter setStatus(EncounterStatus value) { + if (this.status == null) + this.status = new Enumeration(new EncounterStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #class_} (Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.) + */ + public List getClass_() { + if (this.class_ == null) + this.class_ = new ArrayList(); + return this.class_; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setClass_(List theClass_) { + this.class_ = theClass_; + return this; + } + + public boolean hasClass_() { + if (this.class_ == null) + return false; + for (CodeableConcept item : this.class_) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addClass_() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.class_ == null) + this.class_ = new ArrayList(); + this.class_.add(t); + return t; + } + + public Encounter addClass_(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.class_ == null) + this.class_ = new ArrayList(); + this.class_.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} + */ + public CodeableConcept getClass_FirstRep() { + if (getClass_().isEmpty()) { + addClass_(); + } + return getClass_().get(0); + } + + /** + * @return {@link #priority} (Indicates the urgency of the encounter.) + */ + public CodeableConcept getPriority() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new CodeableConcept(); // cc + return this.priority; + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (Indicates the urgency of the encounter.) + */ + public Encounter setPriority(CodeableConcept value) { + this.priority = value; + return this; + } + + /** + * @return {@link #type} (Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public Encounter addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #serviceType} (Broad categorization of the service that is to be provided (e.g. cardiology).) + */ + public List getServiceType() { + if (this.serviceType == null) + this.serviceType = new ArrayList(); + return this.serviceType; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setServiceType(List theServiceType) { + this.serviceType = theServiceType; + return this; + } + + public boolean hasServiceType() { + if (this.serviceType == null) + return false; + for (CodeableReference item : this.serviceType) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addServiceType() { //3 + CodeableReference t = new CodeableReference(); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return t; + } + + public Encounter addServiceType(CodeableReference t) { //3 + if (t == null) + return this; + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist {3} + */ + public CodeableReference getServiceTypeFirstRep() { + if (getServiceType().isEmpty()) { + addServiceType(); + } + return getServiceType().get(0); + } + + /** + * @return {@link #subject} (The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.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 patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.) + */ + public Encounter setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subjectStatus} (The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.) + */ + public CodeableConcept getSubjectStatus() { + if (this.subjectStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.subjectStatus"); + else if (Configuration.doAutoCreate()) + this.subjectStatus = new CodeableConcept(); // cc + return this.subjectStatus; + } + + public boolean hasSubjectStatus() { + return this.subjectStatus != null && !this.subjectStatus.isEmpty(); + } + + /** + * @param value {@link #subjectStatus} (The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.) + */ + public Encounter setSubjectStatus(CodeableConcept value) { + this.subjectStatus = value; + return this; + } + + /** + * @return {@link #episodeOfCare} (Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).) + */ + public List getEpisodeOfCare() { + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + return this.episodeOfCare; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setEpisodeOfCare(List theEpisodeOfCare) { + this.episodeOfCare = theEpisodeOfCare; + return this; + } + + public boolean hasEpisodeOfCare() { + if (this.episodeOfCare == null) + return false; + for (Reference item : this.episodeOfCare) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addEpisodeOfCare() { //3 + Reference t = new Reference(); + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + this.episodeOfCare.add(t); + return t; + } + + public Encounter addEpisodeOfCare(Reference t) { //3 + if (t == null) + return this; + if (this.episodeOfCare == null) + this.episodeOfCare = new ArrayList(); + this.episodeOfCare.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #episodeOfCare}, creating it if it does not already exist {3} + */ + public Reference getEpisodeOfCareFirstRep() { + if (getEpisodeOfCare().isEmpty()) { + addEpisodeOfCare(); + } + return getEpisodeOfCare().get(0); + } + + /** + * @return {@link #basedOn} (The request this encounter satisfies (e.g. incoming referral or procedure request).) + */ + public List getBasedOn() { + if (this.basedOn == null) + this.basedOn = new ArrayList(); + return this.basedOn; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setBasedOn(List theBasedOn) { + this.basedOn = theBasedOn; + return this; + } + + public boolean hasBasedOn() { + if (this.basedOn == null) + return false; + for (Reference item : this.basedOn) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addBasedOn() { //3 + Reference t = new Reference(); + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return t; + } + + public Encounter addBasedOn(Reference t) { //3 + if (t == null) + return this; + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} + */ + public Reference getBasedOnFirstRep() { + if (getBasedOn().isEmpty()) { + addBasedOn(); + } + return getBasedOn().get(0); + } + + /** + * @return {@link #careTeam} (The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.) + */ + public List getCareTeam() { + if (this.careTeam == null) + this.careTeam = new ArrayList(); + return this.careTeam; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setCareTeam(List theCareTeam) { + this.careTeam = theCareTeam; + return this; + } + + public boolean hasCareTeam() { + if (this.careTeam == null) + return false; + for (Reference item : this.careTeam) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addCareTeam() { //3 + Reference t = new Reference(); + if (this.careTeam == null) + this.careTeam = new ArrayList(); + this.careTeam.add(t); + return t; + } + + public Encounter addCareTeam(Reference t) { //3 + if (t == null) + return this; + if (this.careTeam == null) + this.careTeam = new ArrayList(); + this.careTeam.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3} + */ + public Reference getCareTeamFirstRep() { + if (getCareTeam().isEmpty()) { + addCareTeam(); + } + return getCareTeam().get(0); + } + + /** + * @return {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Reference getPartOf() { + if (this.partOf == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.partOf"); + else if (Configuration.doAutoCreate()) + this.partOf = new Reference(); // cc + return this.partOf; + } + + public boolean hasPartOf() { + return this.partOf != null && !this.partOf.isEmpty(); + } + + /** + * @param value {@link #partOf} (Another Encounter of which this encounter is a part of (administratively or in time).) + */ + public Encounter setPartOf(Reference value) { + this.partOf = value; + return this; + } + + /** + * @return {@link #serviceProvider} (The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.) + */ + public Reference getServiceProvider() { + if (this.serviceProvider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.serviceProvider"); + else if (Configuration.doAutoCreate()) + this.serviceProvider = new Reference(); // cc + return this.serviceProvider; + } + + public boolean hasServiceProvider() { + return this.serviceProvider != null && !this.serviceProvider.isEmpty(); + } + + /** + * @param value {@link #serviceProvider} (The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.) + */ + public Encounter setServiceProvider(Reference value) { + this.serviceProvider = value; + return this; + } + + /** + * @return {@link #participant} (The list of people responsible for providing the service.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setParticipant(List theParticipant) { + this.participant = theParticipant; + return this; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (EncounterParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + public EncounterParticipantComponent addParticipant() { //3 + EncounterParticipantComponent t = new EncounterParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + public Encounter addParticipant(EncounterParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3} + */ + public EncounterParticipantComponent getParticipantFirstRep() { + if (getParticipant().isEmpty()) { + addParticipant(); + } + return getParticipant().get(0); + } + + /** + * @return {@link #appointment} (The appointment that scheduled this encounter.) + */ + public List getAppointment() { + if (this.appointment == null) + this.appointment = new ArrayList(); + return this.appointment; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setAppointment(List theAppointment) { + this.appointment = theAppointment; + return this; + } + + public boolean hasAppointment() { + if (this.appointment == null) + return false; + for (Reference item : this.appointment) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addAppointment() { //3 + Reference t = new Reference(); + if (this.appointment == null) + this.appointment = new ArrayList(); + this.appointment.add(t); + return t; + } + + public Encounter addAppointment(Reference t) { //3 + if (t == null) + return this; + if (this.appointment == null) + this.appointment = new ArrayList(); + this.appointment.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #appointment}, creating it if it does not already exist {3} + */ + public Reference getAppointmentFirstRep() { + if (getAppointment().isEmpty()) { + addAppointment(); + } + return getAppointment().get(0); + } + + /** + * @return {@link #virtualService} (Connection details of a virtual service (e.g. conference call).) + */ + public List getVirtualService() { + if (this.virtualService == null) + this.virtualService = new ArrayList(); + return this.virtualService; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setVirtualService(List theVirtualService) { + this.virtualService = theVirtualService; + return this; + } + + public boolean hasVirtualService() { + if (this.virtualService == null) + return false; + for (VirtualServiceDetail item : this.virtualService) + if (!item.isEmpty()) + return true; + return false; + } + + public VirtualServiceDetail addVirtualService() { //3 + VirtualServiceDetail t = new VirtualServiceDetail(); + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return t; + } + + public Encounter addVirtualService(VirtualServiceDetail t) { //3 + if (t == null) + return this; + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} + */ + public VirtualServiceDetail getVirtualServiceFirstRep() { + if (getVirtualService().isEmpty()) { + addVirtualService(); + } + return getVirtualService().get(0); + } + + /** + * @return {@link #actualPeriod} (The actual start and end time of the encounter.) + */ + public Period getActualPeriod() { + if (this.actualPeriod == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.actualPeriod"); + else if (Configuration.doAutoCreate()) + this.actualPeriod = new Period(); // cc + return this.actualPeriod; + } + + public boolean hasActualPeriod() { + return this.actualPeriod != null && !this.actualPeriod.isEmpty(); + } + + /** + * @param value {@link #actualPeriod} (The actual start and end time of the encounter.) + */ + public Encounter setActualPeriod(Period value) { + this.actualPeriod = value; + return this; + } + + /** + * @return {@link #plannedStartDate} (The planned start date/time (or admission date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedStartDate" gives direct access to the value + */ + public DateTimeType getPlannedStartDateElement() { + if (this.plannedStartDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.plannedStartDate"); + else if (Configuration.doAutoCreate()) + this.plannedStartDate = new DateTimeType(); // bb + return this.plannedStartDate; + } + + public boolean hasPlannedStartDateElement() { + return this.plannedStartDate != null && !this.plannedStartDate.isEmpty(); + } + + public boolean hasPlannedStartDate() { + return this.plannedStartDate != null && !this.plannedStartDate.isEmpty(); + } + + /** + * @param value {@link #plannedStartDate} (The planned start date/time (or admission date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedStartDate" gives direct access to the value + */ + public Encounter setPlannedStartDateElement(DateTimeType value) { + this.plannedStartDate = value; + return this; + } + + /** + * @return The planned start date/time (or admission date) of the encounter. + */ + public Date getPlannedStartDate() { + return this.plannedStartDate == null ? null : this.plannedStartDate.getValue(); + } + + /** + * @param value The planned start date/time (or admission date) of the encounter. + */ + public Encounter setPlannedStartDate(Date value) { + if (value == null) + this.plannedStartDate = null; + else { + if (this.plannedStartDate == null) + this.plannedStartDate = new DateTimeType(); + this.plannedStartDate.setValue(value); + } + return this; + } + + /** + * @return {@link #plannedEndDate} (The planned end date/time (or discharge date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedEndDate" gives direct access to the value + */ + public DateTimeType getPlannedEndDateElement() { + if (this.plannedEndDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.plannedEndDate"); + else if (Configuration.doAutoCreate()) + this.plannedEndDate = new DateTimeType(); // bb + return this.plannedEndDate; + } + + public boolean hasPlannedEndDateElement() { + return this.plannedEndDate != null && !this.plannedEndDate.isEmpty(); + } + + public boolean hasPlannedEndDate() { + return this.plannedEndDate != null && !this.plannedEndDate.isEmpty(); + } + + /** + * @param value {@link #plannedEndDate} (The planned end date/time (or discharge date) of the encounter.). This is the underlying object with id, value and extensions. The accessor "getPlannedEndDate" gives direct access to the value + */ + public Encounter setPlannedEndDateElement(DateTimeType value) { + this.plannedEndDate = value; + return this; + } + + /** + * @return The planned end date/time (or discharge date) of the encounter. + */ + public Date getPlannedEndDate() { + return this.plannedEndDate == null ? null : this.plannedEndDate.getValue(); + } + + /** + * @param value The planned end date/time (or discharge date) of the encounter. + */ + public Encounter setPlannedEndDate(Date value) { + if (value == null) + this.plannedEndDate = null; + else { + if (this.plannedEndDate == null) + this.plannedEndDate = new DateTimeType(); + this.plannedEndDate.setValue(value); + } + return this; + } + + /** + * @return {@link #length} (Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. + +When missing it is the time in between the start and end values.) + */ + public Duration getLength() { + if (this.length == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.length"); + else if (Configuration.doAutoCreate()) + this.length = new Duration(); // cc + return this.length; + } + + public boolean hasLength() { + return this.length != null && !this.length.isEmpty(); + } + + /** + * @param value {@link #length} (Actual quantity of time the encounter lasted. This excludes the time during leaves of absence. + +When missing it is the time in between the start and end values.) + */ + public Encounter setLength(Duration value) { + this.length = value; + return this; + } + + /** + * @return {@link #reason} (The list of medical reasons that are expected to be addressed during the episode of care.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setReason(List theReason) { + this.reason = theReason; + return this; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (ReasonComponent item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + public ReasonComponent addReason() { //3 + ReasonComponent t = new ReasonComponent(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + public Encounter addReason(ReasonComponent t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} + */ + public ReasonComponent getReasonFirstRep() { + if (getReason().isEmpty()) { + addReason(); + } + return getReason().get(0); + } + + /** + * @return {@link #diagnosis} (The list of diagnosis relevant to this encounter.) + */ + public List getDiagnosis() { + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + return this.diagnosis; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setDiagnosis(List theDiagnosis) { + this.diagnosis = theDiagnosis; + return this; + } + + public boolean hasDiagnosis() { + if (this.diagnosis == null) + return false; + for (DiagnosisComponent item : this.diagnosis) + if (!item.isEmpty()) + return true; + return false; + } + + public DiagnosisComponent addDiagnosis() { //3 + DiagnosisComponent t = new DiagnosisComponent(); + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return t; + } + + public Encounter addDiagnosis(DiagnosisComponent t) { //3 + if (t == null) + return this; + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3} + */ + public DiagnosisComponent getDiagnosisFirstRep() { + if (getDiagnosis().isEmpty()) { + addDiagnosis(); + } + return getDiagnosis().get(0); + } + + /** + * @return {@link #account} (The set of accounts that may be used for billing for this Encounter.) + */ + public List getAccount() { + if (this.account == null) + this.account = new ArrayList(); + return this.account; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setAccount(List theAccount) { + this.account = theAccount; + return this; + } + + public boolean hasAccount() { + if (this.account == null) + return false; + for (Reference item : this.account) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addAccount() { //3 + Reference t = new Reference(); + if (this.account == null) + this.account = new ArrayList(); + this.account.add(t); + return t; + } + + public Encounter addAccount(Reference t) { //3 + if (t == null) + return this; + if (this.account == null) + this.account = new ArrayList(); + this.account.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3} + */ + public Reference getAccountFirstRep() { + if (getAccount().isEmpty()) { + addAccount(); + } + return getAccount().get(0); + } + + /** + * @return {@link #dietPreference} (Diet preferences reported by the patient.) + */ + public List getDietPreference() { + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + return this.dietPreference; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setDietPreference(List theDietPreference) { + this.dietPreference = theDietPreference; + return this; + } + + public boolean hasDietPreference() { + if (this.dietPreference == null) + return false; + for (CodeableConcept item : this.dietPreference) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addDietPreference() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + this.dietPreference.add(t); + return t; + } + + public Encounter addDietPreference(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.dietPreference == null) + this.dietPreference = new ArrayList(); + this.dietPreference.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #dietPreference}, creating it if it does not already exist {3} + */ + public CodeableConcept getDietPreferenceFirstRep() { + if (getDietPreference().isEmpty()) { + addDietPreference(); + } + return getDietPreference().get(0); + } + + /** + * @return {@link #specialArrangement} (Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.) + */ + public List getSpecialArrangement() { + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + return this.specialArrangement; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setSpecialArrangement(List theSpecialArrangement) { + this.specialArrangement = theSpecialArrangement; + return this; + } + + public boolean hasSpecialArrangement() { + if (this.specialArrangement == null) + return false; + for (CodeableConcept item : this.specialArrangement) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addSpecialArrangement() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + this.specialArrangement.add(t); + return t; + } + + public Encounter addSpecialArrangement(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialArrangement == null) + this.specialArrangement = new ArrayList(); + this.specialArrangement.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #specialArrangement}, creating it if it does not already exist {3} + */ + public CodeableConcept getSpecialArrangementFirstRep() { + if (getSpecialArrangement().isEmpty()) { + addSpecialArrangement(); + } + return getSpecialArrangement().get(0); + } + + /** + * @return {@link #specialCourtesy} (Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).) + */ + public List getSpecialCourtesy() { + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + return this.specialCourtesy; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setSpecialCourtesy(List theSpecialCourtesy) { + this.specialCourtesy = theSpecialCourtesy; + return this; + } + + public boolean hasSpecialCourtesy() { + if (this.specialCourtesy == null) + return false; + for (CodeableConcept item : this.specialCourtesy) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addSpecialCourtesy() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + this.specialCourtesy.add(t); + return t; + } + + public Encounter addSpecialCourtesy(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialCourtesy == null) + this.specialCourtesy = new ArrayList(); + this.specialCourtesy.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #specialCourtesy}, creating it if it does not already exist {3} + */ + public CodeableConcept getSpecialCourtesyFirstRep() { + if (getSpecialCourtesy().isEmpty()) { + addSpecialCourtesy(); + } + return getSpecialCourtesy().get(0); + } + + /** + * @return {@link #admission} (Details about the stay during which a healthcare service is provided. + +This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.) + */ + public EncounterAdmissionComponent getAdmission() { + if (this.admission == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Encounter.admission"); + else if (Configuration.doAutoCreate()) + this.admission = new EncounterAdmissionComponent(); // cc + return this.admission; + } + + public boolean hasAdmission() { + return this.admission != null && !this.admission.isEmpty(); + } + + /** + * @param value {@link #admission} (Details about the stay during which a healthcare service is provided. + +This does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.) + */ + public Encounter setAdmission(EncounterAdmissionComponent value) { + this.admission = value; + return this; + } + + /** + * @return {@link #location} (List of locations where the patient has been during this encounter.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Encounter setLocation(List theLocation) { + this.location = theLocation; + return this; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (EncounterLocationComponent item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + public EncounterLocationComponent addLocation() { //3 + EncounterLocationComponent t = new EncounterLocationComponent(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + public Encounter addLocation(EncounterLocationComponent t) { //3 + if (t == null) + return this; + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3} + */ + public EncounterLocationComponent getLocationFirstRep() { + if (getLocation().isEmpty()) { + addLocation(); + } + return getLocation().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("identifier", "Identifier", "Identifier(s) by which this encounter is known.", 0, java.lang.Integer.MAX_VALUE, identifier)); + children.add(new Property("status", "code", "The current state of the encounter (not the state of the patient within the encounter - that is subjectState).", 0, 1, status)); + children.add(new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_)); + children.add(new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, 1, priority)); + children.add(new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("serviceType", "CodeableReference(HealthcareService)", "Broad categorization of the service that is to be provided (e.g. cardiology).", 0, java.lang.Integer.MAX_VALUE, serviceType)); + children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.", 0, 1, subject)); + children.add(new Property("subjectStatus", "CodeableConcept", "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.", 0, 1, subjectStatus)); + children.add(new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare)); + children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this encounter satisfies (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn)); + children.add(new Property("careTeam", "Reference(CareTeam)", "The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.", 0, java.lang.Integer.MAX_VALUE, careTeam)); + children.add(new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, 1, partOf)); + children.add(new Property("serviceProvider", "Reference(Organization)", "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.", 0, 1, serviceProvider)); + children.add(new Property("participant", "", "The list of people responsible for providing the service.", 0, java.lang.Integer.MAX_VALUE, participant)); + children.add(new Property("appointment", "Reference(Appointment)", "The appointment that scheduled this encounter.", 0, java.lang.Integer.MAX_VALUE, appointment)); + children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService)); + children.add(new Property("actualPeriod", "Period", "The actual start and end time of the encounter.", 0, 1, actualPeriod)); + children.add(new Property("plannedStartDate", "dateTime", "The planned start date/time (or admission date) of the encounter.", 0, 1, plannedStartDate)); + children.add(new Property("plannedEndDate", "dateTime", "The planned end date/time (or discharge date) of the encounter.", 0, 1, plannedEndDate)); + children.add(new Property("length", "Duration", "Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.", 0, 1, length)); + children.add(new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason)); + children.add(new Property("diagnosis", "", "The list of diagnosis relevant to this encounter.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + children.add(new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this Encounter.", 0, java.lang.Integer.MAX_VALUE, account)); + children.add(new Property("dietPreference", "CodeableConcept", "Diet preferences reported by the patient.", 0, java.lang.Integer.MAX_VALUE, dietPreference)); + children.add(new Property("specialArrangement", "CodeableConcept", "Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.", 0, java.lang.Integer.MAX_VALUE, specialArrangement)); + children.add(new Property("specialCourtesy", "CodeableConcept", "Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).", 0, java.lang.Integer.MAX_VALUE, specialCourtesy)); + children.add(new Property("admission", "", "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.", 0, 1, admission)); + children.add(new Property("location", "", "List of locations where the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier(s) by which this encounter is known.", 0, java.lang.Integer.MAX_VALUE, identifier); + case -892481550: /*status*/ return new Property("status", "code", "The current state of the encounter (not the state of the patient within the encounter - that is subjectState).", 0, 1, status); + case 94742904: /*class*/ return new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_); + case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "Indicates the urgency of the encounter.", 0, 1, priority); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation).", 0, java.lang.Integer.MAX_VALUE, type); + case -1928370289: /*serviceType*/ return new Property("serviceType", "CodeableReference(HealthcareService)", "Broad categorization of the service that is to be provided (e.g. cardiology).", 0, java.lang.Integer.MAX_VALUE, serviceType); + case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group related to this encounter. In some use-cases the patient MAY not be present, such as a case meeting about a patient between several practitioners or a careteam.", 0, 1, subject); + case 110854206: /*subjectStatus*/ return new Property("subjectStatus", "CodeableConcept", "The subjectStatus value can be used to track the patient's status within the encounter. It details whether the patient has arrived or departed, has been triaged or is currently in a waiting status.", 0, 1, subjectStatus); + case -1892140189: /*episodeOfCare*/ return new Property("episodeOfCare", "Reference(EpisodeOfCare)", "Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem. The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years).", 0, java.lang.Integer.MAX_VALUE, episodeOfCare); + case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this encounter satisfies (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn); + case -7323378: /*careTeam*/ return new Property("careTeam", "Reference(CareTeam)", "The group(s) of individuals, organizations that are allocated to participate in this encounter. The participants backbone will record the actuals of when these individuals participated during the encounter.", 0, java.lang.Integer.MAX_VALUE, careTeam); + case -995410646: /*partOf*/ return new Property("partOf", "Reference(Encounter)", "Another Encounter of which this encounter is a part of (administratively or in time).", 0, 1, partOf); + case 243182534: /*serviceProvider*/ return new Property("serviceProvider", "Reference(Organization)", "The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation. Refer to the colonoscopy example on the Encounter examples tab.", 0, 1, serviceProvider); + case 767422259: /*participant*/ return new Property("participant", "", "The list of people responsible for providing the service.", 0, java.lang.Integer.MAX_VALUE, participant); + case -1474995297: /*appointment*/ return new Property("appointment", "Reference(Appointment)", "The appointment that scheduled this encounter.", 0, java.lang.Integer.MAX_VALUE, appointment); + case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService); + case 789194991: /*actualPeriod*/ return new Property("actualPeriod", "Period", "The actual start and end time of the encounter.", 0, 1, actualPeriod); + case 460857804: /*plannedStartDate*/ return new Property("plannedStartDate", "dateTime", "The planned start date/time (or admission date) of the encounter.", 0, 1, plannedStartDate); + case 1657534661: /*plannedEndDate*/ return new Property("plannedEndDate", "dateTime", "The planned end date/time (or discharge date) of the encounter.", 0, 1, plannedEndDate); + case -1106363674: /*length*/ return new Property("length", "Duration", "Actual quantity of time the encounter lasted. This excludes the time during leaves of absence.\r\rWhen missing it is the time in between the start and end values.", 0, 1, length); + case -934964668: /*reason*/ return new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason); + case 1196993265: /*diagnosis*/ return new Property("diagnosis", "", "The list of diagnosis relevant to this encounter.", 0, java.lang.Integer.MAX_VALUE, diagnosis); + case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this Encounter.", 0, java.lang.Integer.MAX_VALUE, account); + case -1360641041: /*dietPreference*/ return new Property("dietPreference", "CodeableConcept", "Diet preferences reported by the patient.", 0, java.lang.Integer.MAX_VALUE, dietPreference); + case 47410321: /*specialArrangement*/ return new Property("specialArrangement", "CodeableConcept", "Any special requests that have been made for this encounter, such as the provision of specific equipment or other things.", 0, java.lang.Integer.MAX_VALUE, specialArrangement); + case 1583588345: /*specialCourtesy*/ return new Property("specialCourtesy", "CodeableConcept", "Special courtesies that may be provided to the patient during the encounter (VIP, board member, professional courtesy).", 0, java.lang.Integer.MAX_VALUE, specialCourtesy); + case 27400201: /*admission*/ return new Property("admission", "", "Details about the stay during which a healthcare service is provided.\r\rThis does not describe the event of admitting the patient, but rather any information that is relevant from the time of admittance until the time of discharge.", 0, 1, admission); + case 1901043637: /*location*/ return new Property("location", "", "List of locations where the patient has been during this encounter.", 0, java.lang.Integer.MAX_VALUE, location); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // CodeableConcept + case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableReference + case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference + case 110854206: /*subjectStatus*/ return this.subjectStatus == null ? new Base[0] : new Base[] {this.subjectStatus}; // CodeableConcept + case -1892140189: /*episodeOfCare*/ return this.episodeOfCare == null ? new Base[0] : this.episodeOfCare.toArray(new Base[this.episodeOfCare.size()]); // Reference + case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference + case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference + case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference + case 243182534: /*serviceProvider*/ return this.serviceProvider == null ? new Base[0] : new Base[] {this.serviceProvider}; // Reference + case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // EncounterParticipantComponent + case -1474995297: /*appointment*/ return this.appointment == null ? new Base[0] : this.appointment.toArray(new Base[this.appointment.size()]); // Reference + case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail + case 789194991: /*actualPeriod*/ return this.actualPeriod == null ? new Base[0] : new Base[] {this.actualPeriod}; // Period + case 460857804: /*plannedStartDate*/ return this.plannedStartDate == null ? new Base[0] : new Base[] {this.plannedStartDate}; // DateTimeType + case 1657534661: /*plannedEndDate*/ return this.plannedEndDate == null ? new Base[0] : new Base[] {this.plannedEndDate}; // DateTimeType + case -1106363674: /*length*/ return this.length == null ? new Base[0] : new Base[] {this.length}; // Duration + case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // ReasonComponent + case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent + case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference + case -1360641041: /*dietPreference*/ return this.dietPreference == null ? new Base[0] : this.dietPreference.toArray(new Base[this.dietPreference.size()]); // CodeableConcept + case 47410321: /*specialArrangement*/ return this.specialArrangement == null ? new Base[0] : this.specialArrangement.toArray(new Base[this.specialArrangement.size()]); // CodeableConcept + case 1583588345: /*specialCourtesy*/ return this.specialCourtesy == null ? new Base[0] : this.specialCourtesy.toArray(new Base[this.specialCourtesy.size()]); // CodeableConcept + case 27400201: /*admission*/ return this.admission == null ? new Base[0] : new Base[] {this.admission}; // EncounterAdmissionComponent + case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // EncounterLocationComponent + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier + return value; + case -892481550: // status + value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case 94742904: // class + this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1165461084: // priority + this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1928370289: // serviceType + this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case -1867885268: // subject + this.subject = TypeConvertor.castToReference(value); // Reference + return value; + case 110854206: // subjectStatus + this.subjectStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1892140189: // episodeOfCare + this.getEpisodeOfCare().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -332612366: // basedOn + this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -7323378: // careTeam + this.getCareTeam().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -995410646: // partOf + this.partOf = TypeConvertor.castToReference(value); // Reference + return value; + case 243182534: // serviceProvider + this.serviceProvider = TypeConvertor.castToReference(value); // Reference + return value; + case 767422259: // participant + this.getParticipant().add((EncounterParticipantComponent) value); // EncounterParticipantComponent + return value; + case -1474995297: // appointment + this.getAppointment().add(TypeConvertor.castToReference(value)); // Reference + return value; + case 1420774698: // virtualService + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail + return value; + case 789194991: // actualPeriod + this.actualPeriod = TypeConvertor.castToPeriod(value); // Period + return value; + case 460857804: // plannedStartDate + this.plannedStartDate = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 1657534661: // plannedEndDate + this.plannedEndDate = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case -1106363674: // length + this.length = TypeConvertor.castToDuration(value); // Duration + return value; + case -934964668: // reason + this.getReason().add((ReasonComponent) value); // ReasonComponent + return value; + case 1196993265: // diagnosis + this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent + return value; + case -1177318867: // account + this.getAccount().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -1360641041: // dietPreference + this.getDietPreference().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 47410321: // specialArrangement + this.getSpecialArrangement().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 1583588345: // specialCourtesy + this.getSpecialCourtesy().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 27400201: // admission + this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent + return value; + case 1901043637: // location + this.getLocation().add((EncounterLocationComponent) value); // EncounterLocationComponent + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); + } else if (name.equals("status")) { + value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("class")) { + this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("priority")) { + this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("serviceType")) { + this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("subject")) { + this.subject = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("subjectStatus")) { + this.subjectStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("episodeOfCare")) { + this.getEpisodeOfCare().add(TypeConvertor.castToReference(value)); + } else if (name.equals("basedOn")) { + this.getBasedOn().add(TypeConvertor.castToReference(value)); + } else if (name.equals("careTeam")) { + this.getCareTeam().add(TypeConvertor.castToReference(value)); + } else if (name.equals("partOf")) { + this.partOf = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("serviceProvider")) { + this.serviceProvider = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("participant")) { + this.getParticipant().add((EncounterParticipantComponent) value); + } else if (name.equals("appointment")) { + this.getAppointment().add(TypeConvertor.castToReference(value)); + } else if (name.equals("virtualService")) { + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); + } else if (name.equals("actualPeriod")) { + this.actualPeriod = TypeConvertor.castToPeriod(value); // Period + } else if (name.equals("plannedStartDate")) { + this.plannedStartDate = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("plannedEndDate")) { + this.plannedEndDate = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("length")) { + this.length = TypeConvertor.castToDuration(value); // Duration + } else if (name.equals("reason")) { + this.getReason().add((ReasonComponent) value); + } else if (name.equals("diagnosis")) { + this.getDiagnosis().add((DiagnosisComponent) value); + } else if (name.equals("account")) { + this.getAccount().add(TypeConvertor.castToReference(value)); + } else if (name.equals("dietPreference")) { + this.getDietPreference().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("specialArrangement")) { + this.getSpecialArrangement().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("specialCourtesy")) { + this.getSpecialCourtesy().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("admission")) { + this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent + } else if (name.equals("location")) { + this.getLocation().add((EncounterLocationComponent) value); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().remove(value); + } else if (name.equals("status")) { + value = new EncounterStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("class")) { + this.getClass_().remove(value); + } else if (name.equals("priority")) { + this.priority = null; + } else if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("serviceType")) { + this.getServiceType().remove(value); + } else if (name.equals("subject")) { + this.subject = null; + } else if (name.equals("subjectStatus")) { + this.subjectStatus = null; + } else if (name.equals("episodeOfCare")) { + this.getEpisodeOfCare().remove(value); + } else if (name.equals("basedOn")) { + this.getBasedOn().remove(value); + } else if (name.equals("careTeam")) { + this.getCareTeam().remove(value); + } else if (name.equals("partOf")) { + this.partOf = null; + } else if (name.equals("serviceProvider")) { + this.serviceProvider = null; + } else if (name.equals("participant")) { + this.getParticipant().remove((EncounterParticipantComponent) value); + } else if (name.equals("appointment")) { + this.getAppointment().remove(value); + } else if (name.equals("virtualService")) { + this.getVirtualService().remove(value); + } else if (name.equals("actualPeriod")) { + this.actualPeriod = null; + } else if (name.equals("plannedStartDate")) { + this.plannedStartDate = null; + } else if (name.equals("plannedEndDate")) { + this.plannedEndDate = null; + } else if (name.equals("length")) { + this.length = null; + } else if (name.equals("reason")) { + this.getReason().remove((ReasonComponent) value); + } else if (name.equals("diagnosis")) { + this.getDiagnosis().remove((DiagnosisComponent) value); + } else if (name.equals("account")) { + this.getAccount().remove(value); + } else if (name.equals("dietPreference")) { + this.getDietPreference().remove(value); + } else if (name.equals("specialArrangement")) { + this.getSpecialArrangement().remove(value); + } else if (name.equals("specialCourtesy")) { + this.getSpecialCourtesy().remove(value); + } else if (name.equals("admission")) { + this.admission = (EncounterAdmissionComponent) value; // EncounterAdmissionComponent + } else if (name.equals("location")) { + this.getLocation().remove((EncounterLocationComponent) value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return addIdentifier(); + case -892481550: return getStatusElement(); + case 94742904: return addClass_(); + case -1165461084: return getPriority(); + case 3575610: return addType(); + case -1928370289: return addServiceType(); + case -1867885268: return getSubject(); + case 110854206: return getSubjectStatus(); + case -1892140189: return addEpisodeOfCare(); + case -332612366: return addBasedOn(); + case -7323378: return addCareTeam(); + case -995410646: return getPartOf(); + case 243182534: return getServiceProvider(); + case 767422259: return addParticipant(); + case -1474995297: return addAppointment(); + case 1420774698: return addVirtualService(); + case 789194991: return getActualPeriod(); + case 460857804: return getPlannedStartDateElement(); + case 1657534661: return getPlannedEndDateElement(); + case -1106363674: return getLength(); + case -934964668: return addReason(); + case 1196993265: return addDiagnosis(); + case -1177318867: return addAccount(); + case -1360641041: return addDietPreference(); + case 47410321: return addSpecialArrangement(); + case 1583588345: return addSpecialCourtesy(); + case 27400201: return getAdmission(); + case 1901043637: return addLocation(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case -892481550: /*status*/ return new String[] {"code"}; + case 94742904: /*class*/ return new String[] {"CodeableConcept"}; + case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case -1928370289: /*serviceType*/ return new String[] {"CodeableReference"}; + case -1867885268: /*subject*/ return new String[] {"Reference"}; + case 110854206: /*subjectStatus*/ return new String[] {"CodeableConcept"}; + case -1892140189: /*episodeOfCare*/ return new String[] {"Reference"}; + case -332612366: /*basedOn*/ return new String[] {"Reference"}; + case -7323378: /*careTeam*/ return new String[] {"Reference"}; + case -995410646: /*partOf*/ return new String[] {"Reference"}; + case 243182534: /*serviceProvider*/ return new String[] {"Reference"}; + case 767422259: /*participant*/ return new String[] {}; + case -1474995297: /*appointment*/ return new String[] {"Reference"}; + case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; + case 789194991: /*actualPeriod*/ return new String[] {"Period"}; + case 460857804: /*plannedStartDate*/ return new String[] {"dateTime"}; + case 1657534661: /*plannedEndDate*/ return new String[] {"dateTime"}; + case -1106363674: /*length*/ return new String[] {"Duration"}; + case -934964668: /*reason*/ return new String[] {}; + case 1196993265: /*diagnosis*/ return new String[] {}; + case -1177318867: /*account*/ return new String[] {"Reference"}; + case -1360641041: /*dietPreference*/ return new String[] {"CodeableConcept"}; + case 47410321: /*specialArrangement*/ return new String[] {"CodeableConcept"}; + case 1583588345: /*specialCourtesy*/ return new String[] {"CodeableConcept"}; + case 27400201: /*admission*/ return new String[] {}; + case 1901043637: /*location*/ return new String[] {}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Encounter.status"); + } + else if (name.equals("class")) { + return addClass_(); + } + else if (name.equals("priority")) { + this.priority = new CodeableConcept(); + return this.priority; + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("serviceType")) { + return addServiceType(); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("subjectStatus")) { + this.subjectStatus = new CodeableConcept(); + return this.subjectStatus; + } + else if (name.equals("episodeOfCare")) { + return addEpisodeOfCare(); + } + else if (name.equals("basedOn")) { + return addBasedOn(); + } + else if (name.equals("careTeam")) { + return addCareTeam(); + } + else if (name.equals("partOf")) { + this.partOf = new Reference(); + return this.partOf; + } + else if (name.equals("serviceProvider")) { + this.serviceProvider = new Reference(); + return this.serviceProvider; + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("appointment")) { + return addAppointment(); + } + else if (name.equals("virtualService")) { + return addVirtualService(); + } + else if (name.equals("actualPeriod")) { + this.actualPeriod = new Period(); + return this.actualPeriod; + } + else if (name.equals("plannedStartDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Encounter.plannedStartDate"); + } + else if (name.equals("plannedEndDate")) { + throw new FHIRException("Cannot call addChild on a singleton property Encounter.plannedEndDate"); + } + else if (name.equals("length")) { + this.length = new Duration(); + return this.length; + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("diagnosis")) { + return addDiagnosis(); + } + else if (name.equals("account")) { + return addAccount(); + } + else if (name.equals("dietPreference")) { + return addDietPreference(); + } + else if (name.equals("specialArrangement")) { + return addSpecialArrangement(); + } + else if (name.equals("specialCourtesy")) { + return addSpecialCourtesy(); + } + else if (name.equals("admission")) { + this.admission = new EncounterAdmissionComponent(); + return this.admission; + } + else if (name.equals("location")) { + return addLocation(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Encounter"; + + } + + public Encounter copy() { + Encounter dst = new Encounter(); + copyValues(dst); + return dst; + } + + public void copyValues(Encounter dst) { + super.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 (class_ != null) { + dst.class_ = new ArrayList(); + for (CodeableConcept i : class_) + dst.class_.add(i.copy()); + }; + dst.priority = priority == null ? null : priority.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (CodeableReference i : serviceType) + dst.serviceType.add(i.copy()); + }; + dst.subject = subject == null ? null : subject.copy(); + dst.subjectStatus = subjectStatus == null ? null : subjectStatus.copy(); + if (episodeOfCare != null) { + dst.episodeOfCare = new ArrayList(); + for (Reference i : episodeOfCare) + dst.episodeOfCare.add(i.copy()); + }; + if (basedOn != null) { + dst.basedOn = new ArrayList(); + for (Reference i : basedOn) + dst.basedOn.add(i.copy()); + }; + if (careTeam != null) { + dst.careTeam = new ArrayList(); + for (Reference i : careTeam) + dst.careTeam.add(i.copy()); + }; + dst.partOf = partOf == null ? null : partOf.copy(); + dst.serviceProvider = serviceProvider == null ? null : serviceProvider.copy(); + if (participant != null) { + dst.participant = new ArrayList(); + for (EncounterParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + if (appointment != null) { + dst.appointment = new ArrayList(); + for (Reference i : appointment) + dst.appointment.add(i.copy()); + }; + if (virtualService != null) { + dst.virtualService = new ArrayList(); + for (VirtualServiceDetail i : virtualService) + dst.virtualService.add(i.copy()); + }; + dst.actualPeriod = actualPeriod == null ? null : actualPeriod.copy(); + dst.plannedStartDate = plannedStartDate == null ? null : plannedStartDate.copy(); + dst.plannedEndDate = plannedEndDate == null ? null : plannedEndDate.copy(); + dst.length = length == null ? null : length.copy(); + if (reason != null) { + dst.reason = new ArrayList(); + for (ReasonComponent i : reason) + dst.reason.add(i.copy()); + }; + if (diagnosis != null) { + dst.diagnosis = new ArrayList(); + for (DiagnosisComponent i : diagnosis) + dst.diagnosis.add(i.copy()); + }; + if (account != null) { + dst.account = new ArrayList(); + for (Reference i : account) + dst.account.add(i.copy()); + }; + if (dietPreference != null) { + dst.dietPreference = new ArrayList(); + for (CodeableConcept i : dietPreference) + dst.dietPreference.add(i.copy()); + }; + if (specialArrangement != null) { + dst.specialArrangement = new ArrayList(); + for (CodeableConcept i : specialArrangement) + dst.specialArrangement.add(i.copy()); + }; + if (specialCourtesy != null) { + dst.specialCourtesy = new ArrayList(); + for (CodeableConcept i : specialCourtesy) + dst.specialCourtesy.add(i.copy()); + }; + dst.admission = admission == null ? null : admission.copy(); + if (location != null) { + dst.location = new ArrayList(); + for (EncounterLocationComponent i : location) + dst.location.add(i.copy()); + }; + } + + protected Encounter typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof Encounter)) + return false; + Encounter o = (Encounter) other_; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(class_, o.class_, true) + && compareDeep(priority, o.priority, true) && compareDeep(type, o.type, true) && compareDeep(serviceType, o.serviceType, true) + && compareDeep(subject, o.subject, true) && compareDeep(subjectStatus, o.subjectStatus, true) && compareDeep(episodeOfCare, o.episodeOfCare, true) + && compareDeep(basedOn, o.basedOn, true) && compareDeep(careTeam, o.careTeam, true) && compareDeep(partOf, o.partOf, true) + && compareDeep(serviceProvider, o.serviceProvider, true) && compareDeep(participant, o.participant, true) + && compareDeep(appointment, o.appointment, true) && compareDeep(virtualService, o.virtualService, true) + && compareDeep(actualPeriod, o.actualPeriod, true) && compareDeep(plannedStartDate, o.plannedStartDate, true) + && compareDeep(plannedEndDate, o.plannedEndDate, true) && compareDeep(length, o.length, true) && compareDeep(reason, o.reason, true) + && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(account, o.account, true) && compareDeep(dietPreference, o.dietPreference, true) + && compareDeep(specialArrangement, o.specialArrangement, true) && compareDeep(specialCourtesy, o.specialCourtesy, true) + && compareDeep(admission, o.admission, true) && compareDeep(location, o.location, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof Encounter)) + return false; + Encounter o = (Encounter) other_; + return compareValues(status, o.status, true) && compareValues(plannedStartDate, o.plannedStartDate, true) + && compareValues(plannedEndDate, o.plannedEndDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, class_ + , priority, type, serviceType, subject, subjectStatus, episodeOfCare, basedOn + , careTeam, partOf, serviceProvider, participant, appointment, virtualService, actualPeriod + , plannedStartDate, plannedEndDate, length, reason, diagnosis, account, dietPreference + , specialArrangement, specialCourtesy, admission, location); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Encounter; + } + + /** + * Search parameter: account + *

+ * Description: The set of accounts that may be used for billing for this Encounter
+ * Type: reference
+ * Path: Encounter.account
+ *

+ */ + @SearchParamDefinition(name="account", path="Encounter.account", description="The set of accounts that may be used for billing for this Encounter", type="reference", target={Account.class } ) + public static final String SP_ACCOUNT = "account"; + /** + * Fluent Client search parameter constant for account + *

+ * Description: The set of accounts that may be used for billing for this Encounter
+ * Type: reference
+ * Path: Encounter.account
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACCOUNT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:account". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ACCOUNT = new ca.uhn.fhir.model.api.Include("Encounter:account").toLocked(); + + /** + * Search parameter: appointment + *

+ * Description: The appointment that scheduled this encounter
+ * Type: reference
+ * Path: Encounter.appointment
+ *

+ */ + @SearchParamDefinition(name="appointment", path="Encounter.appointment", description="The appointment that scheduled this encounter", type="reference", target={Appointment.class } ) + public static final String SP_APPOINTMENT = "appointment"; + /** + * Fluent Client search parameter constant for appointment + *

+ * Description: The appointment that scheduled this encounter
+ * Type: reference
+ * Path: Encounter.appointment
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam APPOINTMENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_APPOINTMENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:appointment". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_APPOINTMENT = new ca.uhn.fhir.model.api.Include("Encounter:appointment").toLocked(); + + /** + * Search parameter: based-on + *

+ * Description: The ServiceRequest that initiated this encounter
+ * Type: reference
+ * Path: Encounter.basedOn
+ *

+ */ + @SearchParamDefinition(name="based-on", path="Encounter.basedOn", description="The ServiceRequest that initiated this encounter", type="reference", target={CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class } ) + public static final String SP_BASED_ON = "based-on"; + /** + * Fluent Client search parameter constant for based-on + *

+ * Description: The ServiceRequest that initiated this encounter
+ * Type: reference
+ * Path: Encounter.basedOn
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:based-on". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Encounter:based-on").toLocked(); + + /** + * Search parameter: careteam + *

+ * Description: Careteam allocated to participate in the encounter
+ * Type: reference
+ * Path: Encounter.careTeam
+ *

+ */ + @SearchParamDefinition(name="careteam", path="Encounter.careTeam", description="Careteam allocated to participate in the encounter", type="reference", target={CareTeam.class } ) + public static final String SP_CARETEAM = "careteam"; + /** + * Fluent Client search parameter constant for careteam + *

+ * Description: Careteam allocated to participate in the encounter
+ * Type: reference
+ * Path: Encounter.careTeam
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARETEAM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARETEAM); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:careteam". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_CARETEAM = new ca.uhn.fhir.model.api.Include("Encounter:careteam").toLocked(); + + /** + * Search parameter: class + *

+ * Description: Classification of patient encounter
+ * Type: token
+ * Path: Encounter.class
+ *

+ */ + @SearchParamDefinition(name="class", path="Encounter.class", description="Classification of patient encounter", type="token" ) + public static final String SP_CLASS = "class"; + /** + * Fluent Client search parameter constant for class + *

+ * Description: Classification of patient encounter
+ * Type: token
+ * Path: Encounter.class
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLASS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLASS); + + /** + * Search parameter: date-start + *

+ * Description: The actual start date of the Encounter
+ * Type: date
+ * Path: Encounter.actualPeriod.start
+ *

+ */ + @SearchParamDefinition(name="date-start", path="Encounter.actualPeriod.start", description="The actual start date of the Encounter", type="date" ) + public static final String SP_DATE_START = "date-start"; + /** + * Fluent Client search parameter constant for date-start + *

+ * Description: The actual start date of the Encounter
+ * Type: date
+ * Path: Encounter.actualPeriod.start
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE_START = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE_START); + + /** + * Search parameter: diagnosis-code + *

+ * Description: The diagnosis or procedure relevant to the encounter (coded)
+ * Type: token
+ * Path: Encounter.diagnosis.condition.concept
+ *

+ */ + @SearchParamDefinition(name="diagnosis-code", path="Encounter.diagnosis.condition.concept", description="The diagnosis or procedure relevant to the encounter (coded)", type="token" ) + public static final String SP_DIAGNOSIS_CODE = "diagnosis-code"; + /** + * Fluent Client search parameter constant for diagnosis-code + *

+ * Description: The diagnosis or procedure relevant to the encounter (coded)
+ * Type: token
+ * Path: Encounter.diagnosis.condition.concept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam DIAGNOSIS_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DIAGNOSIS_CODE); + + /** + * Search parameter: diagnosis-reference + *

+ * Description: The diagnosis or procedure relevant to the encounter (resource reference)
+ * Type: reference
+ * Path: Encounter.diagnosis.condition.reference
+ *

+ */ + @SearchParamDefinition(name="diagnosis-reference", path="Encounter.diagnosis.condition.reference", description="The diagnosis or procedure relevant to the encounter (resource reference)", type="reference", target={Condition.class } ) + public static final String SP_DIAGNOSIS_REFERENCE = "diagnosis-reference"; + /** + * Fluent Client search parameter constant for diagnosis-reference + *

+ * Description: The diagnosis or procedure relevant to the encounter (resource reference)
+ * Type: reference
+ * Path: Encounter.diagnosis.condition.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DIAGNOSIS_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DIAGNOSIS_REFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:diagnosis-reference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_DIAGNOSIS_REFERENCE = new ca.uhn.fhir.model.api.Include("Encounter:diagnosis-reference").toLocked(); + + /** + * Search parameter: end-date + *

+ * Description: The actual end date of the Encounter
+ * Type: date
+ * Path: Encounter.actualPeriod.end
+ *

+ */ + @SearchParamDefinition(name="end-date", path="Encounter.actualPeriod.end", description="The actual end date of the Encounter", type="date" ) + public static final String SP_END_DATE = "end-date"; + /** + * Fluent Client search parameter constant for end-date + *

+ * Description: The actual end date of the Encounter
+ * Type: date
+ * Path: Encounter.actualPeriod.end
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam END_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_END_DATE); + + /** + * Search parameter: episode-of-care + *

+ * Description: Episode(s) of care that this encounter should be recorded against
+ * Type: reference
+ * Path: Encounter.episodeOfCare
+ *

+ */ + @SearchParamDefinition(name="episode-of-care", path="Encounter.episodeOfCare", description="Episode(s) of care that this encounter should be recorded against", type="reference", target={EpisodeOfCare.class } ) + public static final String SP_EPISODE_OF_CARE = "episode-of-care"; + /** + * Fluent Client search parameter constant for episode-of-care + *

+ * Description: Episode(s) of care that this encounter should be recorded against
+ * Type: reference
+ * Path: Encounter.episodeOfCare
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EPISODE_OF_CARE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EPISODE_OF_CARE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:episode-of-care". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_EPISODE_OF_CARE = new ca.uhn.fhir.model.api.Include("Encounter:episode-of-care").toLocked(); + + /** + * Search parameter: length + *

+ * Description: Length of encounter in days
+ * Type: quantity
+ * Path: Encounter.length
+ *

+ */ + @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="quantity" ) + public static final String SP_LENGTH = "length"; + /** + * Fluent Client search parameter constant for length + *

+ * Description: Length of encounter in days
+ * Type: quantity
+ * Path: Encounter.length
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.QuantityClientParam LENGTH = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_LENGTH); + + /** + * Search parameter: location + *

+ * Description: Location the encounter takes place
+ * Type: reference
+ * Path: Encounter.location.location
+ *

+ */ + @SearchParamDefinition(name="location", path="Encounter.location.location", description="Location the encounter takes place", type="reference", target={Location.class } ) + public static final String SP_LOCATION = "location"; + /** + * Fluent Client search parameter constant for location + *

+ * Description: Location the encounter takes place
+ * Type: reference
+ * Path: Encounter.location.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 "Encounter:location". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Encounter:location").toLocked(); + + /** + * Search parameter: part-of + *

+ * Description: Another Encounter this encounter is part of
+ * Type: reference
+ * Path: Encounter.partOf
+ *

+ */ + @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="Another Encounter this encounter is part of", type="reference", target={Encounter.class } ) + public static final String SP_PART_OF = "part-of"; + /** + * Fluent Client search parameter constant for part-of + *

+ * Description: Another Encounter this encounter is part of
+ * Type: reference
+ * Path: Encounter.partOf
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:part-of". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("Encounter:part-of").toLocked(); + + /** + * Search parameter: participant-type + *

+ * Description: Role of participant in encounter
+ * Type: token
+ * Path: Encounter.participant.type
+ *

+ */ + @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="Role of participant in encounter", type="token" ) + public static final String SP_PARTICIPANT_TYPE = "participant-type"; + /** + * Fluent Client search parameter constant for participant-type + *

+ * Description: Role of participant in encounter
+ * Type: token
+ * Path: Encounter.participant.type
+ *

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

+ * Description: Persons involved in the encounter other than the patient
+ * Type: reference
+ * Path: Encounter.participant.actor
+ *

+ */ + @SearchParamDefinition(name="participant", path="Encounter.participant.actor", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Group.class, HealthcareService.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) + public static final String SP_PARTICIPANT = "participant"; + /** + * Fluent Client search parameter constant for participant + *

+ * Description: Persons involved in the encounter other than the patient
+ * Type: reference
+ * Path: Encounter.participant.actor
+ *

+ */ + 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 "Encounter:participant". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("Encounter:participant").toLocked(); + + /** + * Search parameter: practitioner + *

+ * Description: Persons involved in the encounter other than the patient
+ * Type: reference
+ * Path: Encounter.participant.actor.where(resolve() is Practitioner)
+ *

+ */ + @SearchParamDefinition(name="practitioner", path="Encounter.participant.actor.where(resolve() is Practitioner)", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class } ) + public static final String SP_PRACTITIONER = "practitioner"; + /** + * Fluent Client search parameter constant for practitioner + *

+ * Description: Persons involved in the encounter other than the patient
+ * Type: reference
+ * Path: Encounter.participant.actor.where(resolve() is 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 "Encounter:practitioner". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Encounter:practitioner").toLocked(); + + /** + * Search parameter: reason-code + *

+ * Description: Reference to a concept (coded)
+ * Type: token
+ * Path: Encounter.reason.value.concept
+ *

+ */ + @SearchParamDefinition(name="reason-code", path="Encounter.reason.value.concept", description="Reference to a concept (coded)", type="token" ) + public static final String SP_REASON_CODE = "reason-code"; + /** + * Fluent Client search parameter constant for reason-code + *

+ * Description: Reference to a concept (coded)
+ * Type: token
+ * Path: Encounter.reason.value.concept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE); + + /** + * Search parameter: reason-reference + *

+ * Description: Reference to a resource (resource reference)
+ * Type: reference
+ * Path: Encounter.reason.value.reference
+ *

+ */ + @SearchParamDefinition(name="reason-reference", path="Encounter.reason.value.reference", description="Reference to a resource (resource reference)", type="reference", target={Condition.class, DiagnosticReport.class, ImmunizationRecommendation.class, Observation.class, Procedure.class } ) + public static final String SP_REASON_REFERENCE = "reason-reference"; + /** + * Fluent Client search parameter constant for reason-reference + *

+ * Description: Reference to a resource (resource reference)
+ * Type: reference
+ * Path: Encounter.reason.value.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:reason-reference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Encounter:reason-reference").toLocked(); + + /** + * Search parameter: service-provider + *

+ * Description: The organization (facility) responsible for this encounter
+ * Type: reference
+ * Path: Encounter.serviceProvider
+ *

+ */ + @SearchParamDefinition(name="service-provider", path="Encounter.serviceProvider", description="The organization (facility) responsible for this encounter", type="reference", target={Organization.class } ) + public static final String SP_SERVICE_PROVIDER = "service-provider"; + /** + * Fluent Client search parameter constant for service-provider + *

+ * Description: The organization (facility) responsible for this encounter
+ * Type: reference
+ * Path: Encounter.serviceProvider
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE_PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE_PROVIDER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Encounter:service-provider". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE_PROVIDER = new ca.uhn.fhir.model.api.Include("Encounter:service-provider").toLocked(); + + /** + * Search parameter: special-arrangement + *

+ * Description: Wheelchair, translator, stretcher, etc.
+ * Type: token
+ * Path: Encounter.specialArrangement
+ *

+ */ + @SearchParamDefinition(name="special-arrangement", path="Encounter.specialArrangement", description="Wheelchair, translator, stretcher, etc.", type="token" ) + public static final String SP_SPECIAL_ARRANGEMENT = "special-arrangement"; + /** + * Fluent Client search parameter constant for special-arrangement + *

+ * Description: Wheelchair, translator, stretcher, etc.
+ * Type: token
+ * Path: Encounter.specialArrangement
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIAL_ARRANGEMENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIAL_ARRANGEMENT); + + /** + * Search parameter: status + *

+ * Description: planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown
+ * Type: token
+ * Path: Encounter.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Encounter.status", description="planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: planned | in-progress | on-hold | completed | cancelled | entered-in-error | unknown
+ * Type: token
+ * Path: Encounter.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + /** + * Search parameter: subject-status + *

+ * Description: The current status of the subject in relation to the Encounter
+ * Type: token
+ * Path: Encounter.subjectStatus
+ *

+ */ + @SearchParamDefinition(name="subject-status", path="Encounter.subjectStatus", description="The current status of the subject in relation to the Encounter", type="token" ) + public static final String SP_SUBJECT_STATUS = "subject-status"; + /** + * Fluent Client search parameter constant for subject-status + *

+ * Description: The current status of the subject in relation to the Encounter
+ * Type: token
+ * Path: Encounter.subjectStatus
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBJECT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBJECT_STATUS); + + /** + * Search parameter: subject + *

+ * Description: The patient or group present at the encounter
+ * Type: reference
+ * Path: Encounter.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="Encounter.subject", description="The patient or group present at the encounter", type="reference", target={Group.class, Patient.class } ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: The patient or group present at the encounter
+ * Type: reference
+ * Path: Encounter.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 "Encounter:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Encounter:subject").toLocked(); + + /** + * Search parameter: date + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): When the event occurred +* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded +* [Appointment](appointment.html): Appointment date/time. +* [AuditEvent](auditevent.html): Time when the event was recorded +* [CarePlan](careplan.html): Time period plan covers +* [CareTeam](careteam.html): A date within the coverage time period. +* [ClinicalImpression](clinicalimpression.html): When the assessment was documented +* [Composition](composition.html): Composition editing time +* [Consent](consent.html): When consent was agreed to +* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report +* [DocumentReference](documentreference.html): When this document reference was created +* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted +* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period +* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated +* [Flag](flag.html): Time period when flag is active +* [Immunization](immunization.html): Vaccination (non)-Administration Date +* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated +* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created +* [Invoice](invoice.html): Invoice date / posting date +* [List](list.html): When the list was prepared +* [MeasureReport](measurereport.html): The date of the measure report +* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication +* [Observation](observation.html): Clinically relevant time/time-period for observation +* [Procedure](procedure.html): When the procedure occurred or is occurring +* [ResearchSubject](researchsubject.html): Start and end of participation +* [RiskAssessment](riskassessment.html): When was assessment made? +* [SupplyRequest](supplyrequest.html): When the request was made +
+ * Type: date
+ * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
+ *

+ */ + @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): When the event occurred +* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded +* [Appointment](appointment.html): Appointment date/time. +* [AuditEvent](auditevent.html): Time when the event was recorded +* [CarePlan](careplan.html): Time period plan covers +* [CareTeam](careteam.html): A date within the coverage time period. +* [ClinicalImpression](clinicalimpression.html): When the assessment was documented +* [Composition](composition.html): Composition editing time +* [Consent](consent.html): When consent was agreed to +* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report +* [DocumentReference](documentreference.html): When this document reference was created +* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted +* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period +* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated +* [Flag](flag.html): Time period when flag is active +* [Immunization](immunization.html): Vaccination (non)-Administration Date +* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated +* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created +* [Invoice](invoice.html): Invoice date / posting date +* [List](list.html): When the list was prepared +* [MeasureReport](measurereport.html): The date of the measure report +* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication +* [Observation](observation.html): Clinically relevant time/time-period for observation +* [Procedure](procedure.html): When the procedure occurred or is occurring +* [ResearchSubject](researchsubject.html): Start and end of participation +* [RiskAssessment](riskassessment.html): When was assessment made? +* [SupplyRequest](supplyrequest.html): When the request was made +
+ * Type: date
+ * Path: AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "Encounter:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Encounter:patient").toLocked(); + + /** + * Search parameter: type + *

+ * Description: Multiple Resources: + +* [Account](account.html): E.g. patient, expense, depreciation +* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) +* [Composition](composition.html): Kind of composition (LOINC if possible) +* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) +* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) +* [Encounter](encounter.html): Specific type of encounter +* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management +* [Invoice](invoice.html): Type of Invoice +* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type +* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence +* [Specimen](specimen.html): The specimen type +
+ * Type: token
+ * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
+ *

+ */ + @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: Multiple Resources: + +* [Account](account.html): E.g. patient, expense, depreciation +* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known) +* [Composition](composition.html): Kind of composition (LOINC if possible) +* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation) +* [DocumentReference](documentreference.html): Kind of document (LOINC if possible) +* [Encounter](encounter.html): Specific type of encounter +* [EpisodeOfCare](episodeofcare.html): Type/class - e.g. specialist referral, disease management +* [Invoice](invoice.html): Type of Invoice +* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type +* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence +* [Specimen](specimen.html): The specimen type +
+ * Type: token
+ * Path: Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Endpoint.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Endpoint.java index a47c9df9b..9f31fd94a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Endpoint.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Endpoint.java @@ -180,7 +180,9 @@ public class Endpoint extends DomainResource { throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'"); } public String toCode(EndpointStatus code) { - if (code == EndpointStatus.ACTIVE) + if (code == EndpointStatus.NULL) + return null; + if (code == EndpointStatus.ACTIVE) return "active"; if (code == EndpointStatus.SUSPENDED) return "suspended"; @@ -191,7 +193,7 @@ public class Endpoint extends DomainResource { if (code == EndpointStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(EndpointStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EnrollmentResponse.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EnrollmentResponse.java index 615593941..480da63bb 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EnrollmentResponse.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EnrollmentResponse.java @@ -166,7 +166,9 @@ public class EnrollmentResponse extends DomainResource { throw new FHIRException("Unknown EnrollmentOutcome code '"+codeString+"'"); } public String toCode(EnrollmentOutcome code) { - if (code == EnrollmentOutcome.QUEUED) + if (code == EnrollmentOutcome.NULL) + return null; + if (code == EnrollmentOutcome.QUEUED) return "queued"; if (code == EnrollmentOutcome.COMPLETE) return "complete"; @@ -175,7 +177,7 @@ public class EnrollmentResponse extends DomainResource { if (code == EnrollmentOutcome.PARTIAL) return "partial"; return "?"; - } + } public String toSystem(EnrollmentOutcome code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java index f2600f6d7..681a72587 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Enumerations.java @@ -177,12 +177,14 @@ public class Enumerations { throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'"); } public String toCode(ActionCardinalityBehavior code) { - if (code == ActionCardinalityBehavior.SINGLE) + if (code == ActionCardinalityBehavior.NULL) + return null; + if (code == ActionCardinalityBehavior.SINGLE) return "single"; if (code == ActionCardinalityBehavior.MULTIPLE) return "multiple"; return "?"; - } + } public String toSystem(ActionCardinalityBehavior code) { return code.getSystem(); } @@ -290,14 +292,16 @@ public class Enumerations { throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'"); } public String toCode(ActionConditionKind code) { - if (code == ActionConditionKind.APPLICABILITY) + if (code == ActionConditionKind.NULL) + return null; + if (code == ActionConditionKind.APPLICABILITY) return "applicability"; if (code == ActionConditionKind.START) return "start"; if (code == ActionConditionKind.STOP) return "stop"; return "?"; - } + } public String toSystem(ActionConditionKind code) { return code.getSystem(); } @@ -405,14 +409,16 @@ public class Enumerations { throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'"); } public String toCode(ActionGroupingBehavior code) { - if (code == ActionGroupingBehavior.VISUALGROUP) + if (code == ActionGroupingBehavior.NULL) + return null; + if (code == ActionGroupingBehavior.VISUALGROUP) return "visual-group"; if (code == ActionGroupingBehavior.LOGICALGROUP) return "logical-group"; if (code == ActionGroupingBehavior.SENTENCEGROUP) return "sentence-group"; return "?"; - } + } public String toSystem(ActionGroupingBehavior code) { return code.getSystem(); } @@ -618,7 +624,9 @@ public class Enumerations { throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'"); } public String toCode(ActionParticipantType code) { - if (code == ActionParticipantType.CARETEAM) + if (code == ActionParticipantType.NULL) + return null; + if (code == ActionParticipantType.CARETEAM) return "careteam"; if (code == ActionParticipantType.DEVICE) return "device"; @@ -639,7 +647,7 @@ public class Enumerations { if (code == ActionParticipantType.RELATEDPERSON) return "relatedperson"; return "?"; - } + } public String toSystem(ActionParticipantType code) { return code.getSystem(); } @@ -733,12 +741,14 @@ public class Enumerations { throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'"); } public String toCode(ActionPrecheckBehavior code) { - if (code == ActionPrecheckBehavior.YES) + if (code == ActionPrecheckBehavior.NULL) + return null; + if (code == ActionPrecheckBehavior.YES) return "yes"; if (code == ActionPrecheckBehavior.NO) return "no"; return "?"; - } + } public String toSystem(ActionPrecheckBehavior code) { return code.getSystem(); } @@ -930,7 +940,9 @@ public class Enumerations { throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); } public String toCode(ActionRelationshipType code) { - if (code == ActionRelationshipType.BEFORE) + if (code == ActionRelationshipType.NULL) + return null; + if (code == ActionRelationshipType.BEFORE) return "before"; if (code == ActionRelationshipType.BEFORESTART) return "before-start"; @@ -949,7 +961,7 @@ public class Enumerations { if (code == ActionRelationshipType.AFTEREND) return "after-end"; return "?"; - } + } public String toSystem(ActionRelationshipType code) { return code.getSystem(); } @@ -1057,14 +1069,16 @@ public class Enumerations { throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'"); } public String toCode(ActionRequiredBehavior code) { - if (code == ActionRequiredBehavior.MUST) + if (code == ActionRequiredBehavior.NULL) + return null; + if (code == ActionRequiredBehavior.MUST) return "must"; if (code == ActionRequiredBehavior.COULD) return "could"; if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED) return "must-unless-documented"; return "?"; - } + } public String toSystem(ActionRequiredBehavior code) { return code.getSystem(); } @@ -1214,7 +1228,9 @@ public class Enumerations { throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'"); } public String toCode(ActionSelectionBehavior code) { - if (code == ActionSelectionBehavior.ANY) + if (code == ActionSelectionBehavior.NULL) + return null; + if (code == ActionSelectionBehavior.ANY) return "any"; if (code == ActionSelectionBehavior.ALL) return "all"; @@ -1227,7 +1243,7 @@ public class Enumerations { if (code == ActionSelectionBehavior.ONEORMORE) return "one-or-more"; return "?"; - } + } public String toSystem(ActionSelectionBehavior code) { return code.getSystem(); } @@ -1349,7 +1365,9 @@ public class Enumerations { throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'"); } public String toCode(AdministrativeGender code) { - if (code == AdministrativeGender.MALE) + if (code == AdministrativeGender.NULL) + return null; + if (code == AdministrativeGender.MALE) return "male"; if (code == AdministrativeGender.FEMALE) return "female"; @@ -1358,7 +1376,7 @@ public class Enumerations { if (code == AdministrativeGender.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(AdministrativeGender code) { return code.getSystem(); } @@ -1424,8 +1442,10 @@ public class Enumerations { throw new FHIRException("Unknown AllLanguages code '"+codeString+"'"); } public String toCode(AllLanguages code) { - return "?"; - } + if (code == AllLanguages.NULL) + return null; + return "?"; + } public String toSystem(AllLanguages code) { return code.getSystem(); } @@ -1547,7 +1567,9 @@ public class Enumerations { throw new FHIRException("Unknown BindingStrength code '"+codeString+"'"); } public String toCode(BindingStrength code) { - if (code == BindingStrength.REQUIRED) + if (code == BindingStrength.NULL) + return null; + if (code == BindingStrength.REQUIRED) return "required"; if (code == BindingStrength.EXTENSIBLE) return "extensible"; @@ -1556,7 +1578,7 @@ public class Enumerations { if (code == BindingStrength.EXAMPLE) return "example"; return "?"; - } + } public String toSystem(BindingStrength code) { return code.getSystem(); } @@ -1664,14 +1686,16 @@ public class Enumerations { throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'"); } public String toCode(CapabilityStatementKind code) { - if (code == CapabilityStatementKind.INSTANCE) + if (code == CapabilityStatementKind.NULL) + return null; + if (code == CapabilityStatementKind.INSTANCE) return "instance"; if (code == CapabilityStatementKind.CAPABILITY) return "capability"; if (code == CapabilityStatementKind.REQUIREMENTS) return "requirements"; return "?"; - } + } public String toSystem(CapabilityStatementKind code) { return code.getSystem(); } @@ -1793,7 +1817,9 @@ public class Enumerations { throw new FHIRException("Unknown ClaimProcessingCodes code '"+codeString+"'"); } public String toCode(ClaimProcessingCodes code) { - if (code == ClaimProcessingCodes.QUEUED) + if (code == ClaimProcessingCodes.NULL) + return null; + if (code == ClaimProcessingCodes.QUEUED) return "queued"; if (code == ClaimProcessingCodes.COMPLETE) return "complete"; @@ -1802,7 +1828,7 @@ public class Enumerations { if (code == ClaimProcessingCodes.PARTIAL) return "partial"; return "?"; - } + } public String toSystem(ClaimProcessingCodes code) { return code.getSystem(); } @@ -1938,7 +1964,9 @@ public class Enumerations { throw new FHIRException("Unknown CodeSystemContentMode code '"+codeString+"'"); } public String toCode(CodeSystemContentMode code) { - if (code == CodeSystemContentMode.NOTPRESENT) + if (code == CodeSystemContentMode.NULL) + return null; + if (code == CodeSystemContentMode.NOTPRESENT) return "not-present"; if (code == CodeSystemContentMode.EXAMPLE) return "example"; @@ -1949,7 +1977,7 @@ public class Enumerations { if (code == CodeSystemContentMode.SUPPLEMENT) return "supplement"; return "?"; - } + } public String toSystem(CodeSystemContentMode code) { return code.getSystem(); } @@ -3163,7 +3191,9 @@ public class Enumerations { throw new FHIRException("Unknown CommonLanguages code '"+codeString+"'"); } public String toCode(CommonLanguages code) { - if (code == CommonLanguages.AR) + if (code == CommonLanguages.NULL) + return null; + if (code == CommonLanguages.AR) return "ar"; if (code == CommonLanguages.BG) return "bg"; @@ -3328,7 +3358,7 @@ public class Enumerations { if (code == CommonLanguages.ZHTW) return "zh-TW"; return "?"; - } + } public String toSystem(CommonLanguages code) { return code.getSystem(); } @@ -3478,7 +3508,9 @@ public class Enumerations { throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); } public String toCode(CompartmentType code) { - if (code == CompartmentType.PATIENT) + if (code == CompartmentType.NULL) + return null; + if (code == CompartmentType.PATIENT) return "Patient"; if (code == CompartmentType.ENCOUNTER) return "Encounter"; @@ -3491,7 +3523,7 @@ public class Enumerations { if (code == CompartmentType.EPISODEOFCARE) return "EpisodeOfCare"; return "?"; - } + } public String toSystem(CompartmentType code) { return code.getSystem(); } @@ -3711,7 +3743,9 @@ public class Enumerations { throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'"); } public String toCode(CompositionStatus code) { - if (code == CompositionStatus.REGISTERED) + if (code == CompositionStatus.NULL) + return null; + if (code == CompositionStatus.REGISTERED) return "registered"; if (code == CompositionStatus.PARTIAL) return "partial"; @@ -3734,7 +3768,7 @@ public class Enumerations { if (code == CompositionStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(CompositionStatus code) { return code.getSystem(); } @@ -3881,7 +3915,9 @@ public class Enumerations { throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'"); } public String toCode(ConceptMapRelationship code) { - if (code == ConceptMapRelationship.RELATEDTO) + if (code == ConceptMapRelationship.NULL) + return null; + if (code == ConceptMapRelationship.RELATEDTO) return "related-to"; if (code == ConceptMapRelationship.EQUIVALENT) return "equivalent"; @@ -3892,7 +3928,7 @@ public class Enumerations { if (code == ConceptMapRelationship.NOTRELATEDTO) return "not-related-to"; return "?"; - } + } public String toSystem(ConceptMapRelationship code) { return code.getSystem(); } @@ -4014,7 +4050,9 @@ public class Enumerations { throw new FHIRException("Unknown ConsentDataMeaning code '"+codeString+"'"); } public String toCode(ConsentDataMeaning code) { - if (code == ConsentDataMeaning.INSTANCE) + if (code == ConsentDataMeaning.NULL) + return null; + if (code == ConsentDataMeaning.INSTANCE) return "instance"; if (code == ConsentDataMeaning.RELATED) return "related"; @@ -4023,7 +4061,7 @@ public class Enumerations { if (code == ConsentDataMeaning.AUTHOREDBY) return "authoredby"; return "?"; - } + } public String toSystem(ConsentDataMeaning code) { return code.getSystem(); } @@ -4117,12 +4155,14 @@ public class Enumerations { throw new FHIRException("Unknown ConsentProvisionType code '"+codeString+"'"); } public String toCode(ConsentProvisionType code) { - if (code == ConsentProvisionType.DENY) + if (code == ConsentProvisionType.NULL) + return null; + if (code == ConsentProvisionType.DENY) return "deny"; if (code == ConsentProvisionType.PERMIT) return "permit"; return "?"; - } + } public String toSystem(ConsentProvisionType code) { return code.getSystem(); } @@ -6736,7 +6776,9 @@ public class Enumerations { throw new FHIRException("Unknown Currencies code '"+codeString+"'"); } public String toCode(Currencies code) { - if (code == Currencies.AED) + if (code == Currencies.NULL) + return null; + if (code == Currencies.AED) return "AED"; if (code == Currencies.AFN) return "AFN"; @@ -7101,7 +7143,7 @@ public class Enumerations { if (code == Currencies.ZWL) return "ZWL"; return "?"; - } + } public String toSystem(Currencies code) { return code.getSystem(); } @@ -7265,7 +7307,9 @@ public class Enumerations { throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); } public String toCode(DaysOfWeek code) { - if (code == DaysOfWeek.MON) + if (code == DaysOfWeek.NULL) + return null; + if (code == DaysOfWeek.MON) return "mon"; if (code == DaysOfWeek.TUE) return "tue"; @@ -7280,7 +7324,7 @@ public class Enumerations { if (code == DaysOfWeek.SUN) return "sun"; return "?"; - } + } public String toSystem(DaysOfWeek code) { return code.getSystem(); } @@ -7388,14 +7432,16 @@ public class Enumerations { throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'"); } public String toCode(DeviceNameType code) { - if (code == DeviceNameType.REGISTEREDNAME) + if (code == DeviceNameType.NULL) + return null; + if (code == DeviceNameType.REGISTEREDNAME) return "registered-name"; if (code == DeviceNameType.USERFRIENDLYNAME) return "user-friendly-name"; if (code == DeviceNameType.PATIENTREPORTEDNAME) return "patient-reported-name"; return "?"; - } + } public String toSystem(DeviceNameType code) { return code.getSystem(); } @@ -7587,7 +7633,9 @@ public class Enumerations { throw new FHIRException("Unknown EncounterStatus code '"+codeString+"'"); } public String toCode(EncounterStatus code) { - if (code == EncounterStatus.PLANNED) + if (code == EncounterStatus.NULL) + return null; + if (code == EncounterStatus.PLANNED) return "planned"; if (code == EncounterStatus.INPROGRESS) return "in-progress"; @@ -7606,7 +7654,7 @@ public class Enumerations { if (code == EncounterStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(EncounterStatus code) { return code.getSystem(); } @@ -7784,7 +7832,9 @@ public class Enumerations { throw new FHIRException("Unknown EventStatus code '"+codeString+"'"); } public String toCode(EventStatus code) { - if (code == EventStatus.PREPARATION) + if (code == EventStatus.NULL) + return null; + if (code == EventStatus.PREPARATION) return "preparation"; if (code == EventStatus.INPROGRESS) return "in-progress"; @@ -7801,7 +7851,7 @@ public class Enumerations { if (code == EventStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(EventStatus code) { return code.getSystem(); } @@ -7923,7 +7973,9 @@ public class Enumerations { throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'"); } public String toCode(EvidenceVariableHandling code) { - if (code == EvidenceVariableHandling.CONTINUOUS) + if (code == EvidenceVariableHandling.NULL) + return null; + if (code == EvidenceVariableHandling.CONTINUOUS) return "continuous"; if (code == EvidenceVariableHandling.DICHOTOMOUS) return "dichotomous"; @@ -7932,7 +7984,7 @@ public class Enumerations { if (code == EvidenceVariableHandling.POLYCHOTOMOUS) return "polychotomous"; return "?"; - } + } public String toSystem(EvidenceVariableHandling code) { return code.getSystem(); } @@ -8026,12 +8078,14 @@ public class Enumerations { throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'"); } public String toCode(ExampleScenarioActorType code) { - if (code == ExampleScenarioActorType.PERSON) + if (code == ExampleScenarioActorType.NULL) + return null; + if (code == ExampleScenarioActorType.PERSON) return "person"; if (code == ExampleScenarioActorType.SYSTEM) return "system"; return "?"; - } + } public String toSystem(ExampleScenarioActorType code) { return code.getSystem(); } @@ -8055,7 +8109,7 @@ public class Enumerations { */ DATATYPE, /** - * Address Type: 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 which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. + * Address Type: 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 which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. The ISO21090-codedString may be used to provide a coded representation of the contents of strings in an Address. */ ADDRESS, @@ -8700,8 +8754,8 @@ The ISO21090-codedString may be used to provide a coded representation of the co */ MEDICATIONREQUEST, /** - * 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 sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. - + * 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 sources such as 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 medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medicationstatement 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, @@ -11334,7 +11388,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown FHIRTypes code '"+codeString+"'"); } public String toCode(FHIRTypes code) { - if (code == FHIRTypes.BASE) + if (code == FHIRTypes.NULL) + return null; + if (code == FHIRTypes.BASE) return "Base"; if (code == FHIRTypes.ELEMENT) return "Element"; @@ -11797,7 +11853,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == FHIRTypes.PARAMETERS) return "Parameters"; return "?"; - } + } public String toSystem(FHIRTypes code) { return code.getSystem(); } @@ -12717,7 +12773,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'"); } public String toCode(FHIRVersion code) { - if (code == FHIRVersion._0_01) + if (code == FHIRVersion.NULL) + return null; + if (code == FHIRVersion._0_01) return "0.01"; if (code == FHIRVersion._0_05) return "0.05"; @@ -12839,7 +12897,7 @@ The primary difference between a medicationstatement and a medicationadministrat return "6.0.0-ballot1"; } return "?"; - } + } public String toSystem(FHIRVersion code) { return code.getSystem(); } @@ -13059,7 +13117,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown FilterOperator code '"+codeString+"'"); } public String toCode(FilterOperator code) { - if (code == FilterOperator.EQUAL) + if (code == FilterOperator.NULL) + return null; + if (code == FilterOperator.EQUAL) return "="; if (code == FilterOperator.ISA) return "is-a"; @@ -13082,7 +13142,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == FilterOperator.EXISTS) return "exists"; return "?"; - } + } public String toSystem(FilterOperator code) { return code.getSystem(); } @@ -13204,7 +13264,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'"); } public String toCode(FinancialResourceStatusCodes code) { - if (code == FinancialResourceStatusCodes.ACTIVE) + if (code == FinancialResourceStatusCodes.NULL) + return null; + if (code == FinancialResourceStatusCodes.ACTIVE) return "active"; if (code == FinancialResourceStatusCodes.CANCELLED) return "cancelled"; @@ -13213,7 +13275,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == FinancialResourceStatusCodes.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(FinancialResourceStatusCodes code) { return code.getSystem(); } @@ -13321,14 +13383,16 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown ListMode code '"+codeString+"'"); } public String toCode(ListMode code) { - if (code == ListMode.WORKING) + if (code == ListMode.NULL) + return null; + if (code == ListMode.WORKING) return "working"; if (code == ListMode.SNAPSHOT) return "snapshot"; if (code == ListMode.CHANGES) return "changes"; return "?"; - } + } public String toSystem(ListMode code) { return code.getSystem(); } @@ -13422,12 +13486,14 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'"); } public String toCode(MeasureImprovementNotation code) { - if (code == MeasureImprovementNotation.INCREASE) + if (code == MeasureImprovementNotation.NULL) + return null; + if (code == MeasureImprovementNotation.INCREASE) return "increase"; if (code == MeasureImprovementNotation.DECREASE) return "decrease"; return "?"; - } + } public String toSystem(MeasureImprovementNotation code) { return code.getSystem(); } @@ -13493,8 +13559,10 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown MimeTypes code '"+codeString+"'"); } public String toCode(MimeTypes code) { - return "?"; - } + if (code == MimeTypes.NULL) + return null; + return "?"; + } public String toSystem(MimeTypes code) { return code.getSystem(); } @@ -13672,7 +13740,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'"); } public String toCode(ObservationStatus code) { - if (code == ObservationStatus.REGISTERED) + if (code == ObservationStatus.NULL) + return null; + if (code == ObservationStatus.REGISTERED) return "registered"; if (code == ObservationStatus.PRELIMINARY) return "preliminary"; @@ -13689,7 +13759,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == ObservationStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(ObservationStatus code) { return code.getSystem(); } @@ -13783,12 +13853,14 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); } public String toCode(OperationParameterUse code) { - if (code == OperationParameterUse.IN) + if (code == OperationParameterUse.NULL) + return null; + if (code == OperationParameterUse.IN) return "in"; if (code == OperationParameterUse.OUT) return "out"; return "?"; - } + } public String toSystem(OperationParameterUse code) { return code.getSystem(); } @@ -13910,7 +13982,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'"); } public String toCode(PublicationStatus code) { - if (code == PublicationStatus.DRAFT) + if (code == PublicationStatus.NULL) + return null; + if (code == PublicationStatus.DRAFT) return "draft"; if (code == PublicationStatus.ACTIVE) return "active"; @@ -13919,7 +13993,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == PublicationStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(PublicationStatus code) { return code.getSystem(); } @@ -14055,7 +14129,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'"); } public String toCode(QuantityComparator code) { - if (code == QuantityComparator.LESS_THAN) + if (code == QuantityComparator.NULL) + return null; + if (code == QuantityComparator.LESS_THAN) return "<"; if (code == QuantityComparator.LESS_OR_EQUAL) return "<="; @@ -14066,7 +14142,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == QuantityComparator.AD) return "ad"; return "?"; - } + } public String toSystem(QuantityComparator code) { return code.getSystem(); } @@ -14258,7 +14334,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); } public String toCode(RequestIntent code) { - if (code == RequestIntent.PROPOSAL) + if (code == RequestIntent.NULL) + return null; + if (code == RequestIntent.PROPOSAL) return "proposal"; if (code == RequestIntent.PLAN) return "plan"; @@ -14277,7 +14355,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == RequestIntent.OPTION) return "option"; return "?"; - } + } public String toSystem(RequestIntent code) { return code.getSystem(); } @@ -14399,7 +14477,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); } public String toCode(RequestPriority code) { - if (code == RequestPriority.ROUTINE) + if (code == RequestPriority.NULL) + return null; + if (code == RequestPriority.ROUTINE) return "routine"; if (code == RequestPriority.URGENT) return "urgent"; @@ -14408,7 +14488,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == RequestPriority.STAT) return "stat"; return "?"; - } + } public String toSystem(RequestPriority code) { return code.getSystem(); } @@ -14572,7 +14652,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); } public String toCode(RequestStatus code) { - if (code == RequestStatus.DRAFT) + if (code == RequestStatus.NULL) + return null; + if (code == RequestStatus.DRAFT) return "draft"; if (code == RequestStatus.ACTIVE) return "active"; @@ -14587,7 +14669,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == RequestStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(RequestStatus code) { return code.getSystem(); } @@ -14967,8 +15049,8 @@ The primary difference between a medicationstatement and a medicationadministrat */ MEDICATIONREQUEST, /** - * 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 sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. - + * 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 sources such as 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 medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medicationstatement 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, @@ -16867,7 +16949,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown ResourceTypeEnum code '"+codeString+"'"); } public String toCode(ResourceTypeEnum code) { - if (code == ResourceTypeEnum.ACCOUNT) + if (code == ResourceTypeEnum.NULL) + return null; + if (code == ResourceTypeEnum.ACCOUNT) return "Account"; if (code == ResourceTypeEnum.ACTIVITYDEFINITION) return "ActivityDefinition"; @@ -17184,7 +17268,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == ResourceTypeEnum.VISIONPRESCRIPTION) return "VisionPrescription"; return "?"; - } + } public String toSystem(ResourceTypeEnum code) { return code.getSystem(); } @@ -17376,7 +17460,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown SearchComparator code '"+codeString+"'"); } public String toCode(SearchComparator code) { - if (code == SearchComparator.EQ) + if (code == SearchComparator.NULL) + return null; + if (code == SearchComparator.EQ) return "eq"; if (code == SearchComparator.NE) return "ne"; @@ -17395,7 +17481,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == SearchComparator.AP) return "ap"; return "?"; - } + } public String toSystem(SearchComparator code) { return code.getSystem(); } @@ -17671,7 +17757,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); } public String toCode(SearchModifierCode code) { - if (code == SearchModifierCode.MISSING) + if (code == SearchModifierCode.NULL) + return null; + if (code == SearchModifierCode.MISSING) return "missing"; if (code == SearchModifierCode.EXACT) return "exact"; @@ -17702,7 +17790,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == SearchModifierCode.ITERATE) return "iterate"; return "?"; - } + } public String toSystem(SearchModifierCode code) { return code.getSystem(); } @@ -17894,7 +17982,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown SearchParamType code '"+codeString+"'"); } public String toCode(SearchParamType code) { - if (code == SearchParamType.NUMBER) + if (code == SearchParamType.NULL) + return null; + if (code == SearchParamType.NUMBER) return "number"; if (code == SearchParamType.DATE) return "date"; @@ -17913,7 +18003,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == SearchParamType.SPECIAL) return "special"; return "?"; - } + } public String toSystem(SearchParamType code) { return code.getSystem(); } @@ -18049,7 +18139,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown SubscriptionStatusCodes code '"+codeString+"'"); } public String toCode(SubscriptionStatusCodes code) { - if (code == SubscriptionStatusCodes.REQUESTED) + if (code == SubscriptionStatusCodes.NULL) + return null; + if (code == SubscriptionStatusCodes.REQUESTED) return "requested"; if (code == SubscriptionStatusCodes.ACTIVE) return "active"; @@ -18060,7 +18152,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == SubscriptionStatusCodes.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(SubscriptionStatusCodes code) { return code.getSystem(); } @@ -18168,14 +18260,16 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown Use code '"+codeString+"'"); } public String toCode(Use code) { - if (code == Use.CLAIM) + if (code == Use.NULL) + return null; + if (code == Use.CLAIM) return "claim"; if (code == Use.PREAUTHORIZATION) return "preauthorization"; if (code == Use.PREDETERMINATION) return "predetermination"; return "?"; - } + } public String toSystem(Use code) { return code.getSystem(); } @@ -18563,8 +18657,8 @@ The primary difference between a medicationstatement and a medicationadministrat */ MEDICATIONREQUEST, /** - * 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 sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. - + * 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 sources such as 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 medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medicationstatement 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, @@ -21085,7 +21179,9 @@ The primary difference between a medicationstatement and a medicationadministrat throw new FHIRException("Unknown VersionIndependentResourceTypesAll code '"+codeString+"'"); } public String toCode(VersionIndependentResourceTypesAll code) { - if (code == VersionIndependentResourceTypesAll.ACCOUNT) + if (code == VersionIndependentResourceTypesAll.NULL) + return null; + if (code == VersionIndependentResourceTypesAll.ACCOUNT) return "Account"; if (code == VersionIndependentResourceTypesAll.ACTIVITYDEFINITION) return "ActivityDefinition"; @@ -21492,7 +21588,7 @@ The primary difference between a medicationstatement and a medicationadministrat if (code == VersionIndependentResourceTypesAll.SUBSTANCESPECIFICATION) return "SubstanceSpecification"; return "?"; - } + } public String toSystem(VersionIndependentResourceTypesAll code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EpisodeOfCare.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EpisodeOfCare.java index e74c84aa6..ae2fa2c35 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EpisodeOfCare.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EpisodeOfCare.java @@ -208,7 +208,9 @@ public class EpisodeOfCare extends DomainResource { throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); } public String toCode(EpisodeOfCareStatus code) { - if (code == EpisodeOfCareStatus.PLANNED) + if (code == EpisodeOfCareStatus.NULL) + return null; + if (code == EpisodeOfCareStatus.PLANNED) return "planned"; if (code == EpisodeOfCareStatus.WAITLIST) return "waitlist"; @@ -223,7 +225,7 @@ public class EpisodeOfCare extends DomainResource { if (code == EpisodeOfCareStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(EpisodeOfCareStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceReport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceReport.java index 81d33272c..a9461bae4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceReport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceReport.java @@ -222,7 +222,9 @@ public class EvidenceReport extends MetadataResource { throw new FHIRException("Unknown ReportRelationshipType code '"+codeString+"'"); } public String toCode(ReportRelationshipType code) { - if (code == ReportRelationshipType.REPLACES) + if (code == ReportRelationshipType.NULL) + return null; + if (code == ReportRelationshipType.REPLACES) return "replaces"; if (code == ReportRelationshipType.AMENDS) return "amends"; @@ -239,7 +241,7 @@ public class EvidenceReport extends MetadataResource { if (code == ReportRelationshipType.TRANSFORMEDWITH) return "transformedWith"; return "?"; - } + } public String toSystem(ReportRelationshipType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceVariable.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceVariable.java index 513a8b363..03c5c9458 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceVariable.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/EvidenceVariable.java @@ -208,7 +208,9 @@ public class EvidenceVariable extends MetadataResource { throw new FHIRException("Unknown CharacteristicCombination code '"+codeString+"'"); } public String toCode(CharacteristicCombination code) { - if (code == CharacteristicCombination.ALLOF) + if (code == CharacteristicCombination.NULL) + return null; + if (code == CharacteristicCombination.ALLOF) return "all-of"; if (code == CharacteristicCombination.ANYOF) return "any-of"; @@ -223,7 +225,7 @@ public class EvidenceVariable extends MetadataResource { if (code == CharacteristicCombination.DATASET) return "dataset"; return "?"; - } + } public String toSystem(CharacteristicCombination code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExplanationOfBenefit.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExplanationOfBenefit.java index 4fa512a2f..70360eadf 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExplanationOfBenefit.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExplanationOfBenefit.java @@ -167,7 +167,9 @@ public class ExplanationOfBenefit extends DomainResource { throw new FHIRException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); } public String toCode(ExplanationOfBenefitStatus code) { - if (code == ExplanationOfBenefitStatus.ACTIVE) + if (code == ExplanationOfBenefitStatus.NULL) + return null; + if (code == ExplanationOfBenefitStatus.ACTIVE) return "active"; if (code == ExplanationOfBenefitStatus.CANCELLED) return "cancelled"; @@ -176,7 +178,7 @@ public class ExplanationOfBenefit extends DomainResource { if (code == ExplanationOfBenefitStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(ExplanationOfBenefitStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FamilyMemberHistory.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FamilyMemberHistory.java index be24ad376..857dd0329 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FamilyMemberHistory.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FamilyMemberHistory.java @@ -166,7 +166,9 @@ public class FamilyMemberHistory extends DomainResource { throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'"); } public String toCode(FamilyHistoryStatus code) { - if (code == FamilyHistoryStatus.PARTIAL) + if (code == FamilyHistoryStatus.NULL) + return null; + if (code == FamilyHistoryStatus.PARTIAL) return "partial"; if (code == FamilyHistoryStatus.COMPLETED) return "completed"; @@ -175,7 +177,7 @@ public class FamilyMemberHistory extends DomainResource { if (code == FamilyHistoryStatus.HEALTHUNKNOWN) return "health-unknown"; return "?"; - } + } public String toSystem(FamilyHistoryStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Flag.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Flag.java index 6c658067b..d9256ca08 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Flag.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Flag.java @@ -152,14 +152,16 @@ public class Flag extends DomainResource { throw new FHIRException("Unknown FlagStatus code '"+codeString+"'"); } public String toCode(FlagStatus code) { - if (code == FlagStatus.ACTIVE) + if (code == FlagStatus.NULL) + return null; + if (code == FlagStatus.ACTIVE) return "active"; if (code == FlagStatus.INACTIVE) return "inactive"; if (code == FlagStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(FlagStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FormularyItem.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FormularyItem.java index 94a480930..f9989b445 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FormularyItem.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/FormularyItem.java @@ -152,14 +152,16 @@ public class FormularyItem extends DomainResource { throw new FHIRException("Unknown FormularyItemStatusCodes code '"+codeString+"'"); } public String toCode(FormularyItemStatusCodes code) { - if (code == FormularyItemStatusCodes.ACTIVE) + if (code == FormularyItemStatusCodes.NULL) + return null; + if (code == FormularyItemStatusCodes.ACTIVE) return "active"; if (code == FormularyItemStatusCodes.ENTEREDINERROR) return "entered-in-error"; if (code == FormularyItemStatusCodes.INACTIVE) return "inactive"; return "?"; - } + } public String toSystem(FormularyItemStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GenomicStudy.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GenomicStudy.java index f53f77238..0f87fe337 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GenomicStudy.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GenomicStudy.java @@ -180,7 +180,9 @@ public class GenomicStudy extends DomainResource { throw new FHIRException("Unknown GenomicStudyStatus code '"+codeString+"'"); } public String toCode(GenomicStudyStatus code) { - if (code == GenomicStudyStatus.REGISTERED) + if (code == GenomicStudyStatus.NULL) + return null; + if (code == GenomicStudyStatus.REGISTERED) return "registered"; if (code == GenomicStudyStatus.AVAILABLE) return "available"; @@ -191,7 +193,7 @@ public class GenomicStudy extends DomainResource { if (code == GenomicStudyStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(GenomicStudyStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Goal.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Goal.java index 232d9c5c7..f79a84b50 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Goal.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Goal.java @@ -236,7 +236,9 @@ public class Goal extends DomainResource { throw new FHIRException("Unknown GoalLifecycleStatus code '"+codeString+"'"); } public String toCode(GoalLifecycleStatus code) { - if (code == GoalLifecycleStatus.PROPOSED) + if (code == GoalLifecycleStatus.NULL) + return null; + if (code == GoalLifecycleStatus.PROPOSED) return "proposed"; if (code == GoalLifecycleStatus.PLANNED) return "planned"; @@ -255,7 +257,7 @@ public class Goal extends DomainResource { if (code == GoalLifecycleStatus.REJECTED) return "rejected"; return "?"; - } + } public String toSystem(GoalLifecycleStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GraphDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GraphDefinition.java index b61462aea..1347b2ad3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GraphDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GraphDefinition.java @@ -166,7 +166,9 @@ public class GraphDefinition extends CanonicalResource { throw new FHIRException("Unknown GraphCompartmentRule code '"+codeString+"'"); } public String toCode(GraphCompartmentRule code) { - if (code == GraphCompartmentRule.IDENTICAL) + if (code == GraphCompartmentRule.NULL) + return null; + if (code == GraphCompartmentRule.IDENTICAL) return "identical"; if (code == GraphCompartmentRule.MATCHING) return "matching"; @@ -175,7 +177,7 @@ public class GraphDefinition extends CanonicalResource { if (code == GraphCompartmentRule.CUSTOM) return "custom"; return "?"; - } + } public String toSystem(GraphCompartmentRule code) { return code.getSystem(); } @@ -266,12 +268,14 @@ public class GraphDefinition extends CanonicalResource { throw new FHIRException("Unknown GraphCompartmentUse code '"+codeString+"'"); } public String toCode(GraphCompartmentUse code) { - if (code == GraphCompartmentUse.WHERE) + if (code == GraphCompartmentUse.NULL) + return null; + if (code == GraphCompartmentUse.WHERE) return "where"; if (code == GraphCompartmentUse.REQUIRES) return "requires"; return "?"; - } + } public String toSystem(GraphCompartmentUse code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Group.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Group.java index ff6b16027..02461dd3c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Group.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Group.java @@ -138,12 +138,14 @@ public class Group extends DomainResource { throw new FHIRException("Unknown GroupMembershipBasis code '"+codeString+"'"); } public String toCode(GroupMembershipBasis code) { - if (code == GroupMembershipBasis.DEFINITIONAL) + if (code == GroupMembershipBasis.NULL) + return null; + if (code == GroupMembershipBasis.DEFINITIONAL) return "definitional"; if (code == GroupMembershipBasis.ENUMERATED) return "enumerated"; return "?"; - } + } public String toSystem(GroupMembershipBasis code) { return code.getSystem(); } @@ -346,7 +348,9 @@ public class Group extends DomainResource { throw new FHIRException("Unknown GroupType code '"+codeString+"'"); } public String toCode(GroupType code) { - if (code == GroupType.PERSON) + if (code == GroupType.NULL) + return null; + if (code == GroupType.PERSON) return "person"; if (code == GroupType.ANIMAL) return "animal"; @@ -367,7 +371,7 @@ public class Group extends DomainResource { if (code == GroupType.SPECIMEN) return "specimen"; return "?"; - } + } public String toSystem(GroupType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GuidanceResponse.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GuidanceResponse.java index 46f849004..0fa1e50ab 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GuidanceResponse.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/GuidanceResponse.java @@ -194,7 +194,9 @@ public class GuidanceResponse extends DomainResource { throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'"); } public String toCode(GuidanceResponseStatus code) { - if (code == GuidanceResponseStatus.SUCCESS) + if (code == GuidanceResponseStatus.NULL) + return null; + if (code == GuidanceResponseStatus.SUCCESS) return "success"; if (code == GuidanceResponseStatus.DATAREQUESTED) return "data-requested"; @@ -207,7 +209,7 @@ public class GuidanceResponse extends DomainResource { if (code == GuidanceResponseStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(GuidanceResponseStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/HumanName.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/HumanName.java index c51f54468..affdf088b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/HumanName.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/HumanName.java @@ -208,7 +208,9 @@ public class HumanName extends DataType implements ICompositeType { throw new FHIRException("Unknown NameUse code '"+codeString+"'"); } public String toCode(NameUse code) { - if (code == NameUse.USUAL) + if (code == NameUse.NULL) + return null; + if (code == NameUse.USUAL) return "usual"; if (code == NameUse.OFFICIAL) return "official"; @@ -223,7 +225,7 @@ public class HumanName extends DataType implements ICompositeType { if (code == NameUse.MAIDEN) return "maiden"; return "?"; - } + } public String toSystem(NameUse code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Identifier.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Identifier.java index 0a026584f..51dc473e4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Identifier.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Identifier.java @@ -178,7 +178,9 @@ public class Identifier extends DataType implements ICompositeType { throw new FHIRException("Unknown IdentifierUse code '"+codeString+"'"); } public String toCode(IdentifierUse code) { - if (code == IdentifierUse.USUAL) + if (code == IdentifierUse.NULL) + return null; + if (code == IdentifierUse.USUAL) return "usual"; if (code == IdentifierUse.OFFICIAL) return "official"; @@ -189,7 +191,7 @@ public class Identifier extends DataType implements ICompositeType { if (code == IdentifierUse.OLD) return "old"; return "?"; - } + } public String toSystem(IdentifierUse code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingSelection.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingSelection.java index 421b2bd3b..50c4ee37e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingSelection.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingSelection.java @@ -181,7 +181,9 @@ public class ImagingSelection extends DomainResource { throw new FHIRException("Unknown ImagingSelection2DGraphicType code '"+codeString+"'"); } public String toCode(ImagingSelection2DGraphicType code) { - if (code == ImagingSelection2DGraphicType.POINT) + if (code == ImagingSelection2DGraphicType.NULL) + return null; + if (code == ImagingSelection2DGraphicType.POINT) return "point"; if (code == ImagingSelection2DGraphicType.POLYLINE) return "polyline"; @@ -192,7 +194,7 @@ public class ImagingSelection extends DomainResource { if (code == ImagingSelection2DGraphicType.ELLIPSE) return "ellipse"; return "?"; - } + } public String toSystem(ImagingSelection2DGraphicType code) { return code.getSystem(); } @@ -339,7 +341,9 @@ public class ImagingSelection extends DomainResource { throw new FHIRException("Unknown ImagingSelection3DGraphicType code '"+codeString+"'"); } public String toCode(ImagingSelection3DGraphicType code) { - if (code == ImagingSelection3DGraphicType.POINT) + if (code == ImagingSelection3DGraphicType.NULL) + return null; + if (code == ImagingSelection3DGraphicType.POINT) return "point"; if (code == ImagingSelection3DGraphicType.MULTIPOINT) return "multipoint"; @@ -352,7 +356,7 @@ public class ImagingSelection extends DomainResource { if (code == ImagingSelection3DGraphicType.ELLIPSOID) return "ellipsoid"; return "?"; - } + } public String toSystem(ImagingSelection3DGraphicType code) { return code.getSystem(); } @@ -457,14 +461,16 @@ public class ImagingSelection extends DomainResource { throw new FHIRException("Unknown ImagingSelectionStatus code '"+codeString+"'"); } public String toCode(ImagingSelectionStatus code) { - if (code == ImagingSelectionStatus.AVAILABLE) + if (code == ImagingSelectionStatus.NULL) + return null; + if (code == ImagingSelectionStatus.AVAILABLE) return "available"; if (code == ImagingSelectionStatus.ENTEREDINERROR) return "entered-in-error"; if (code == ImagingSelectionStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(ImagingSelectionStatus code) { return code.getSystem(); } @@ -708,11 +714,11 @@ public class ImagingSelection extends DomainResource { protected Coding sopClass; /** - * Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. - May be one of: - - A list of frame numbers selected from a multiframe SOP Instance. - - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. - - A list of segment numbers selected from a segmentation SOP Instance. + * Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. + May be one of: + - A list of frame numbers selected from a multiframe SOP Instance. + - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. + - A list of segment numbers selected from a segmentation SOP Instance. - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance. */ @Child(name = "subset", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @@ -720,7 +726,7 @@ public class ImagingSelection extends DomainResource { protected List subset; /** - * Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates. + * Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates. If the parent imagingSelection.instance contains a subset element of type frame, the image region applies to all frames in the subset list. */ @Child(name = "imageRegion2D", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @@ -866,11 +872,11 @@ public class ImagingSelection extends DomainResource { } /** - * @return {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. - May be one of: - - A list of frame numbers selected from a multiframe SOP Instance. - - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. - - A list of segment numbers selected from a segmentation SOP Instance. + * @return {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. + May be one of: + - A list of frame numbers selected from a multiframe SOP Instance. + - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. + - A list of segment numbers selected from a segmentation SOP Instance. - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance.) */ public List getSubset() { @@ -897,11 +903,11 @@ public class ImagingSelection extends DomainResource { } /** - * @return {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. - May be one of: - - A list of frame numbers selected from a multiframe SOP Instance. - - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. - - A list of segment numbers selected from a segmentation SOP Instance. + * @return {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. + May be one of: + - A list of frame numbers selected from a multiframe SOP Instance. + - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. + - A list of segment numbers selected from a segmentation SOP Instance. - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance.) */ public StringType addSubsetElement() {//2 @@ -913,11 +919,11 @@ public class ImagingSelection extends DomainResource { } /** - * @param value {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. - May be one of: - - A list of frame numbers selected from a multiframe SOP Instance. - - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. - - A list of segment numbers selected from a segmentation SOP Instance. + * @param value {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. + May be one of: + - A list of frame numbers selected from a multiframe SOP Instance. + - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. + - A list of segment numbers selected from a segmentation SOP Instance. - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance.) */ public ImagingSelectionInstanceComponent addSubset(String value) { //1 @@ -930,11 +936,11 @@ public class ImagingSelection extends DomainResource { } /** - * @param value {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. - May be one of: - - A list of frame numbers selected from a multiframe SOP Instance. - - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. - - A list of segment numbers selected from a segmentation SOP Instance. + * @param value {@link #subset} (Selected subset of the SOP Instance. The content and format of the subset item is determined by the SOP Class of the selected instance. + May be one of: + - A list of frame numbers selected from a multiframe SOP Instance. + - A list of Content Item Observation UID values selected from a DICOM SR or other structured document SOP Instance. + - A list of segment numbers selected from a segmentation SOP Instance. - A list of Region of Interest (ROI) numbers selected from a radiotherapy structure set SOP Instance.) */ public boolean hasSubset(String value) { @@ -947,7 +953,7 @@ public class ImagingSelection extends DomainResource { } /** - * @return {@link #imageRegion2D} (Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates. + * @return {@link #imageRegion2D} (Each imaging selection instance or frame list might includes an image region, specified by a region type and a set of 2D coordinates. If the parent imagingSelection.instance contains a subset element of type frame, the image region applies to all frames in the subset list.) */ public List getImageRegion2D() { @@ -1282,7 +1288,7 @@ public class ImagingSelection extends DomainResource { protected Enumeration regionType; /** - * The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. + * The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values must be within the range 0\0 to the number of columns\rows in the image / frames. */ @Child(name = "coordinate", type = {DecimalType.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @@ -1353,7 +1359,7 @@ public class ImagingSelection extends DomainResource { } /** - * @return {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. + * @return {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values must be within the range 0\0 to the number of columns\rows in the image / frames.) */ public List getCoordinate() { @@ -1380,7 +1386,7 @@ public class ImagingSelection extends DomainResource { } /** - * @return {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. + * @return {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values must be within the range 0\0 to the number of columns\rows in the image / frames.) */ public DecimalType addCoordinateElement() {//2 @@ -1392,7 +1398,7 @@ public class ImagingSelection extends DomainResource { } /** - * @param value {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. + * @param value {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values must be within the range 0\0 to the number of columns\rows in the image / frames.) */ public ImageRegion2DComponent addCoordinate(BigDecimal value) { //1 @@ -1405,7 +1411,7 @@ public class ImagingSelection extends DomainResource { } /** - * @param value {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. + * @param value {@link #coordinate} (The coordinates describing the image region. Encoded as a set of (column, row) pairs that denote positions in the selected image / frames specified with sub-pixel resolution. The origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is the number of columns\rows in the image / frames. The values must be within the range 0\0 to the number of columns\rows in the image / frames.) */ public boolean hasCoordinate(BigDecimal value) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingStudy.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingStudy.java index 22cdf32f2..ee549735b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingStudy.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImagingStudy.java @@ -180,7 +180,9 @@ public class ImagingStudy extends DomainResource { throw new FHIRException("Unknown ImagingStudyStatus code '"+codeString+"'"); } public String toCode(ImagingStudyStatus code) { - if (code == ImagingStudyStatus.REGISTERED) + if (code == ImagingStudyStatus.NULL) + return null; + if (code == ImagingStudyStatus.REGISTERED) return "registered"; if (code == ImagingStudyStatus.AVAILABLE) return "available"; @@ -191,7 +193,7 @@ public class ImagingStudy extends DomainResource { if (code == ImagingStudyStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(ImagingStudyStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Immunization.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Immunization.java index 26832d780..2cd3ecd6d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Immunization.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Immunization.java @@ -152,14 +152,16 @@ public class Immunization extends DomainResource { throw new FHIRException("Unknown ImmunizationStatusCodes code '"+codeString+"'"); } public String toCode(ImmunizationStatusCodes code) { - if (code == ImmunizationStatusCodes.COMPLETED) + if (code == ImmunizationStatusCodes.NULL) + return null; + if (code == ImmunizationStatusCodes.COMPLETED) return "completed"; if (code == ImmunizationStatusCodes.ENTEREDINERROR) return "entered-in-error"; if (code == ImmunizationStatusCodes.NOTDONE) return "not-done"; return "?"; - } + } public String toSystem(ImmunizationStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImmunizationEvaluation.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImmunizationEvaluation.java index 98dbb8cc8..6eaf3d18b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImmunizationEvaluation.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImmunizationEvaluation.java @@ -138,12 +138,14 @@ public class ImmunizationEvaluation extends DomainResource { throw new FHIRException("Unknown ImmunizationEvaluationStatusCodes code '"+codeString+"'"); } public String toCode(ImmunizationEvaluationStatusCodes code) { - if (code == ImmunizationEvaluationStatusCodes.COMPLETED) + if (code == ImmunizationEvaluationStatusCodes.NULL) + return null; + if (code == ImmunizationEvaluationStatusCodes.COMPLETED) return "completed"; if (code == ImmunizationEvaluationStatusCodes.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(ImmunizationEvaluationStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImplementationGuide.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImplementationGuide.java index 24f9600e1..521b77a02 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImplementationGuide.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ImplementationGuide.java @@ -166,7 +166,9 @@ public class ImplementationGuide extends CanonicalResource { throw new FHIRException("Unknown GuidePageGeneration code '"+codeString+"'"); } public String toCode(GuidePageGeneration code) { - if (code == GuidePageGeneration.HTML) + if (code == GuidePageGeneration.NULL) + return null; + if (code == GuidePageGeneration.HTML) return "html"; if (code == GuidePageGeneration.MARKDOWN) return "markdown"; @@ -175,7 +177,7 @@ public class ImplementationGuide extends CanonicalResource { if (code == GuidePageGeneration.GENERATED) return "generated"; return "?"; - } + } public String toSystem(GuidePageGeneration code) { return code.getSystem(); } @@ -8053,7 +8055,9 @@ public class ImplementationGuide extends CanonicalResource { throw new FHIRException("Unknown SPDXLicense code '"+codeString+"'"); } public String toCode(SPDXLicense code) { - if (code == SPDXLicense._0BSD) + if (code == SPDXLicense.NULL) + return null; + if (code == SPDXLicense._0BSD) return "0BSD"; if (code == SPDXLicense.AAL) return "AAL"; @@ -9170,7 +9174,7 @@ public class ImplementationGuide extends CanonicalResource { if (code == SPDXLicense.ZPL_2_1) return "ZPL-2.1"; return "?"; - } + } public String toSystem(SPDXLicense code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Ingredient.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Ingredient.java index faf0f4150..4951491b0 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Ingredient.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Ingredient.java @@ -152,14 +152,16 @@ public class Ingredient extends DomainResource { throw new FHIRException("Unknown IngredientManufacturerRole code '"+codeString+"'"); } public String toCode(IngredientManufacturerRole code) { - if (code == IngredientManufacturerRole.ALLOWED) + if (code == IngredientManufacturerRole.NULL) + return null; + if (code == IngredientManufacturerRole.ALLOWED) return "allowed"; if (code == IngredientManufacturerRole.POSSIBLE) return "possible"; if (code == IngredientManufacturerRole.ACTUAL) return "actual"; return "?"; - } + } public String toSystem(IngredientManufacturerRole code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryItem.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryItem.java index 0fa7af9f8..c70a67c78 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryItem.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryItem.java @@ -166,7 +166,9 @@ public class InventoryItem extends DomainResource { throw new FHIRException("Unknown InventoryItemStatusCodes code '"+codeString+"'"); } public String toCode(InventoryItemStatusCodes code) { - if (code == InventoryItemStatusCodes.ACTIVE) + if (code == InventoryItemStatusCodes.NULL) + return null; + if (code == InventoryItemStatusCodes.ACTIVE) return "active"; if (code == InventoryItemStatusCodes.INACTIVE) return "inactive"; @@ -175,7 +177,7 @@ public class InventoryItem extends DomainResource { if (code == InventoryItemStatusCodes.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(InventoryItemStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryReport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryReport.java index df600b1ac..9ec7bea62 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryReport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/InventoryReport.java @@ -138,12 +138,14 @@ public class InventoryReport extends DomainResource { throw new FHIRException("Unknown InventoryCountType code '"+codeString+"'"); } public String toCode(InventoryCountType code) { - if (code == InventoryCountType.SNAPSHOT) + if (code == InventoryCountType.NULL) + return null; + if (code == InventoryCountType.SNAPSHOT) return "snapshot"; if (code == InventoryCountType.DIFFERENCE) return "difference"; return "?"; - } + } public String toSystem(InventoryCountType code) { return code.getSystem(); } @@ -262,7 +264,9 @@ public class InventoryReport extends DomainResource { throw new FHIRException("Unknown InventoryReportStatus code '"+codeString+"'"); } public String toCode(InventoryReportStatus code) { - if (code == InventoryReportStatus.DRAFT) + if (code == InventoryReportStatus.NULL) + return null; + if (code == InventoryReportStatus.DRAFT) return "draft"; if (code == InventoryReportStatus.REQUESTED) return "requested"; @@ -271,7 +275,7 @@ public class InventoryReport extends DomainResource { if (code == InventoryReportStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(InventoryReportStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Invoice.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Invoice.java index b7843c30a..b4b9e2a35 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Invoice.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Invoice.java @@ -180,7 +180,9 @@ public class Invoice extends DomainResource { throw new FHIRException("Unknown InvoiceStatus code '"+codeString+"'"); } public String toCode(InvoiceStatus code) { - if (code == InvoiceStatus.DRAFT) + if (code == InvoiceStatus.NULL) + return null; + if (code == InvoiceStatus.DRAFT) return "draft"; if (code == InvoiceStatus.ISSUED) return "issued"; @@ -191,7 +193,7 @@ public class Invoice extends DomainResource { if (code == InvoiceStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(InvoiceStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Linkage.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Linkage.java index dc1f89a37..e5aad67a6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Linkage.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Linkage.java @@ -152,14 +152,16 @@ public class Linkage extends DomainResource { throw new FHIRException("Unknown LinkageType code '"+codeString+"'"); } public String toCode(LinkageType code) { - if (code == LinkageType.SOURCE) + if (code == LinkageType.NULL) + return null; + if (code == LinkageType.SOURCE) return "source"; if (code == LinkageType.ALTERNATE) return "alternate"; if (code == LinkageType.HISTORICAL) return "historical"; return "?"; - } + } public String toSystem(LinkageType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java index a2c2d3d57..7e2d0a4ac 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java @@ -152,14 +152,16 @@ public class ListResource extends DomainResource { throw new FHIRException("Unknown ListStatus code '"+codeString+"'"); } public String toCode(ListStatus code) { - if (code == ListStatus.CURRENT) + if (code == ListStatus.NULL) + return null; + if (code == ListStatus.CURRENT) return "current"; if (code == ListStatus.RETIRED) return "retired"; if (code == ListStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(ListStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Location.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Location.java index 203099d58..904f7269d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Location.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Location.java @@ -1,2390 +1,2398 @@ -package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.math.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.r5.model.Enumerations.*; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Block; - -/** - * Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated. - */ -@ResourceDef(name="Location", profile="http://hl7.org/fhir/StructureDefinition/Location") -public class Location extends DomainResource { - - public enum LocationMode { - /** - * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). - */ - INSTANCE, - /** - * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). - */ - KIND, - /** - * added to help the parsers with the generic types - */ - NULL; - public static LocationMode fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("instance".equals(codeString)) - return INSTANCE; - if ("kind".equals(codeString)) - return KIND; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case INSTANCE: return "instance"; - case KIND: return "kind"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case INSTANCE: return "http://hl7.org/fhir/location-mode"; - case KIND: return "http://hl7.org/fhir/location-mode"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; - case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.)."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case INSTANCE: return "Instance"; - case KIND: return "Kind"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class LocationModeEnumFactory implements EnumFactory { - public LocationMode fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("instance".equals(codeString)) - return LocationMode.INSTANCE; - if ("kind".equals(codeString)) - return LocationMode.KIND; - throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, LocationMode.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, LocationMode.NULL, code); - if ("instance".equals(codeString)) - return new Enumeration(this, LocationMode.INSTANCE, code); - if ("kind".equals(codeString)) - return new Enumeration(this, LocationMode.KIND, code); - throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); - } - public String toCode(LocationMode code) { - if (code == LocationMode.INSTANCE) - return "instance"; - if (code == LocationMode.KIND) - return "kind"; - return "?"; - } - public String toSystem(LocationMode code) { - return code.getSystem(); - } - } - - public enum LocationStatus { - /** - * The location is operational. - */ - ACTIVE, - /** - * The location is temporarily closed. - */ - SUSPENDED, - /** - * The location is no longer used. - */ - INACTIVE, - /** - * added to help the parsers with the generic types - */ - NULL; - public static LocationStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return ACTIVE; - if ("suspended".equals(codeString)) - return SUSPENDED; - if ("inactive".equals(codeString)) - return INACTIVE; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACTIVE: return "active"; - case SUSPENDED: return "suspended"; - case INACTIVE: return "inactive"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ACTIVE: return "http://hl7.org/fhir/location-status"; - case SUSPENDED: return "http://hl7.org/fhir/location-status"; - case INACTIVE: return "http://hl7.org/fhir/location-status"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ACTIVE: return "The location is operational."; - case SUSPENDED: return "The location is temporarily closed."; - case INACTIVE: return "The location is no longer used."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACTIVE: return "Active"; - case SUSPENDED: return "Suspended"; - case INACTIVE: return "Inactive"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class LocationStatusEnumFactory implements EnumFactory { - public LocationStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return LocationStatus.ACTIVE; - if ("suspended".equals(codeString)) - return LocationStatus.SUSPENDED; - if ("inactive".equals(codeString)) - return LocationStatus.INACTIVE; - throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, LocationStatus.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, LocationStatus.NULL, code); - if ("active".equals(codeString)) - return new Enumeration(this, LocationStatus.ACTIVE, code); - if ("suspended".equals(codeString)) - return new Enumeration(this, LocationStatus.SUSPENDED, code); - if ("inactive".equals(codeString)) - return new Enumeration(this, LocationStatus.INACTIVE, code); - throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); - } - public String toCode(LocationStatus code) { - if (code == LocationStatus.ACTIVE) - return "active"; - if (code == LocationStatus.SUSPENDED) - return "suspended"; - if (code == LocationStatus.INACTIVE) - return "inactive"; - return "?"; - } - public String toSystem(LocationStatus code) { - return code.getSystem(); - } - } - - @Block() - public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). - */ - @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Longitude with WGS84 datum", formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page)." ) - protected DecimalType longitude; - - /** - * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). - */ - @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Latitude with WGS84 datum", formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page)." ) - protected DecimalType latitude; - - /** - * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). - */ - @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Altitude with WGS84 datum", formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page)." ) - protected DecimalType altitude; - - private static final long serialVersionUID = -74276134L; - - /** - * Constructor - */ - public LocationPositionComponent() { - super(); - } - - /** - * Constructor - */ - public LocationPositionComponent(BigDecimal longitude, BigDecimal latitude) { - super(); - this.setLongitude(longitude); - this.setLatitude(latitude); - } - - /** - * @return {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value - */ - public DecimalType getLongitudeElement() { - if (this.longitude == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create LocationPositionComponent.longitude"); - else if (Configuration.doAutoCreate()) - this.longitude = new DecimalType(); // bb - return this.longitude; - } - - public boolean hasLongitudeElement() { - return this.longitude != null && !this.longitude.isEmpty(); - } - - public boolean hasLongitude() { - return this.longitude != null && !this.longitude.isEmpty(); - } - - /** - * @param value {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value - */ - public LocationPositionComponent setLongitudeElement(DecimalType value) { - this.longitude = value; - return this; - } - - /** - * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). - */ - public BigDecimal getLongitude() { - return this.longitude == null ? null : this.longitude.getValue(); - } - - /** - * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLongitude(BigDecimal value) { - if (this.longitude == null) - this.longitude = new DecimalType(); - this.longitude.setValue(value); - return this; - } - - /** - * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLongitude(long value) { - this.longitude = new DecimalType(); - this.longitude.setValue(value); - return this; - } - - /** - * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLongitude(double value) { - this.longitude = new DecimalType(); - this.longitude.setValue(value); - return this; - } - - /** - * @return {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value - */ - public DecimalType getLatitudeElement() { - if (this.latitude == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create LocationPositionComponent.latitude"); - else if (Configuration.doAutoCreate()) - this.latitude = new DecimalType(); // bb - return this.latitude; - } - - public boolean hasLatitudeElement() { - return this.latitude != null && !this.latitude.isEmpty(); - } - - public boolean hasLatitude() { - return this.latitude != null && !this.latitude.isEmpty(); - } - - /** - * @param value {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value - */ - public LocationPositionComponent setLatitudeElement(DecimalType value) { - this.latitude = value; - return this; - } - - /** - * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). - */ - public BigDecimal getLatitude() { - return this.latitude == null ? null : this.latitude.getValue(); - } - - /** - * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLatitude(BigDecimal value) { - if (this.latitude == null) - this.latitude = new DecimalType(); - this.latitude.setValue(value); - return this; - } - - /** - * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLatitude(long value) { - this.latitude = new DecimalType(); - this.latitude.setValue(value); - return this; - } - - /** - * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setLatitude(double value) { - this.latitude = new DecimalType(); - this.latitude.setValue(value); - return this; - } - - /** - * @return {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value - */ - public DecimalType getAltitudeElement() { - if (this.altitude == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create LocationPositionComponent.altitude"); - else if (Configuration.doAutoCreate()) - this.altitude = new DecimalType(); // bb - return this.altitude; - } - - public boolean hasAltitudeElement() { - return this.altitude != null && !this.altitude.isEmpty(); - } - - public boolean hasAltitude() { - return this.altitude != null && !this.altitude.isEmpty(); - } - - /** - * @param value {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value - */ - public LocationPositionComponent setAltitudeElement(DecimalType value) { - this.altitude = value; - return this; - } - - /** - * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). - */ - public BigDecimal getAltitude() { - return this.altitude == null ? null : this.altitude.getValue(); - } - - /** - * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setAltitude(BigDecimal value) { - if (value == null) - this.altitude = null; - else { - if (this.altitude == null) - this.altitude = new DecimalType(); - this.altitude.setValue(value); - } - return this; - } - - /** - * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setAltitude(long value) { - this.altitude = new DecimalType(); - this.altitude.setValue(value); - return this; - } - - /** - * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). - */ - public LocationPositionComponent setAltitude(double value) { - this.altitude = new DecimalType(); - this.altitude.setValue(value); - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).", 0, 1, longitude)); - children.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).", 0, 1, latitude)); - children.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).", 0, 1, altitude)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 137365935: /*longitude*/ return new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).", 0, 1, longitude); - case -1439978388: /*latitude*/ return new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).", 0, 1, latitude); - case 2036550306: /*altitude*/ return new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).", 0, 1, altitude); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 137365935: /*longitude*/ return this.longitude == null ? new Base[0] : new Base[] {this.longitude}; // DecimalType - case -1439978388: /*latitude*/ return this.latitude == null ? new Base[0] : new Base[] {this.latitude}; // DecimalType - case 2036550306: /*altitude*/ return this.altitude == null ? new Base[0] : new Base[] {this.altitude}; // DecimalType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 137365935: // longitude - this.longitude = TypeConvertor.castToDecimal(value); // DecimalType - return value; - case -1439978388: // latitude - this.latitude = TypeConvertor.castToDecimal(value); // DecimalType - return value; - case 2036550306: // altitude - this.altitude = TypeConvertor.castToDecimal(value); // DecimalType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("longitude")) { - this.longitude = TypeConvertor.castToDecimal(value); // DecimalType - } else if (name.equals("latitude")) { - this.latitude = TypeConvertor.castToDecimal(value); // DecimalType - } else if (name.equals("altitude")) { - this.altitude = TypeConvertor.castToDecimal(value); // DecimalType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("longitude")) { - this.longitude = null; - } else if (name.equals("latitude")) { - this.latitude = null; - } else if (name.equals("altitude")) { - this.altitude = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 137365935: return getLongitudeElement(); - case -1439978388: return getLatitudeElement(); - case 2036550306: return getAltitudeElement(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 137365935: /*longitude*/ return new String[] {"decimal"}; - case -1439978388: /*latitude*/ return new String[] {"decimal"}; - case 2036550306: /*altitude*/ return new String[] {"decimal"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("longitude")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.position.longitude"); - } - else if (name.equals("latitude")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.position.latitude"); - } - else if (name.equals("altitude")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.position.altitude"); - } - else - return super.addChild(name); - } - - public LocationPositionComponent copy() { - LocationPositionComponent dst = new LocationPositionComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(LocationPositionComponent dst) { - super.copyValues(dst); - dst.longitude = longitude == null ? null : longitude.copy(); - dst.latitude = latitude == null ? null : latitude.copy(); - dst.altitude = altitude == null ? null : altitude.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof LocationPositionComponent)) - return false; - LocationPositionComponent o = (LocationPositionComponent) other_; - return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof LocationPositionComponent)) - return false; - LocationPositionComponent o = (LocationPositionComponent) other_; - return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude - ); - } - - public String fhirType() { - return "Location.position"; - - } - - } - - /** - * Unique code or number identifying the location to its users. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) - protected List identifier; - - /** - * The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. - */ - @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) - @Description(shortDefinition="active | suspended | inactive", formalDefinition="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-status") - protected Enumeration status; - - /** - * The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance. - */ - @Child(name = "operationalStatus", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The operational status of the location (typically only for a bed/room)", formalDefinition="The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0116") - protected Coding operationalStatus; - - /** - * Name of the location as used by humans. Does not need to be unique. - */ - @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) - protected StringType name; - - /** - * A list of alternate names that the location is known as, or was known as, in the past. - */ - @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="A list of alternate names that the location is known as, or was known as, in the past", formalDefinition="A list of alternate names that the location is known as, or was known as, in the past." ) - protected List alias; - - /** - * Description of the Location, which helps in finding or referencing the place. - */ - @Child(name = "description", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=true) - @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 MarkdownType description; - - /** - * Indicates whether a resource instance represents a specific location or a class of locations. - */ - @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-mode") - protected Enumeration mode; - - /** - * Indicates the type of function performed at the location. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType") - protected List type; - - /** - * The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites. - */ - @Child(name = "contact", type = {ExtendedContactDetail.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Official contact details for the location", formalDefinition="The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) - protected List contact; - - /** - * Physical location. - */ - @Child(name = "address", type = {Address.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) - protected Address address; - - /** - * Physical form of the location, e.g. building, room, vehicle, road, virtual. - */ - @Child(name = "form", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road, virtual." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-form") - protected CodeableConcept form; - - /** - * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). - */ - @Child(name = "position", type = {}, order=11, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." ) - protected LocationPositionComponent position; - - /** - * The organization responsible for the provisioning and upkeep of the location. - */ - @Child(name = "managingOrganization", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) - protected Reference managingOrganization; - - /** - * Another Location of which this Location is physically a part of. - */ - @Child(name = "partOf", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Another Location this one is physically a part of", formalDefinition="Another Location of which this Location is physically a part of." ) - protected Reference partOf; - - /** - * Collection of characteristics (attributes). - */ - @Child(name = "characteristic", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-characteristic") - protected List characteristic; - - /** - * What days/times during a week is this location usually open, and any exceptions where the location is not available. - */ - @Child(name = "hoursOfOperation", type = {Availability.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="What days/times during a week is this location usually open (including exceptions)", formalDefinition="What days/times during a week is this location usually open, and any exceptions where the location is not available." ) - protected List hoursOfOperation; - - /** - * Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details). - */ - @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details)." ) - protected List virtualService; - - /** - * Technical endpoints providing access to services operated for the location. - */ - @Child(name = "endpoint", type = {Endpoint.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the location." ) - protected List endpoint; - - private static final long serialVersionUID = 1238993068L; - - /** - * Constructor - */ - public Location() { - super(); - } - - /** - * @return {@link #identifier} (Unique code or number identifying the location to its users.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setIdentifier(List theIdentifier) { - this.identifier = theIdentifier; - return this; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - public Location addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} - */ - public Identifier getIdentifierFirstRep() { - if (getIdentifier().isEmpty()) { - addIdentifier(); - } - return getIdentifier().get(0); - } - - /** - * @return {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). 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 Location.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new LocationStatusEnumFactory()); // 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 property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Location setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. - */ - public LocationStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. - */ - public Location setStatus(LocationStatus value) { - if (value == null) - this.status = null; - else { - if (this.status == null) - this.status = new Enumeration(new LocationStatusEnumFactory()); - this.status.setValue(value); - } - return this; - } - - /** - * @return {@link #operationalStatus} (The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.) - */ - public Coding getOperationalStatus() { - if (this.operationalStatus == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.operationalStatus"); - else if (Configuration.doAutoCreate()) - this.operationalStatus = new Coding(); // cc - return this.operationalStatus; - } - - public boolean hasOperationalStatus() { - return this.operationalStatus != null && !this.operationalStatus.isEmpty(); - } - - /** - * @param value {@link #operationalStatus} (The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.) - */ - public Location setOperationalStatus(Coding value) { - this.operationalStatus = value; - return this; - } - - /** - * @return {@link #name} (Name of the location as used by humans. Does not need to be unique.). 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 Location.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 location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public Location setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return Name of the location as used by humans. Does not need to be unique. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value Name of the location as used by humans. Does not need to be unique. - */ - public Location 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 #alias} (A list of alternate names that the location is known as, or was known as, in the past.) - */ - public List getAlias() { - if (this.alias == null) - this.alias = new ArrayList(); - return this.alias; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setAlias(List theAlias) { - this.alias = theAlias; - return this; - } - - public boolean hasAlias() { - if (this.alias == null) - return false; - for (StringType item : this.alias) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) - */ - public StringType addAliasElement() {//2 - StringType t = new StringType(); - if (this.alias == null) - this.alias = new ArrayList(); - this.alias.add(t); - return t; - } - - /** - * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) - */ - public Location addAlias(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.alias == null) - this.alias = new ArrayList(); - this.alias.add(t); - return this; - } - - /** - * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) - */ - public boolean hasAlias(String value) { - if (this.alias == null) - return false; - for (StringType v : this.alias) - if (v.getValue().equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public MarkdownType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.description"); - else if (Configuration.doAutoCreate()) - this.description = new MarkdownType(); // 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} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public Location setDescriptionElement(MarkdownType value) { - this.description = value; - return this; - } - - /** - * @return Description of the Location, which helps in finding or referencing the place. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value Description of the Location, which helps in finding or referencing the place. - */ - public Location setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new MarkdownType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). 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 Location.mode"); - else if (Configuration.doAutoCreate()) - this.mode = new Enumeration(new LocationModeEnumFactory()); // 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} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value - */ - public Location setModeElement(Enumeration value) { - this.mode = value; - return this; - } - - /** - * @return Indicates whether a resource instance represents a specific location or a class of locations. - */ - public LocationMode getMode() { - return this.mode == null ? null : this.mode.getValue(); - } - - /** - * @param value Indicates whether a resource instance represents a specific location or a class of locations. - */ - public Location setMode(LocationMode value) { - if (value == null) - this.mode = null; - else { - if (this.mode == null) - this.mode = new Enumeration(new LocationModeEnumFactory()); - this.mode.setValue(value); - } - return this; - } - - /** - * @return {@link #type} (Indicates the type of function performed at the location.) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setType(List theType) { - this.type = theType; - return this; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (CodeableConcept item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addType() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - public Location addType(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} - */ - public CodeableConcept getTypeFirstRep() { - if (getType().isEmpty()) { - addType(); - } - return getType().get(0); - } - - /** - * @return {@link #contact} (The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.) - */ - public List getContact() { - if (this.contact == null) - this.contact = new ArrayList(); - return this.contact; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setContact(List theContact) { - this.contact = theContact; - return this; - } - - public boolean hasContact() { - if (this.contact == null) - return false; - for (ExtendedContactDetail item : this.contact) - if (!item.isEmpty()) - return true; - return false; - } - - public ExtendedContactDetail addContact() { //3 - ExtendedContactDetail t = new ExtendedContactDetail(); - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return t; - } - - public Location addContact(ExtendedContactDetail t) { //3 - if (t == null) - return this; - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} - */ - public ExtendedContactDetail getContactFirstRep() { - if (getContact().isEmpty()) { - addContact(); - } - return getContact().get(0); - } - - /** - * @return {@link #address} (Physical location.) - */ - public Address getAddress() { - if (this.address == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.address"); - else if (Configuration.doAutoCreate()) - this.address = new Address(); // cc - return this.address; - } - - public boolean hasAddress() { - return this.address != null && !this.address.isEmpty(); - } - - /** - * @param value {@link #address} (Physical location.) - */ - public Location setAddress(Address value) { - this.address = value; - return this; - } - - /** - * @return {@link #form} (Physical form of the location, e.g. building, room, vehicle, road, virtual.) - */ - public CodeableConcept getForm() { - if (this.form == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.form"); - else if (Configuration.doAutoCreate()) - this.form = new CodeableConcept(); // cc - return this.form; - } - - public boolean hasForm() { - return this.form != null && !this.form.isEmpty(); - } - - /** - * @param value {@link #form} (Physical form of the location, e.g. building, room, vehicle, road, virtual.) - */ - public Location setForm(CodeableConcept value) { - this.form = value; - return this; - } - - /** - * @return {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) - */ - public LocationPositionComponent getPosition() { - if (this.position == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.position"); - else if (Configuration.doAutoCreate()) - this.position = new LocationPositionComponent(); // cc - return this.position; - } - - public boolean hasPosition() { - return this.position != null && !this.position.isEmpty(); - } - - /** - * @param value {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) - */ - public Location setPosition(LocationPositionComponent value) { - this.position = value; - return this; - } - - /** - * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) - */ - public Reference getManagingOrganization() { - if (this.managingOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.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 provisioning and upkeep of the location.) - */ - public Location setManagingOrganization(Reference value) { - this.managingOrganization = value; - return this; - } - - /** - * @return {@link #partOf} (Another Location of which this Location is physically a part of.) - */ - public Reference getPartOf() { - if (this.partOf == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Location.partOf"); - else if (Configuration.doAutoCreate()) - this.partOf = new Reference(); // cc - return this.partOf; - } - - public boolean hasPartOf() { - return this.partOf != null && !this.partOf.isEmpty(); - } - - /** - * @param value {@link #partOf} (Another Location of which this Location is physically a part of.) - */ - public Location setPartOf(Reference value) { - this.partOf = value; - return this; - } - - /** - * @return {@link #characteristic} (Collection of characteristics (attributes).) - */ - public List getCharacteristic() { - if (this.characteristic == null) - this.characteristic = new ArrayList(); - return this.characteristic; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setCharacteristic(List theCharacteristic) { - this.characteristic = theCharacteristic; - return this; - } - - public boolean hasCharacteristic() { - if (this.characteristic == null) - return false; - for (CodeableConcept item : this.characteristic) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addCharacteristic() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.characteristic == null) - this.characteristic = new ArrayList(); - this.characteristic.add(t); - return t; - } - - public Location addCharacteristic(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.characteristic == null) - this.characteristic = new ArrayList(); - this.characteristic.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3} - */ - public CodeableConcept getCharacteristicFirstRep() { - if (getCharacteristic().isEmpty()) { - addCharacteristic(); - } - return getCharacteristic().get(0); - } - - /** - * @return {@link #hoursOfOperation} (What days/times during a week is this location usually open, and any exceptions where the location is not available.) - */ - public List getHoursOfOperation() { - if (this.hoursOfOperation == null) - this.hoursOfOperation = new ArrayList(); - return this.hoursOfOperation; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setHoursOfOperation(List theHoursOfOperation) { - this.hoursOfOperation = theHoursOfOperation; - return this; - } - - public boolean hasHoursOfOperation() { - if (this.hoursOfOperation == null) - return false; - for (Availability item : this.hoursOfOperation) - if (!item.isEmpty()) - return true; - return false; - } - - public Availability addHoursOfOperation() { //3 - Availability t = new Availability(); - if (this.hoursOfOperation == null) - this.hoursOfOperation = new ArrayList(); - this.hoursOfOperation.add(t); - return t; - } - - public Location addHoursOfOperation(Availability t) { //3 - if (t == null) - return this; - if (this.hoursOfOperation == null) - this.hoursOfOperation = new ArrayList(); - this.hoursOfOperation.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #hoursOfOperation}, creating it if it does not already exist {3} - */ - public Availability getHoursOfOperationFirstRep() { - if (getHoursOfOperation().isEmpty()) { - addHoursOfOperation(); - } - return getHoursOfOperation().get(0); - } - - /** - * @return {@link #virtualService} (Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).) - */ - public List getVirtualService() { - if (this.virtualService == null) - this.virtualService = new ArrayList(); - return this.virtualService; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setVirtualService(List theVirtualService) { - this.virtualService = theVirtualService; - return this; - } - - public boolean hasVirtualService() { - if (this.virtualService == null) - return false; - for (VirtualServiceDetail item : this.virtualService) - if (!item.isEmpty()) - return true; - return false; - } - - public VirtualServiceDetail addVirtualService() { //3 - VirtualServiceDetail t = new VirtualServiceDetail(); - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return t; - } - - public Location addVirtualService(VirtualServiceDetail t) { //3 - if (t == null) - return this; - if (this.virtualService == null) - this.virtualService = new ArrayList(); - this.virtualService.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} - */ - public VirtualServiceDetail getVirtualServiceFirstRep() { - if (getVirtualService().isEmpty()) { - addVirtualService(); - } - return getVirtualService().get(0); - } - - /** - * @return {@link #endpoint} (Technical endpoints providing access to services operated for the location.) - */ - public List getEndpoint() { - if (this.endpoint == null) - this.endpoint = new ArrayList(); - return this.endpoint; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public Location setEndpoint(List theEndpoint) { - this.endpoint = theEndpoint; - return this; - } - - public boolean hasEndpoint() { - if (this.endpoint == null) - return false; - for (Reference item : this.endpoint) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addEndpoint() { //3 - Reference t = new Reference(); - if (this.endpoint == null) - this.endpoint = new ArrayList(); - this.endpoint.add(t); - return t; - } - - public Location addEndpoint(Reference t) { //3 - if (t == null) - return this; - if (this.endpoint == null) - this.endpoint = new ArrayList(); - this.endpoint.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3} - */ - public Reference getEndpointFirstRep() { - if (getEndpoint().isEmpty()) { - addEndpoint(); - } - return getEndpoint().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); - children.add(new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status)); - children.add(new Property("operationalStatus", "Coding", "The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.", 0, 1, operationalStatus)); - children.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name)); - children.add(new Property("alias", "string", "A list of alternate names that the location is known as, or was known as, in the past.", 0, java.lang.Integer.MAX_VALUE, alias)); - children.add(new Property("description", "markdown", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description)); - children.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode)); - children.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type)); - children.add(new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact)); - children.add(new Property("address", "Address", "Physical location.", 0, 1, address)); - children.add(new Property("form", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road, virtual.", 0, 1, form)); - children.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position)); - children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization)); - children.add(new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf)); - children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic)); - children.add(new Property("hoursOfOperation", "Availability", "What days/times during a week is this location usually open, and any exceptions where the location is not available.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation)); - children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).", 0, java.lang.Integer.MAX_VALUE, virtualService)); - children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier); - case -892481550: /*status*/ return new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status); - case -2103166364: /*operationalStatus*/ return new Property("operationalStatus", "Coding", "The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.", 0, 1, operationalStatus); - case 3373707: /*name*/ return new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name); - case 92902992: /*alias*/ return new Property("alias", "string", "A list of alternate names that the location is known as, or was known as, in the past.", 0, java.lang.Integer.MAX_VALUE, alias); - case -1724546052: /*description*/ return new Property("description", "markdown", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description); - case 3357091: /*mode*/ return new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode); - case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type); - case 951526432: /*contact*/ return new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact); - case -1147692044: /*address*/ return new Property("address", "Address", "Physical location.", 0, 1, address); - case 3148996: /*form*/ return new Property("form", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road, virtual.", 0, 1, form); - case 747804969: /*position*/ return new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position); - case -2058947787: /*managingOrganization*/ return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization); - case -995410646: /*partOf*/ return new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf); - case 366313883: /*characteristic*/ return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic); - case -1588872511: /*hoursOfOperation*/ return new Property("hoursOfOperation", "Availability", "What days/times during a week is this location usually open, and any exceptions where the location is not available.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation); - case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).", 0, java.lang.Integer.MAX_VALUE, virtualService); - case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Coding - case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType - case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType - case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType - case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration - case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept - case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ExtendedContactDetail - case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address - case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept - case 747804969: /*position*/ return this.position == null ? new Base[0] : new Base[] {this.position}; // LocationPositionComponent - case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference - case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference - case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept - case -1588872511: /*hoursOfOperation*/ return this.hoursOfOperation == null ? new Base[0] : this.hoursOfOperation.toArray(new Base[this.hoursOfOperation.size()]); // Availability - case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail - case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1618432855: // identifier - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier - return value; - case -892481550: // status - value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case -2103166364: // operationalStatus - this.operationalStatus = TypeConvertor.castToCoding(value); // Coding - return value; - case 3373707: // name - this.name = TypeConvertor.castToString(value); // StringType - return value; - case 92902992: // alias - this.getAlias().add(TypeConvertor.castToString(value)); // StringType - return value; - case -1724546052: // description - this.description = TypeConvertor.castToMarkdown(value); // MarkdownType - return value; - case 3357091: // mode - value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.mode = (Enumeration) value; // Enumeration - return value; - case 3575610: // type - this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 951526432: // contact - this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); // ExtendedContactDetail - return value; - case -1147692044: // address - this.address = TypeConvertor.castToAddress(value); // Address - return value; - case 3148996: // form - this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 747804969: // position - this.position = (LocationPositionComponent) value; // LocationPositionComponent - return value; - case -2058947787: // managingOrganization - this.managingOrganization = TypeConvertor.castToReference(value); // Reference - return value; - case -995410646: // partOf - this.partOf = TypeConvertor.castToReference(value); // Reference - return value; - case 366313883: // characteristic - this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case -1588872511: // hoursOfOperation - this.getHoursOfOperation().add(TypeConvertor.castToAvailability(value)); // Availability - return value; - case 1420774698: // virtualService - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail - return value; - case 1741102485: // endpoint - this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); - } else if (name.equals("status")) { - value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("operationalStatus")) { - this.operationalStatus = TypeConvertor.castToCoding(value); // Coding - } else if (name.equals("name")) { - this.name = TypeConvertor.castToString(value); // StringType - } else if (name.equals("alias")) { - this.getAlias().add(TypeConvertor.castToString(value)); - } else if (name.equals("description")) { - this.description = TypeConvertor.castToMarkdown(value); // MarkdownType - } else if (name.equals("mode")) { - value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.mode = (Enumeration) value; // Enumeration - } else if (name.equals("type")) { - this.getType().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("contact")) { - this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); - } else if (name.equals("address")) { - this.address = TypeConvertor.castToAddress(value); // Address - } else if (name.equals("form")) { - this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("position")) { - this.position = (LocationPositionComponent) value; // LocationPositionComponent - } else if (name.equals("managingOrganization")) { - this.managingOrganization = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("partOf")) { - this.partOf = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("characteristic")) { - this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("hoursOfOperation")) { - this.getHoursOfOperation().add(TypeConvertor.castToAvailability(value)); - } else if (name.equals("virtualService")) { - this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); - } else if (name.equals("endpoint")) { - this.getEndpoint().add(TypeConvertor.castToReference(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().remove(value); - } else if (name.equals("status")) { - value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("operationalStatus")) { - this.operationalStatus = null; - } else if (name.equals("name")) { - this.name = null; - } else if (name.equals("alias")) { - this.getAlias().remove(value); - } else if (name.equals("description")) { - this.description = null; - } else if (name.equals("mode")) { - value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.mode = (Enumeration) value; // Enumeration - } else if (name.equals("type")) { - this.getType().remove(value); - } else if (name.equals("contact")) { - this.getContact().remove(value); - } else if (name.equals("address")) { - this.address = null; - } else if (name.equals("form")) { - this.form = null; - } else if (name.equals("position")) { - this.position = (LocationPositionComponent) value; // LocationPositionComponent - } else if (name.equals("managingOrganization")) { - this.managingOrganization = null; - } else if (name.equals("partOf")) { - this.partOf = null; - } else if (name.equals("characteristic")) { - this.getCharacteristic().remove(value); - } else if (name.equals("hoursOfOperation")) { - this.getHoursOfOperation().remove(value); - } else if (name.equals("virtualService")) { - this.getVirtualService().remove(value); - } else if (name.equals("endpoint")) { - this.getEndpoint().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: return addIdentifier(); - case -892481550: return getStatusElement(); - case -2103166364: return getOperationalStatus(); - case 3373707: return getNameElement(); - case 92902992: return addAliasElement(); - case -1724546052: return getDescriptionElement(); - case 3357091: return getModeElement(); - case 3575610: return addType(); - case 951526432: return addContact(); - case -1147692044: return getAddress(); - case 3148996: return getForm(); - case 747804969: return getPosition(); - case -2058947787: return getManagingOrganization(); - case -995410646: return getPartOf(); - case 366313883: return addCharacteristic(); - case -1588872511: return addHoursOfOperation(); - case 1420774698: return addVirtualService(); - case 1741102485: return addEndpoint(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case -892481550: /*status*/ return new String[] {"code"}; - case -2103166364: /*operationalStatus*/ return new String[] {"Coding"}; - case 3373707: /*name*/ return new String[] {"string"}; - case 92902992: /*alias*/ return new String[] {"string"}; - case -1724546052: /*description*/ return new String[] {"markdown"}; - case 3357091: /*mode*/ return new String[] {"code"}; - case 3575610: /*type*/ return new String[] {"CodeableConcept"}; - case 951526432: /*contact*/ return new String[] {"ExtendedContactDetail"}; - case -1147692044: /*address*/ return new String[] {"Address"}; - case 3148996: /*form*/ return new String[] {"CodeableConcept"}; - case 747804969: /*position*/ return new String[] {}; - case -2058947787: /*managingOrganization*/ return new String[] {"Reference"}; - case -995410646: /*partOf*/ return new String[] {"Reference"}; - case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"}; - case -1588872511: /*hoursOfOperation*/ return new String[] {"Availability"}; - case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; - case 1741102485: /*endpoint*/ return new String[] {"Reference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.status"); - } - else if (name.equals("operationalStatus")) { - this.operationalStatus = new Coding(); - return this.operationalStatus; - } - else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.name"); - } - else if (name.equals("alias")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.alias"); - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.description"); - } - else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a singleton property Location.mode"); - } - else if (name.equals("type")) { - return addType(); - } - else if (name.equals("contact")) { - return addContact(); - } - else if (name.equals("address")) { - this.address = new Address(); - return this.address; - } - else if (name.equals("form")) { - this.form = new CodeableConcept(); - return this.form; - } - else if (name.equals("position")) { - this.position = new LocationPositionComponent(); - return this.position; - } - else if (name.equals("managingOrganization")) { - this.managingOrganization = new Reference(); - return this.managingOrganization; - } - else if (name.equals("partOf")) { - this.partOf = new Reference(); - return this.partOf; - } - else if (name.equals("characteristic")) { - return addCharacteristic(); - } - else if (name.equals("hoursOfOperation")) { - return addHoursOfOperation(); - } - else if (name.equals("virtualService")) { - return addVirtualService(); - } - else if (name.equals("endpoint")) { - return addEndpoint(); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "Location"; - - } - - public Location copy() { - Location dst = new Location(); - copyValues(dst); - return dst; - } - - public void copyValues(Location dst) { - super.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(); - dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy(); - dst.name = name == null ? null : name.copy(); - if (alias != null) { - dst.alias = new ArrayList(); - for (StringType i : alias) - dst.alias.add(i.copy()); - }; - dst.description = description == null ? null : description.copy(); - dst.mode = mode == null ? null : mode.copy(); - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); - }; - if (contact != null) { - dst.contact = new ArrayList(); - for (ExtendedContactDetail i : contact) - dst.contact.add(i.copy()); - }; - dst.address = address == null ? null : address.copy(); - dst.form = form == null ? null : form.copy(); - dst.position = position == null ? null : position.copy(); - dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); - dst.partOf = partOf == null ? null : partOf.copy(); - if (characteristic != null) { - dst.characteristic = new ArrayList(); - for (CodeableConcept i : characteristic) - dst.characteristic.add(i.copy()); - }; - if (hoursOfOperation != null) { - dst.hoursOfOperation = new ArrayList(); - for (Availability i : hoursOfOperation) - dst.hoursOfOperation.add(i.copy()); - }; - if (virtualService != null) { - dst.virtualService = new ArrayList(); - for (VirtualServiceDetail i : virtualService) - dst.virtualService.add(i.copy()); - }; - if (endpoint != null) { - dst.endpoint = new ArrayList(); - for (Reference i : endpoint) - dst.endpoint.add(i.copy()); - }; - } - - protected Location typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof Location)) - return false; - Location o = (Location) other_; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(operationalStatus, o.operationalStatus, true) - && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(description, o.description, true) - && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) && compareDeep(contact, o.contact, true) - && compareDeep(address, o.address, true) && compareDeep(form, o.form, true) && compareDeep(position, o.position, true) - && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(partOf, o.partOf, true) - && compareDeep(characteristic, o.characteristic, true) && compareDeep(hoursOfOperation, o.hoursOfOperation, true) - && compareDeep(virtualService, o.virtualService, true) && compareDeep(endpoint, o.endpoint, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof Location)) - return false; - Location o = (Location) other_; - return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true) - && compareValues(description, o.description, true) && compareValues(mode, o.mode, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, operationalStatus - , name, alias, description, mode, type, contact, address, form, position, managingOrganization - , partOf, characteristic, hoursOfOperation, virtualService, endpoint); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Location; - } - - /** - * Search parameter: address-city - *

- * Description: A city specified in an address
- * Type: string
- * Path: Location.address.city
- *

- */ - @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) - public static final String SP_ADDRESS_CITY = "address-city"; - /** - * Fluent Client search parameter constant for address-city - *

- * Description: A city specified in an address
- * Type: string
- * Path: Location.address.city
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY); - - /** - * Search parameter: address-country - *

- * Description: A country specified in an address
- * Type: string
- * Path: Location.address.country
- *

- */ - @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) - public static final String SP_ADDRESS_COUNTRY = "address-country"; - /** - * Fluent Client search parameter constant for address-country - *

- * Description: A country specified in an address
- * Type: string
- * Path: Location.address.country
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY); - - /** - * Search parameter: address-postalcode - *

- * Description: A postal code specified in an address
- * Type: string
- * Path: Location.address.postalCode
- *

- */ - @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) - public static final String SP_ADDRESS_POSTALCODE = "address-postalcode"; - /** - * Fluent Client search parameter constant for address-postalcode - *

- * Description: A postal code specified in an address
- * Type: string
- * Path: Location.address.postalCode
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE); - - /** - * Search parameter: address-state - *

- * Description: A state specified in an address
- * Type: string
- * Path: Location.address.state
- *

- */ - @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) - public static final String SP_ADDRESS_STATE = "address-state"; - /** - * Fluent Client search parameter constant for address-state - *

- * Description: A state specified in an address
- * Type: string
- * Path: Location.address.state
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE); - - /** - * Search parameter: address-use - *

- * Description: A use code specified in an address
- * Type: token
- * Path: Location.address.use
- *

- */ - @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) - public static final String SP_ADDRESS_USE = "address-use"; - /** - * Fluent Client search parameter constant for address-use - *

- * Description: A use code specified in an address
- * Type: token
- * Path: Location.address.use
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE); - - /** - * Search parameter: address - *

- * Description: A (part of the) address of the location
- * Type: string
- * Path: Location.address
- *

- */ - @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) - public static final String SP_ADDRESS = "address"; - /** - * Fluent Client search parameter constant for address - *

- * Description: A (part of the) address of the location
- * Type: string
- * Path: Location.address
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS); - - /** - * Search parameter: characteristic - *

- * Description: One of the Location's characteristics
- * Type: token
- * Path: Location.characteristic
- *

- */ - @SearchParamDefinition(name="characteristic", path="Location.characteristic", description="One of the Location's characteristics", type="token" ) - public static final String SP_CHARACTERISTIC = "characteristic"; - /** - * Fluent Client search parameter constant for characteristic - *

- * Description: One of the Location's characteristics
- * Type: token
- * Path: Location.characteristic
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC); - - /** - * Search parameter: contains - *

- * Description: Select locations that contain the specified co-ordinates
- * Type: special
- * Path: Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value
- *

- */ - @SearchParamDefinition(name="contains", path="Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value", description="Select locations that contain the specified co-ordinates", type="special" ) - public static final String SP_CONTAINS = "contains"; - /** - * Fluent Client search parameter constant for contains - *

- * Description: Select locations that contain the specified co-ordinates
- * Type: special
- * Path: Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value
- *

- */ - public static final ca.uhn.fhir.rest.gclient.SpecialClientParam CONTAINS = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_CONTAINS); - - /** - * Search parameter: endpoint - *

- * Description: Technical endpoints providing access to services operated for the location
- * Type: reference
- * Path: Location.endpoint
- *

- */ - @SearchParamDefinition(name="endpoint", path="Location.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } ) - public static final String SP_ENDPOINT = "endpoint"; - /** - * Fluent Client search parameter constant for endpoint - *

- * Description: Technical endpoints providing access to services operated for the location
- * Type: reference
- * Path: Location.endpoint
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Location:endpoint". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Location:endpoint").toLocked(); - - /** - * Search parameter: identifier - *

- * Description: An identifier for the location
- * Type: token
- * Path: Location.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="Location.identifier", description="An identifier for the location", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: An identifier for the location
- * Type: token
- * Path: Location.identifier
- *

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

- * Description: A portion of the location's name or alias
- * Type: string
- * Path: Location.name | Location.alias
- *

- */ - @SearchParamDefinition(name="name", path="Location.name | Location.alias", description="A portion of the location's name or alias", type="string" ) - public static final String SP_NAME = "name"; - /** - * Fluent Client search parameter constant for name - *

- * Description: A portion of the location's name or alias
- * Type: string
- * Path: Location.name | Location.alias
- *

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

+package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; + +/** + * Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated. + */ +@ResourceDef(name="Location", profile="http://hl7.org/fhir/StructureDefinition/Location") +public class Location extends DomainResource { + + public enum LocationMode { + /** + * The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). + */ + INSTANCE, + /** + * The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). + */ + KIND, + /** + * added to help the parsers with the generic types + */ + NULL; + public static LocationMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return INSTANCE; + if ("kind".equals(codeString)) + return KIND; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTANCE: return "instance"; + case KIND: return "kind"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INSTANCE: return "http://hl7.org/fhir/location-mode"; + case KIND: return "http://hl7.org/fhir/location-mode"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INSTANCE: return "The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A)."; + case KIND: return "The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.)."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTANCE: return "Instance"; + case KIND: return "Kind"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class LocationModeEnumFactory implements EnumFactory { + public LocationMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("instance".equals(codeString)) + return LocationMode.INSTANCE; + if ("kind".equals(codeString)) + return LocationMode.KIND; + throw new IllegalArgumentException("Unknown LocationMode code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, LocationMode.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, LocationMode.NULL, code); + if ("instance".equals(codeString)) + return new Enumeration(this, LocationMode.INSTANCE, code); + if ("kind".equals(codeString)) + return new Enumeration(this, LocationMode.KIND, code); + throw new FHIRException("Unknown LocationMode code '"+codeString+"'"); + } + public String toCode(LocationMode code) { + if (code == LocationMode.NULL) + return null; + if (code == LocationMode.INSTANCE) + return "instance"; + if (code == LocationMode.KIND) + return "kind"; + return "?"; + } + public String toSystem(LocationMode code) { + return code.getSystem(); + } + } + + public enum LocationStatus { + /** + * The location is operational. + */ + ACTIVE, + /** + * The location is temporarily closed. + */ + SUSPENDED, + /** + * The location is no longer used. + */ + INACTIVE, + /** + * added to help the parsers with the generic types + */ + NULL; + public static LocationStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return ACTIVE; + if ("suspended".equals(codeString)) + return SUSPENDED; + if ("inactive".equals(codeString)) + return INACTIVE; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIVE: return "active"; + case SUSPENDED: return "suspended"; + case INACTIVE: return "inactive"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIVE: return "http://hl7.org/fhir/location-status"; + case SUSPENDED: return "http://hl7.org/fhir/location-status"; + case INACTIVE: return "http://hl7.org/fhir/location-status"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIVE: return "The location is operational."; + case SUSPENDED: return "The location is temporarily closed."; + case INACTIVE: return "The location is no longer used."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIVE: return "Active"; + case SUSPENDED: return "Suspended"; + case INACTIVE: return "Inactive"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class LocationStatusEnumFactory implements EnumFactory { + public LocationStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("active".equals(codeString)) + return LocationStatus.ACTIVE; + if ("suspended".equals(codeString)) + return LocationStatus.SUSPENDED; + if ("inactive".equals(codeString)) + return LocationStatus.INACTIVE; + throw new IllegalArgumentException("Unknown LocationStatus code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, LocationStatus.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, LocationStatus.NULL, code); + if ("active".equals(codeString)) + return new Enumeration(this, LocationStatus.ACTIVE, code); + if ("suspended".equals(codeString)) + return new Enumeration(this, LocationStatus.SUSPENDED, code); + if ("inactive".equals(codeString)) + return new Enumeration(this, LocationStatus.INACTIVE, code); + throw new FHIRException("Unknown LocationStatus code '"+codeString+"'"); + } + public String toCode(LocationStatus code) { + if (code == LocationStatus.NULL) + return null; + if (code == LocationStatus.ACTIVE) + return "active"; + if (code == LocationStatus.SUSPENDED) + return "suspended"; + if (code == LocationStatus.INACTIVE) + return "inactive"; + return "?"; + } + public String toSystem(LocationStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class LocationPositionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). + */ + @Child(name = "longitude", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Longitude with WGS84 datum", formalDefinition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page)." ) + protected DecimalType longitude; + + /** + * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). + */ + @Child(name = "latitude", type = {DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Latitude with WGS84 datum", formalDefinition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page)." ) + protected DecimalType latitude; + + /** + * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). + */ + @Child(name = "altitude", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Altitude with WGS84 datum", formalDefinition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page)." ) + protected DecimalType altitude; + + private static final long serialVersionUID = -74276134L; + + /** + * Constructor + */ + public LocationPositionComponent() { + super(); + } + + /** + * Constructor + */ + public LocationPositionComponent(BigDecimal longitude, BigDecimal latitude) { + super(); + this.setLongitude(longitude); + this.setLatitude(latitude); + } + + /** + * @return {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value + */ + public DecimalType getLongitudeElement() { + if (this.longitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.longitude"); + else if (Configuration.doAutoCreate()) + this.longitude = new DecimalType(); // bb + return this.longitude; + } + + public boolean hasLongitudeElement() { + return this.longitude != null && !this.longitude.isEmpty(); + } + + public boolean hasLongitude() { + return this.longitude != null && !this.longitude.isEmpty(); + } + + /** + * @param value {@link #longitude} (Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLongitude" gives direct access to the value + */ + public LocationPositionComponent setLongitudeElement(DecimalType value) { + this.longitude = value; + return this; + } + + /** + * @return Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). + */ + public BigDecimal getLongitude() { + return this.longitude == null ? null : this.longitude.getValue(); + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLongitude(BigDecimal value) { + if (this.longitude == null) + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLongitude(long value) { + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @param value Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLongitude(double value) { + this.longitude = new DecimalType(); + this.longitude.setValue(value); + return this; + } + + /** + * @return {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value + */ + public DecimalType getLatitudeElement() { + if (this.latitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.latitude"); + else if (Configuration.doAutoCreate()) + this.latitude = new DecimalType(); // bb + return this.latitude; + } + + public boolean hasLatitudeElement() { + return this.latitude != null && !this.latitude.isEmpty(); + } + + public boolean hasLatitude() { + return this.latitude != null && !this.latitude.isEmpty(); + } + + /** + * @param value {@link #latitude} (Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getLatitude" gives direct access to the value + */ + public LocationPositionComponent setLatitudeElement(DecimalType value) { + this.latitude = value; + return this; + } + + /** + * @return Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). + */ + public BigDecimal getLatitude() { + return this.latitude == null ? null : this.latitude.getValue(); + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLatitude(BigDecimal value) { + if (this.latitude == null) + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLatitude(long value) { + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @param value Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setLatitude(double value) { + this.latitude = new DecimalType(); + this.latitude.setValue(value); + return this; + } + + /** + * @return {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value + */ + public DecimalType getAltitudeElement() { + if (this.altitude == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LocationPositionComponent.altitude"); + else if (Configuration.doAutoCreate()) + this.altitude = new DecimalType(); // bb + return this.altitude; + } + + public boolean hasAltitudeElement() { + return this.altitude != null && !this.altitude.isEmpty(); + } + + public boolean hasAltitude() { + return this.altitude != null && !this.altitude.isEmpty(); + } + + /** + * @param value {@link #altitude} (Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).). This is the underlying object with id, value and extensions. The accessor "getAltitude" gives direct access to the value + */ + public LocationPositionComponent setAltitudeElement(DecimalType value) { + this.altitude = value; + return this; + } + + /** + * @return Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). + */ + public BigDecimal getAltitude() { + return this.altitude == null ? null : this.altitude.getValue(); + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setAltitude(BigDecimal value) { + if (value == null) + this.altitude = null; + else { + if (this.altitude == null) + this.altitude = new DecimalType(); + this.altitude.setValue(value); + } + return this; + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setAltitude(long value) { + this.altitude = new DecimalType(); + this.altitude.setValue(value); + return this; + } + + /** + * @param value Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page). + */ + public LocationPositionComponent setAltitude(double value) { + this.altitude = new DecimalType(); + this.altitude.setValue(value); + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).", 0, 1, longitude)); + children.add(new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).", 0, 1, latitude)); + children.add(new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).", 0, 1, altitude)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 137365935: /*longitude*/ return new Property("longitude", "decimal", "Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes on Location main page).", 0, 1, longitude); + case -1439978388: /*latitude*/ return new Property("latitude", "decimal", "Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes on Location main page).", 0, 1, latitude); + case 2036550306: /*altitude*/ return new Property("altitude", "decimal", "Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes on Location main page).", 0, 1, altitude); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 137365935: /*longitude*/ return this.longitude == null ? new Base[0] : new Base[] {this.longitude}; // DecimalType + case -1439978388: /*latitude*/ return this.latitude == null ? new Base[0] : new Base[] {this.latitude}; // DecimalType + case 2036550306: /*altitude*/ return this.altitude == null ? new Base[0] : new Base[] {this.altitude}; // DecimalType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 137365935: // longitude + this.longitude = TypeConvertor.castToDecimal(value); // DecimalType + return value; + case -1439978388: // latitude + this.latitude = TypeConvertor.castToDecimal(value); // DecimalType + return value; + case 2036550306: // altitude + this.altitude = TypeConvertor.castToDecimal(value); // DecimalType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("longitude")) { + this.longitude = TypeConvertor.castToDecimal(value); // DecimalType + } else if (name.equals("latitude")) { + this.latitude = TypeConvertor.castToDecimal(value); // DecimalType + } else if (name.equals("altitude")) { + this.altitude = TypeConvertor.castToDecimal(value); // DecimalType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("longitude")) { + this.longitude = null; + } else if (name.equals("latitude")) { + this.latitude = null; + } else if (name.equals("altitude")) { + this.altitude = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 137365935: return getLongitudeElement(); + case -1439978388: return getLatitudeElement(); + case 2036550306: return getAltitudeElement(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 137365935: /*longitude*/ return new String[] {"decimal"}; + case -1439978388: /*latitude*/ return new String[] {"decimal"}; + case 2036550306: /*altitude*/ return new String[] {"decimal"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("longitude")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.position.longitude"); + } + else if (name.equals("latitude")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.position.latitude"); + } + else if (name.equals("altitude")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.position.altitude"); + } + else + return super.addChild(name); + } + + public LocationPositionComponent copy() { + LocationPositionComponent dst = new LocationPositionComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(LocationPositionComponent dst) { + super.copyValues(dst); + dst.longitude = longitude == null ? null : longitude.copy(); + dst.latitude = latitude == null ? null : latitude.copy(); + dst.altitude = altitude == null ? null : altitude.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof LocationPositionComponent)) + return false; + LocationPositionComponent o = (LocationPositionComponent) other_; + return compareDeep(longitude, o.longitude, true) && compareDeep(latitude, o.latitude, true) && compareDeep(altitude, o.altitude, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof LocationPositionComponent)) + return false; + LocationPositionComponent o = (LocationPositionComponent) other_; + return compareValues(longitude, o.longitude, true) && compareValues(latitude, o.latitude, true) && compareValues(altitude, o.altitude, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(longitude, latitude, altitude + ); + } + + public String fhirType() { + return "Location.position"; + + } + + } + + /** + * Unique code or number identifying the location to its users. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Unique code or number identifying the location to its users", formalDefinition="Unique code or number identifying the location to its users." ) + protected List identifier; + + /** + * The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | suspended | inactive", formalDefinition="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-status") + protected Enumeration status; + + /** + * The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance. + */ + @Child(name = "operationalStatus", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The operational status of the location (typically only for a bed/room)", formalDefinition="The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0116") + protected Coding operationalStatus; + + /** + * Name of the location as used by humans. Does not need to be unique. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the location as used by humans", formalDefinition="Name of the location as used by humans. Does not need to be unique." ) + protected StringType name; + + /** + * A list of alternate names that the location is known as, or was known as, in the past. + */ + @Child(name = "alias", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A list of alternate names that the location is known as, or was known as, in the past", formalDefinition="A list of alternate names that the location is known as, or was known as, in the past." ) + protected List alias; + + /** + * Description of the Location, which helps in finding or referencing the place. + */ + @Child(name = "description", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @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 MarkdownType description; + + /** + * Indicates whether a resource instance represents a specific location or a class of locations. + */ + @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="instance | kind", formalDefinition="Indicates whether a resource instance represents a specific location or a class of locations." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-mode") + protected Enumeration mode; + + /** + * Indicates the type of function performed at the location. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of function performed", formalDefinition="Indicates the type of function performed at the location." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType") + protected List type; + + /** + * The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites. + */ + @Child(name = "contact", type = {ExtendedContactDetail.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Official contact details for the location", formalDefinition="The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites." ) + protected List contact; + + /** + * Physical location. + */ + @Child(name = "address", type = {Address.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Physical location", formalDefinition="Physical location." ) + protected Address address; + + /** + * Physical form of the location, e.g. building, room, vehicle, road, virtual. + */ + @Child(name = "form", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Physical form of the location", formalDefinition="Physical form of the location, e.g. building, room, vehicle, road, virtual." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-form") + protected CodeableConcept form; + + /** + * The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML). + */ + @Child(name = "position", type = {}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The absolute geographic location", formalDefinition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." ) + protected LocationPositionComponent position; + + /** + * The organization responsible for the provisioning and upkeep of the location. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization responsible for provisioning and upkeep", formalDefinition="The organization responsible for the provisioning and upkeep of the location." ) + protected Reference managingOrganization; + + /** + * Another Location of which this Location is physically a part of. + */ + @Child(name = "partOf", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Another Location this one is physically a part of", formalDefinition="Another Location of which this Location is physically a part of." ) + protected Reference partOf; + + /** + * Collection of characteristics (attributes). + */ + @Child(name = "characteristic", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/location-characteristic") + protected List characteristic; + + /** + * What days/times during a week is this location usually open, and any exceptions where the location is not available. + */ + @Child(name = "hoursOfOperation", type = {Availability.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="What days/times during a week is this location usually open (including exceptions)", formalDefinition="What days/times during a week is this location usually open, and any exceptions where the location is not available." ) + protected List hoursOfOperation; + + /** + * Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details). + */ + @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details)." ) + protected List virtualService; + + /** + * Technical endpoints providing access to services operated for the location. + */ + @Child(name = "endpoint", type = {Endpoint.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Technical endpoints providing access to services operated for the location", formalDefinition="Technical endpoints providing access to services operated for the location." ) + protected List endpoint; + + private static final long serialVersionUID = 1238993068L; + + /** + * Constructor + */ + public Location() { + super(); + } + + /** + * @return {@link #identifier} (Unique code or number identifying the location to its users.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public Location addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #status} (The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). 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 Location.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new LocationStatusEnumFactory()); // 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 property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Location setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. + */ + public LocationStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location. + */ + public Location setStatus(LocationStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new LocationStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #operationalStatus} (The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.) + */ + public Coding getOperationalStatus() { + if (this.operationalStatus == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.operationalStatus"); + else if (Configuration.doAutoCreate()) + this.operationalStatus = new Coding(); // cc + return this.operationalStatus; + } + + public boolean hasOperationalStatus() { + return this.operationalStatus != null && !this.operationalStatus.isEmpty(); + } + + /** + * @param value {@link #operationalStatus} (The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.) + */ + public Location setOperationalStatus(Coding value) { + this.operationalStatus = value; + return this; + } + + /** + * @return {@link #name} (Name of the location as used by humans. Does not need to be unique.). 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 Location.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 location as used by humans. Does not need to be unique.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public Location setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name of the location as used by humans. Does not need to be unique. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name of the location as used by humans. Does not need to be unique. + */ + public Location 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 #alias} (A list of alternate names that the location is known as, or was known as, in the past.) + */ + public List getAlias() { + if (this.alias == null) + this.alias = new ArrayList(); + return this.alias; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setAlias(List theAlias) { + this.alias = theAlias; + return this; + } + + public boolean hasAlias() { + if (this.alias == null) + return false; + for (StringType item : this.alias) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) + */ + public StringType addAliasElement() {//2 + StringType t = new StringType(); + if (this.alias == null) + this.alias = new ArrayList(); + this.alias.add(t); + return t; + } + + /** + * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) + */ + public Location addAlias(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.alias == null) + this.alias = new ArrayList(); + this.alias.add(t); + return this; + } + + /** + * @param value {@link #alias} (A list of alternate names that the location is known as, or was known as, in the past.) + */ + public boolean hasAlias(String value) { + if (this.alias == null) + return false; + for (StringType v : this.alias) + if (v.getValue().equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #description} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MarkdownType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.description"); + else if (Configuration.doAutoCreate()) + this.description = new MarkdownType(); // 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} (Description of the Location, which helps in finding or referencing the place.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Location setDescriptionElement(MarkdownType value) { + this.description = value; + return this; + } + + /** + * @return Description of the Location, which helps in finding or referencing the place. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Description of the Location, which helps in finding or referencing the place. + */ + public Location setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new MarkdownType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #mode} (Indicates whether a resource instance represents a specific location or a class of locations.). 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 Location.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new LocationModeEnumFactory()); // 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} (Indicates whether a resource instance represents a specific location or a class of locations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Location setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Indicates whether a resource instance represents a specific location or a class of locations. + */ + public LocationMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Indicates whether a resource instance represents a specific location or a class of locations. + */ + public Location setMode(LocationMode value) { + if (value == null) + this.mode = null; + else { + if (this.mode == null) + this.mode = new Enumeration(new LocationModeEnumFactory()); + this.mode.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (Indicates the type of function performed at the location.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setType(List theType) { + this.type = theType; + return this; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + public Location addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} + */ + public CodeableConcept getTypeFirstRep() { + if (getType().isEmpty()) { + addType(); + } + return getType().get(0); + } + + /** + * @return {@link #contact} (The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setContact(List theContact) { + this.contact = theContact; + return this; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ExtendedContactDetail item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + public ExtendedContactDetail addContact() { //3 + ExtendedContactDetail t = new ExtendedContactDetail(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + public Location addContact(ExtendedContactDetail t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} + */ + public ExtendedContactDetail getContactFirstRep() { + if (getContact().isEmpty()) { + addContact(); + } + return getContact().get(0); + } + + /** + * @return {@link #address} (Physical location.) + */ + public Address getAddress() { + if (this.address == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.address"); + else if (Configuration.doAutoCreate()) + this.address = new Address(); // cc + return this.address; + } + + public boolean hasAddress() { + return this.address != null && !this.address.isEmpty(); + } + + /** + * @param value {@link #address} (Physical location.) + */ + public Location setAddress(Address value) { + this.address = value; + return this; + } + + /** + * @return {@link #form} (Physical form of the location, e.g. building, room, vehicle, road, virtual.) + */ + public CodeableConcept getForm() { + if (this.form == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.form"); + else if (Configuration.doAutoCreate()) + this.form = new CodeableConcept(); // cc + return this.form; + } + + public boolean hasForm() { + return this.form != null && !this.form.isEmpty(); + } + + /** + * @param value {@link #form} (Physical form of the location, e.g. building, room, vehicle, road, virtual.) + */ + public Location setForm(CodeableConcept value) { + this.form = value; + return this; + } + + /** + * @return {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) + */ + public LocationPositionComponent getPosition() { + if (this.position == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.position"); + else if (Configuration.doAutoCreate()) + this.position = new LocationPositionComponent(); // cc + return this.position; + } + + public boolean hasPosition() { + return this.position != null && !this.position.isEmpty(); + } + + /** + * @param value {@link #position} (The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).) + */ + public Location setPosition(LocationPositionComponent value) { + this.position = value; + return this; + } + + /** + * @return {@link #managingOrganization} (The organization responsible for the provisioning and upkeep of the location.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.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 provisioning and upkeep of the location.) + */ + public Location setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #partOf} (Another Location of which this Location is physically a part of.) + */ + public Reference getPartOf() { + if (this.partOf == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Location.partOf"); + else if (Configuration.doAutoCreate()) + this.partOf = new Reference(); // cc + return this.partOf; + } + + public boolean hasPartOf() { + return this.partOf != null && !this.partOf.isEmpty(); + } + + /** + * @param value {@link #partOf} (Another Location of which this Location is physically a part of.) + */ + public Location setPartOf(Reference value) { + this.partOf = value; + return this; + } + + /** + * @return {@link #characteristic} (Collection of characteristics (attributes).) + */ + public List getCharacteristic() { + if (this.characteristic == null) + this.characteristic = new ArrayList(); + return this.characteristic; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setCharacteristic(List theCharacteristic) { + this.characteristic = theCharacteristic; + return this; + } + + public boolean hasCharacteristic() { + if (this.characteristic == null) + return false; + for (CodeableConcept item : this.characteristic) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addCharacteristic() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return t; + } + + public Location addCharacteristic(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.characteristic == null) + this.characteristic = new ArrayList(); + this.characteristic.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3} + */ + public CodeableConcept getCharacteristicFirstRep() { + if (getCharacteristic().isEmpty()) { + addCharacteristic(); + } + return getCharacteristic().get(0); + } + + /** + * @return {@link #hoursOfOperation} (What days/times during a week is this location usually open, and any exceptions where the location is not available.) + */ + public List getHoursOfOperation() { + if (this.hoursOfOperation == null) + this.hoursOfOperation = new ArrayList(); + return this.hoursOfOperation; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setHoursOfOperation(List theHoursOfOperation) { + this.hoursOfOperation = theHoursOfOperation; + return this; + } + + public boolean hasHoursOfOperation() { + if (this.hoursOfOperation == null) + return false; + for (Availability item : this.hoursOfOperation) + if (!item.isEmpty()) + return true; + return false; + } + + public Availability addHoursOfOperation() { //3 + Availability t = new Availability(); + if (this.hoursOfOperation == null) + this.hoursOfOperation = new ArrayList(); + this.hoursOfOperation.add(t); + return t; + } + + public Location addHoursOfOperation(Availability t) { //3 + if (t == null) + return this; + if (this.hoursOfOperation == null) + this.hoursOfOperation = new ArrayList(); + this.hoursOfOperation.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #hoursOfOperation}, creating it if it does not already exist {3} + */ + public Availability getHoursOfOperationFirstRep() { + if (getHoursOfOperation().isEmpty()) { + addHoursOfOperation(); + } + return getHoursOfOperation().get(0); + } + + /** + * @return {@link #virtualService} (Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).) + */ + public List getVirtualService() { + if (this.virtualService == null) + this.virtualService = new ArrayList(); + return this.virtualService; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setVirtualService(List theVirtualService) { + this.virtualService = theVirtualService; + return this; + } + + public boolean hasVirtualService() { + if (this.virtualService == null) + return false; + for (VirtualServiceDetail item : this.virtualService) + if (!item.isEmpty()) + return true; + return false; + } + + public VirtualServiceDetail addVirtualService() { //3 + VirtualServiceDetail t = new VirtualServiceDetail(); + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return t; + } + + public Location addVirtualService(VirtualServiceDetail t) { //3 + if (t == null) + return this; + if (this.virtualService == null) + this.virtualService = new ArrayList(); + this.virtualService.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} + */ + public VirtualServiceDetail getVirtualServiceFirstRep() { + if (getVirtualService().isEmpty()) { + addVirtualService(); + } + return getVirtualService().get(0); + } + + /** + * @return {@link #endpoint} (Technical endpoints providing access to services operated for the location.) + */ + public List getEndpoint() { + if (this.endpoint == null) + this.endpoint = new ArrayList(); + return this.endpoint; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public Location setEndpoint(List theEndpoint) { + this.endpoint = theEndpoint; + return this; + } + + public boolean hasEndpoint() { + if (this.endpoint == null) + return false; + for (Reference item : this.endpoint) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addEndpoint() { //3 + Reference t = new Reference(); + if (this.endpoint == null) + this.endpoint = new ArrayList(); + this.endpoint.add(t); + return t; + } + + public Location addEndpoint(Reference t) { //3 + if (t == null) + return this; + if (this.endpoint == null) + this.endpoint = new ArrayList(); + this.endpoint.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3} + */ + public Reference getEndpointFirstRep() { + if (getEndpoint().isEmpty()) { + addEndpoint(); + } + return getEndpoint().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier)); + children.add(new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status)); + children.add(new Property("operationalStatus", "Coding", "The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.", 0, 1, operationalStatus)); + children.add(new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name)); + children.add(new Property("alias", "string", "A list of alternate names that the location is known as, or was known as, in the past.", 0, java.lang.Integer.MAX_VALUE, alias)); + children.add(new Property("description", "markdown", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description)); + children.add(new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode)); + children.add(new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type)); + children.add(new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact)); + children.add(new Property("address", "Address", "Physical location.", 0, 1, address)); + children.add(new Property("form", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road, virtual.", 0, 1, form)); + children.add(new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position)); + children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization)); + children.add(new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf)); + children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic)); + children.add(new Property("hoursOfOperation", "Availability", "What days/times during a week is this location usually open, and any exceptions where the location is not available.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation)); + children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).", 0, java.lang.Integer.MAX_VALUE, virtualService)); + children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Unique code or number identifying the location to its users.", 0, java.lang.Integer.MAX_VALUE, identifier); + case -892481550: /*status*/ return new Property("status", "code", "The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location.", 0, 1, status); + case -2103166364: /*operationalStatus*/ return new Property("operationalStatus", "Coding", "The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance.", 0, 1, operationalStatus); + case 3373707: /*name*/ return new Property("name", "string", "Name of the location as used by humans. Does not need to be unique.", 0, 1, name); + case 92902992: /*alias*/ return new Property("alias", "string", "A list of alternate names that the location is known as, or was known as, in the past.", 0, java.lang.Integer.MAX_VALUE, alias); + case -1724546052: /*description*/ return new Property("description", "markdown", "Description of the Location, which helps in finding or referencing the place.", 0, 1, description); + case 3357091: /*mode*/ return new Property("mode", "code", "Indicates whether a resource instance represents a specific location or a class of locations.", 0, 1, mode); + case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Indicates the type of function performed at the location.", 0, java.lang.Integer.MAX_VALUE, type); + case 951526432: /*contact*/ return new Property("contact", "ExtendedContactDetail", "The contact details of communication devices available at the location. This can include addresses, phone numbers, fax numbers, mobile numbers, email addresses and web sites.", 0, java.lang.Integer.MAX_VALUE, contact); + case -1147692044: /*address*/ return new Property("address", "Address", "Physical location.", 0, 1, address); + case 3148996: /*form*/ return new Property("form", "CodeableConcept", "Physical form of the location, e.g. building, room, vehicle, road, virtual.", 0, 1, form); + case 747804969: /*position*/ return new Property("position", "", "The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).", 0, 1, position); + case -2058947787: /*managingOrganization*/ return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the provisioning and upkeep of the location.", 0, 1, managingOrganization); + case -995410646: /*partOf*/ return new Property("partOf", "Reference(Location)", "Another Location of which this Location is physically a part of.", 0, 1, partOf); + case 366313883: /*characteristic*/ return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic); + case -1588872511: /*hoursOfOperation*/ return new Property("hoursOfOperation", "Availability", "What days/times during a week is this location usually open, and any exceptions where the location is not available.", 0, java.lang.Integer.MAX_VALUE, hoursOfOperation); + case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. shared conference call facility with dedicated number/details).", 0, java.lang.Integer.MAX_VALUE, virtualService); + case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the location.", 0, java.lang.Integer.MAX_VALUE, endpoint); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case -2103166364: /*operationalStatus*/ return this.operationalStatus == null ? new Base[0] : new Base[] {this.operationalStatus}; // Coding + case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType + case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType + case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType + case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration + case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept + case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ExtendedContactDetail + case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // Address + case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept + case 747804969: /*position*/ return this.position == null ? new Base[0] : new Base[] {this.position}; // LocationPositionComponent + case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference + case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : new Base[] {this.partOf}; // Reference + case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept + case -1588872511: /*hoursOfOperation*/ return this.hoursOfOperation == null ? new Base[0] : this.hoursOfOperation.toArray(new Base[this.hoursOfOperation.size()]); // Availability + case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail + case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier + return value; + case -892481550: // status + value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case -2103166364: // operationalStatus + this.operationalStatus = TypeConvertor.castToCoding(value); // Coding + return value; + case 3373707: // name + this.name = TypeConvertor.castToString(value); // StringType + return value; + case 92902992: // alias + this.getAlias().add(TypeConvertor.castToString(value)); // StringType + return value; + case -1724546052: // description + this.description = TypeConvertor.castToMarkdown(value); // MarkdownType + return value; + case 3357091: // mode + value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.mode = (Enumeration) value; // Enumeration + return value; + case 3575610: // type + this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 951526432: // contact + this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); // ExtendedContactDetail + return value; + case -1147692044: // address + this.address = TypeConvertor.castToAddress(value); // Address + return value; + case 3148996: // form + this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 747804969: // position + this.position = (LocationPositionComponent) value; // LocationPositionComponent + return value; + case -2058947787: // managingOrganization + this.managingOrganization = TypeConvertor.castToReference(value); // Reference + return value; + case -995410646: // partOf + this.partOf = TypeConvertor.castToReference(value); // Reference + return value; + case 366313883: // characteristic + this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case -1588872511: // hoursOfOperation + this.getHoursOfOperation().add(TypeConvertor.castToAvailability(value)); // Availability + return value; + case 1420774698: // virtualService + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail + return value; + case 1741102485: // endpoint + this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); + } else if (name.equals("status")) { + value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("operationalStatus")) { + this.operationalStatus = TypeConvertor.castToCoding(value); // Coding + } else if (name.equals("name")) { + this.name = TypeConvertor.castToString(value); // StringType + } else if (name.equals("alias")) { + this.getAlias().add(TypeConvertor.castToString(value)); + } else if (name.equals("description")) { + this.description = TypeConvertor.castToMarkdown(value); // MarkdownType + } else if (name.equals("mode")) { + value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.mode = (Enumeration) value; // Enumeration + } else if (name.equals("type")) { + this.getType().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("contact")) { + this.getContact().add(TypeConvertor.castToExtendedContactDetail(value)); + } else if (name.equals("address")) { + this.address = TypeConvertor.castToAddress(value); // Address + } else if (name.equals("form")) { + this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("position")) { + this.position = (LocationPositionComponent) value; // LocationPositionComponent + } else if (name.equals("managingOrganization")) { + this.managingOrganization = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("partOf")) { + this.partOf = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("characteristic")) { + this.getCharacteristic().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("hoursOfOperation")) { + this.getHoursOfOperation().add(TypeConvertor.castToAvailability(value)); + } else if (name.equals("virtualService")) { + this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); + } else if (name.equals("endpoint")) { + this.getEndpoint().add(TypeConvertor.castToReference(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().remove(value); + } else if (name.equals("status")) { + value = new LocationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("operationalStatus")) { + this.operationalStatus = null; + } else if (name.equals("name")) { + this.name = null; + } else if (name.equals("alias")) { + this.getAlias().remove(value); + } else if (name.equals("description")) { + this.description = null; + } else if (name.equals("mode")) { + value = new LocationModeEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.mode = (Enumeration) value; // Enumeration + } else if (name.equals("type")) { + this.getType().remove(value); + } else if (name.equals("contact")) { + this.getContact().remove(value); + } else if (name.equals("address")) { + this.address = null; + } else if (name.equals("form")) { + this.form = null; + } else if (name.equals("position")) { + this.position = (LocationPositionComponent) value; // LocationPositionComponent + } else if (name.equals("managingOrganization")) { + this.managingOrganization = null; + } else if (name.equals("partOf")) { + this.partOf = null; + } else if (name.equals("characteristic")) { + this.getCharacteristic().remove(value); + } else if (name.equals("hoursOfOperation")) { + this.getHoursOfOperation().remove(value); + } else if (name.equals("virtualService")) { + this.getVirtualService().remove(value); + } else if (name.equals("endpoint")) { + this.getEndpoint().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return addIdentifier(); + case -892481550: return getStatusElement(); + case -2103166364: return getOperationalStatus(); + case 3373707: return getNameElement(); + case 92902992: return addAliasElement(); + case -1724546052: return getDescriptionElement(); + case 3357091: return getModeElement(); + case 3575610: return addType(); + case 951526432: return addContact(); + case -1147692044: return getAddress(); + case 3148996: return getForm(); + case 747804969: return getPosition(); + case -2058947787: return getManagingOrganization(); + case -995410646: return getPartOf(); + case 366313883: return addCharacteristic(); + case -1588872511: return addHoursOfOperation(); + case 1420774698: return addVirtualService(); + case 1741102485: return addEndpoint(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case -892481550: /*status*/ return new String[] {"code"}; + case -2103166364: /*operationalStatus*/ return new String[] {"Coding"}; + case 3373707: /*name*/ return new String[] {"string"}; + case 92902992: /*alias*/ return new String[] {"string"}; + case -1724546052: /*description*/ return new String[] {"markdown"}; + case 3357091: /*mode*/ return new String[] {"code"}; + case 3575610: /*type*/ return new String[] {"CodeableConcept"}; + case 951526432: /*contact*/ return new String[] {"ExtendedContactDetail"}; + case -1147692044: /*address*/ return new String[] {"Address"}; + case 3148996: /*form*/ return new String[] {"CodeableConcept"}; + case 747804969: /*position*/ return new String[] {}; + case -2058947787: /*managingOrganization*/ return new String[] {"Reference"}; + case -995410646: /*partOf*/ return new String[] {"Reference"}; + case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"}; + case -1588872511: /*hoursOfOperation*/ return new String[] {"Availability"}; + case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; + case 1741102485: /*endpoint*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.status"); + } + else if (name.equals("operationalStatus")) { + this.operationalStatus = new Coding(); + return this.operationalStatus; + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.name"); + } + else if (name.equals("alias")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.alias"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.description"); + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a singleton property Location.mode"); + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("address")) { + this.address = new Address(); + return this.address; + } + else if (name.equals("form")) { + this.form = new CodeableConcept(); + return this.form; + } + else if (name.equals("position")) { + this.position = new LocationPositionComponent(); + return this.position; + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else if (name.equals("partOf")) { + this.partOf = new Reference(); + return this.partOf; + } + else if (name.equals("characteristic")) { + return addCharacteristic(); + } + else if (name.equals("hoursOfOperation")) { + return addHoursOfOperation(); + } + else if (name.equals("virtualService")) { + return addVirtualService(); + } + else if (name.equals("endpoint")) { + return addEndpoint(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Location"; + + } + + public Location copy() { + Location dst = new Location(); + copyValues(dst); + return dst; + } + + public void copyValues(Location dst) { + super.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(); + dst.operationalStatus = operationalStatus == null ? null : operationalStatus.copy(); + dst.name = name == null ? null : name.copy(); + if (alias != null) { + dst.alias = new ArrayList(); + for (StringType i : alias) + dst.alias.add(i.copy()); + }; + dst.description = description == null ? null : description.copy(); + dst.mode = mode == null ? null : mode.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + if (contact != null) { + dst.contact = new ArrayList(); + for (ExtendedContactDetail i : contact) + dst.contact.add(i.copy()); + }; + dst.address = address == null ? null : address.copy(); + dst.form = form == null ? null : form.copy(); + dst.position = position == null ? null : position.copy(); + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.partOf = partOf == null ? null : partOf.copy(); + if (characteristic != null) { + dst.characteristic = new ArrayList(); + for (CodeableConcept i : characteristic) + dst.characteristic.add(i.copy()); + }; + if (hoursOfOperation != null) { + dst.hoursOfOperation = new ArrayList(); + for (Availability i : hoursOfOperation) + dst.hoursOfOperation.add(i.copy()); + }; + if (virtualService != null) { + dst.virtualService = new ArrayList(); + for (VirtualServiceDetail i : virtualService) + dst.virtualService.add(i.copy()); + }; + if (endpoint != null) { + dst.endpoint = new ArrayList(); + for (Reference i : endpoint) + dst.endpoint.add(i.copy()); + }; + } + + protected Location typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof Location)) + return false; + Location o = (Location) other_; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(operationalStatus, o.operationalStatus, true) + && compareDeep(name, o.name, true) && compareDeep(alias, o.alias, true) && compareDeep(description, o.description, true) + && compareDeep(mode, o.mode, true) && compareDeep(type, o.type, true) && compareDeep(contact, o.contact, true) + && compareDeep(address, o.address, true) && compareDeep(form, o.form, true) && compareDeep(position, o.position, true) + && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(partOf, o.partOf, true) + && compareDeep(characteristic, o.characteristic, true) && compareDeep(hoursOfOperation, o.hoursOfOperation, true) + && compareDeep(virtualService, o.virtualService, true) && compareDeep(endpoint, o.endpoint, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof Location)) + return false; + Location o = (Location) other_; + return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(alias, o.alias, true) + && compareValues(description, o.description, true) && compareValues(mode, o.mode, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, operationalStatus + , name, alias, description, mode, type, contact, address, form, position, managingOrganization + , partOf, characteristic, hoursOfOperation, virtualService, endpoint); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Location; + } + + /** + * Search parameter: address-city + *

+ * Description: A city specified in an address
+ * Type: string
+ * Path: Location.address.city
+ *

+ */ + @SearchParamDefinition(name="address-city", path="Location.address.city", description="A city specified in an address", type="string" ) + public static final String SP_ADDRESS_CITY = "address-city"; + /** + * Fluent Client search parameter constant for address-city + *

+ * Description: A city specified in an address
+ * Type: string
+ * Path: Location.address.city
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_CITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_CITY); + + /** + * Search parameter: address-country + *

+ * Description: A country specified in an address
+ * Type: string
+ * Path: Location.address.country
+ *

+ */ + @SearchParamDefinition(name="address-country", path="Location.address.country", description="A country specified in an address", type="string" ) + public static final String SP_ADDRESS_COUNTRY = "address-country"; + /** + * Fluent Client search parameter constant for address-country + *

+ * Description: A country specified in an address
+ * Type: string
+ * Path: Location.address.country
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY); + + /** + * Search parameter: address-postalcode + *

+ * Description: A postal code specified in an address
+ * Type: string
+ * Path: Location.address.postalCode
+ *

+ */ + @SearchParamDefinition(name="address-postalcode", path="Location.address.postalCode", description="A postal code specified in an address", type="string" ) + public static final String SP_ADDRESS_POSTALCODE = "address-postalcode"; + /** + * Fluent Client search parameter constant for address-postalcode + *

+ * Description: A postal code specified in an address
+ * Type: string
+ * Path: Location.address.postalCode
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_POSTALCODE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_POSTALCODE); + + /** + * Search parameter: address-state + *

+ * Description: A state specified in an address
+ * Type: string
+ * Path: Location.address.state
+ *

+ */ + @SearchParamDefinition(name="address-state", path="Location.address.state", description="A state specified in an address", type="string" ) + public static final String SP_ADDRESS_STATE = "address-state"; + /** + * Fluent Client search parameter constant for address-state + *

+ * Description: A state specified in an address
+ * Type: string
+ * Path: Location.address.state
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_STATE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_STATE); + + /** + * Search parameter: address-use + *

+ * Description: A use code specified in an address
+ * Type: token
+ * Path: Location.address.use
+ *

+ */ + @SearchParamDefinition(name="address-use", path="Location.address.use", description="A use code specified in an address", type="token" ) + public static final String SP_ADDRESS_USE = "address-use"; + /** + * Fluent Client search parameter constant for address-use + *

+ * Description: A use code specified in an address
+ * Type: token
+ * Path: Location.address.use
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDRESS_USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDRESS_USE); + + /** + * Search parameter: address + *

+ * Description: A (part of the) address of the location
+ * Type: string
+ * Path: Location.address
+ *

+ */ + @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location", type="string" ) + public static final String SP_ADDRESS = "address"; + /** + * Fluent Client search parameter constant for address + *

+ * Description: A (part of the) address of the location
+ * Type: string
+ * Path: Location.address
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS); + + /** + * Search parameter: characteristic + *

+ * Description: One of the Location's characteristics
+ * Type: token
+ * Path: Location.characteristic
+ *

+ */ + @SearchParamDefinition(name="characteristic", path="Location.characteristic", description="One of the Location's characteristics", type="token" ) + public static final String SP_CHARACTERISTIC = "characteristic"; + /** + * Fluent Client search parameter constant for characteristic + *

+ * Description: One of the Location's characteristics
+ * Type: token
+ * Path: Location.characteristic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC); + + /** + * Search parameter: contains + *

+ * Description: Select locations that contain the specified co-ordinates
+ * Type: special
+ * Path: Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value
+ *

+ */ + @SearchParamDefinition(name="contains", path="Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value", description="Select locations that contain the specified co-ordinates", type="special" ) + public static final String SP_CONTAINS = "contains"; + /** + * Fluent Client search parameter constant for contains + *

+ * Description: Select locations that contain the specified co-ordinates
+ * Type: special
+ * Path: Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.SpecialClientParam CONTAINS = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_CONTAINS); + + /** + * Search parameter: endpoint + *

+ * Description: Technical endpoints providing access to services operated for the location
+ * Type: reference
+ * Path: Location.endpoint
+ *

+ */ + @SearchParamDefinition(name="endpoint", path="Location.endpoint", description="Technical endpoints providing access to services operated for the location", type="reference", target={Endpoint.class } ) + public static final String SP_ENDPOINT = "endpoint"; + /** + * Fluent Client search parameter constant for endpoint + *

+ * Description: Technical endpoints providing access to services operated for the location
+ * Type: reference
+ * Path: Location.endpoint
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Location:endpoint". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("Location:endpoint").toLocked(); + + /** + * Search parameter: identifier + *

+ * Description: An identifier for the location
+ * Type: token
+ * Path: Location.identifier
+ *

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

+ * Description: An identifier for the location
+ * Type: token
+ * Path: Location.identifier
+ *

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

+ * Description: A portion of the location's name or alias
+ * Type: string
+ * Path: Location.name | Location.alias
+ *

+ */ + @SearchParamDefinition(name="name", path="Location.name | Location.alias", description="A portion of the location's name or alias", type="string" ) + public static final String SP_NAME = "name"; + /** + * Fluent Client search parameter constant for name + *

+ * Description: A portion of the location's name or alias
+ * Type: string
+ * Path: Location.name | Location.alias
+ *

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

* Description: Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes). -Servers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant). If the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter. +Servers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant). -Note: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.
- * Type: special
- * Path: Location.position
- *

- */ - @SearchParamDefinition(name="near", path="Location.position", description="Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes).\n\nServers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant).\r\rIf the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter.\n\nNote: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.", type="special" ) - public static final String SP_NEAR = "near"; - /** - * Fluent Client search parameter constant for near - *

+If the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter. + +Note: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.
+ * Type: special
+ * Path: Location.position
+ *

+ */ + @SearchParamDefinition(name="near", path="Location.position", description="Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes).\n\nServers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant).\r\rIf the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter.\n\nNote: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.", type="special" ) + public static final String SP_NEAR = "near"; + /** + * Fluent Client search parameter constant for near + *

* Description: Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes). -Servers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant). If the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter. +Servers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant). + +If the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter. + +Note: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.
+ * Type: special
+ * Path: Location.position
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.SpecialClientParam NEAR = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_NEAR); + + /** + * Search parameter: operational-status + *

+ * Description: Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)
+ * Type: token
+ * Path: Location.operationalStatus
+ *

+ */ + @SearchParamDefinition(name="operational-status", path="Location.operationalStatus", description="Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)", type="token" ) + public static final String SP_OPERATIONAL_STATUS = "operational-status"; + /** + * Fluent Client search parameter constant for operational-status + *

+ * Description: Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)
+ * Type: token
+ * Path: Location.operationalStatus
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam OPERATIONAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OPERATIONAL_STATUS); + + /** + * Search parameter: organization + *

+ * Description: Searches for locations that are managed by the provided organization
+ * Type: reference
+ * Path: Location.managingOrganization
+ *

+ */ + @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference", target={Organization.class } ) + public static final String SP_ORGANIZATION = "organization"; + /** + * Fluent Client search parameter constant for organization + *

+ * Description: Searches for locations that are managed by the provided organization
+ * Type: reference
+ * Path: Location.managingOrganization
+ *

+ */ + 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 "Location:organization". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Location:organization").toLocked(); + + /** + * Search parameter: partof + *

+ * Description: A location of which this location is a part
+ * Type: reference
+ * Path: Location.partOf
+ *

+ */ + @SearchParamDefinition(name="partof", path="Location.partOf", description="A location of which this location is a part", type="reference", target={Location.class } ) + public static final String SP_PARTOF = "partof"; + /** + * Fluent Client search parameter constant for partof + *

+ * Description: A location of which this location is a part
+ * Type: reference
+ * Path: Location.partOf
+ *

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

+ * Description: Searches for locations with a specific kind of status
+ * Type: token
+ * Path: Location.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Searches for locations with a specific kind of status
+ * Type: token
+ * Path: Location.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + /** + * Search parameter: type + *

+ * Description: A code for the type of location
+ * Type: token
+ * Path: Location.type
+ *

+ */ + @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: A code for the type of location
+ * Type: token
+ * Path: Location.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + +} -Note: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to.
- * Type: special
- * Path: Location.position
- *

- */ - public static final ca.uhn.fhir.rest.gclient.SpecialClientParam NEAR = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_NEAR); - - /** - * Search parameter: operational-status - *

- * Description: Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)
- * Type: token
- * Path: Location.operationalStatus
- *

- */ - @SearchParamDefinition(name="operational-status", path="Location.operationalStatus", description="Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)", type="token" ) - public static final String SP_OPERATIONAL_STATUS = "operational-status"; - /** - * Fluent Client search parameter constant for operational-status - *

- * Description: Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping)
- * Type: token
- * Path: Location.operationalStatus
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam OPERATIONAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OPERATIONAL_STATUS); - - /** - * Search parameter: organization - *

- * Description: Searches for locations that are managed by the provided organization
- * Type: reference
- * Path: Location.managingOrganization
- *

- */ - @SearchParamDefinition(name="organization", path="Location.managingOrganization", description="Searches for locations that are managed by the provided organization", type="reference", target={Organization.class } ) - public static final String SP_ORGANIZATION = "organization"; - /** - * Fluent Client search parameter constant for organization - *

- * Description: Searches for locations that are managed by the provided organization
- * Type: reference
- * Path: Location.managingOrganization
- *

- */ - 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 "Location:organization". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Location:organization").toLocked(); - - /** - * Search parameter: partof - *

- * Description: A location of which this location is a part
- * Type: reference
- * Path: Location.partOf
- *

- */ - @SearchParamDefinition(name="partof", path="Location.partOf", description="A location of which this location is a part", type="reference", target={Location.class } ) - public static final String SP_PARTOF = "partof"; - /** - * Fluent Client search parameter constant for partof - *

- * Description: A location of which this location is a part
- * Type: reference
- * Path: Location.partOf
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTOF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTOF); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Location:partof". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTOF = new ca.uhn.fhir.model.api.Include("Location:partof").toLocked(); - - /** - * Search parameter: status - *

- * Description: Searches for locations with a specific kind of status
- * Type: token
- * Path: Location.status
- *

- */ - @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status", type="token" ) - public static final String SP_STATUS = "status"; - /** - * Fluent Client search parameter constant for status - *

- * Description: Searches for locations with a specific kind of status
- * Type: token
- * Path: Location.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - - /** - * Search parameter: type - *

- * Description: A code for the type of location
- * Type: token
- * Path: Location.type
- *

- */ - @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location", type="token" ) - public static final String SP_TYPE = "type"; - /** - * Fluent Client search parameter constant for type - *

- * Description: A code for the type of location
- * Type: token
- * Path: Location.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); - - -} - diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MeasureReport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MeasureReport.java index 68bb9d473..c3a842347 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MeasureReport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MeasureReport.java @@ -152,14 +152,16 @@ public class MeasureReport extends DomainResource { throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'"); } public String toCode(MeasureReportStatus code) { - if (code == MeasureReportStatus.COMPLETE) + if (code == MeasureReportStatus.NULL) + return null; + 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(); } @@ -278,7 +280,9 @@ public class MeasureReport extends DomainResource { throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'"); } public String toCode(MeasureReportType code) { - if (code == MeasureReportType.INDIVIDUAL) + if (code == MeasureReportType.NULL) + return null; + if (code == MeasureReportType.INDIVIDUAL) return "individual"; if (code == MeasureReportType.SUBJECTLIST) return "subject-list"; @@ -287,7 +291,7 @@ public class MeasureReport extends DomainResource { if (code == MeasureReportType.DATAEXCHANGE) return "data-exchange"; return "?"; - } + } public String toSystem(MeasureReportType code) { return code.getSystem(); } @@ -378,12 +382,14 @@ public class MeasureReport extends DomainResource { throw new FHIRException("Unknown SubmitDataUpdateType code '"+codeString+"'"); } public String toCode(SubmitDataUpdateType code) { - if (code == SubmitDataUpdateType.INCREMENTAL) + if (code == SubmitDataUpdateType.NULL) + return null; + if (code == SubmitDataUpdateType.INCREMENTAL) return "incremental"; if (code == SubmitDataUpdateType.SNAPSHOT) return "snapshot"; return "?"; - } + } public String toSystem(SubmitDataUpdateType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Medication.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Medication.java index 54d52cf9c..23ba6b33e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Medication.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Medication.java @@ -152,14 +152,16 @@ public class Medication extends DomainResource { throw new FHIRException("Unknown MedicationStatusCodes code '"+codeString+"'"); } public String toCode(MedicationStatusCodes code) { - if (code == MedicationStatusCodes.ACTIVE) + if (code == MedicationStatusCodes.NULL) + return null; + if (code == MedicationStatusCodes.ACTIVE) return "active"; if (code == MedicationStatusCodes.INACTIVE) return "inactive"; if (code == MedicationStatusCodes.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(MedicationStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationAdministration.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationAdministration.java index 570605a1d..bc6669b0f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationAdministration.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationAdministration.java @@ -1,3291 +1,3303 @@ -package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.r5.model.Enumerations.*; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.ICompositeType; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import ca.uhn.fhir.model.api.annotation.Child; -import ca.uhn.fhir.model.api.annotation.ChildOrder; -import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.model.api.annotation.Block; - -/** - * 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. This event can also be used to record waste using a status of not-done and the appropriate statusReason. - */ -@ResourceDef(name="MedicationAdministration", profile="http://hl7.org/fhir/StructureDefinition/MedicationAdministration") -public class MedicationAdministration extends DomainResource { - - public enum MedicationAdministrationStatusCodes { - /** - * The administration has started but has not yet completed. - */ - INPROGRESS, - /** - * The administration was terminated prior to any impact on the subject (though preparatory actions may have been taken) - */ - NOTDONE, - /** - * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called 'suspended'. - */ - ONHOLD, - /** - * All actions that are implied by the administration have occurred. - */ - COMPLETED, - /** - * The administration was entered in error and therefore nullified. - */ - ENTEREDINERROR, - /** - * Actions implied by the administration have been permanently halted, before all of them occurred. - */ - STOPPED, - /** - * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, it's just not known which one. - */ - UNKNOWN, - /** - * added to help the parsers with the generic types - */ - NULL; - public static MedicationAdministrationStatusCodes fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("in-progress".equals(codeString)) - return INPROGRESS; - if ("not-done".equals(codeString)) - return NOTDONE; - if ("on-hold".equals(codeString)) - return ONHOLD; - if ("completed".equals(codeString)) - return COMPLETED; - if ("entered-in-error".equals(codeString)) - return ENTEREDINERROR; - if ("stopped".equals(codeString)) - return STOPPED; - if ("unknown".equals(codeString)) - return UNKNOWN; - if (Configuration.isAcceptInvalidEnums()) - return null; - else - throw new FHIRException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case INPROGRESS: return "in-progress"; - case NOTDONE: return "not-done"; - case ONHOLD: return "on-hold"; - case COMPLETED: return "completed"; - case ENTEREDINERROR: return "entered-in-error"; - case STOPPED: return "stopped"; - case UNKNOWN: return "unknown"; - case NULL: return null; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case INPROGRESS: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case NOTDONE: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case ONHOLD: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case COMPLETED: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case ENTEREDINERROR: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case STOPPED: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case UNKNOWN: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; - case NULL: return null; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case INPROGRESS: return "The administration has started but has not yet completed."; - case NOTDONE: return "The administration was terminated prior to any impact on the subject (though preparatory actions may have been taken)"; - case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; - case COMPLETED: return "All actions that are implied by the administration have occurred."; - case ENTEREDINERROR: return "The administration was entered in error and therefore nullified."; - case STOPPED: return "Actions implied by the administration have been permanently halted, before all of them occurred."; - case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, it's just not known which one."; - case NULL: return null; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case INPROGRESS: return "In Progress"; - case NOTDONE: return "Not Done"; - case ONHOLD: return "On Hold"; - case COMPLETED: return "Completed"; - case ENTEREDINERROR: return "Entered in Error"; - case STOPPED: return "Stopped"; - case UNKNOWN: return "Unknown"; - case NULL: return null; - default: return "?"; - } - } - } - - public static class MedicationAdministrationStatusCodesEnumFactory implements EnumFactory { - public MedicationAdministrationStatusCodes fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("in-progress".equals(codeString)) - return MedicationAdministrationStatusCodes.INPROGRESS; - if ("not-done".equals(codeString)) - return MedicationAdministrationStatusCodes.NOTDONE; - if ("on-hold".equals(codeString)) - return MedicationAdministrationStatusCodes.ONHOLD; - if ("completed".equals(codeString)) - return MedicationAdministrationStatusCodes.COMPLETED; - if ("entered-in-error".equals(codeString)) - return MedicationAdministrationStatusCodes.ENTEREDINERROR; - if ("stopped".equals(codeString)) - return MedicationAdministrationStatusCodes.STOPPED; - if ("unknown".equals(codeString)) - return MedicationAdministrationStatusCodes.UNKNOWN; - throw new IllegalArgumentException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); - } - public Enumeration fromType(PrimitiveType code) throws FHIRException { - if (code == null) - return null; - if (code.isEmpty()) - return new Enumeration(this, MedicationAdministrationStatusCodes.NULL, code); - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.NULL, code); - if ("in-progress".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.INPROGRESS, code); - if ("not-done".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.NOTDONE, code); - if ("on-hold".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.ONHOLD, code); - if ("completed".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.COMPLETED, code); - if ("entered-in-error".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.ENTEREDINERROR, code); - if ("stopped".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.STOPPED, code); - if ("unknown".equals(codeString)) - return new Enumeration(this, MedicationAdministrationStatusCodes.UNKNOWN, code); - throw new FHIRException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); - } - public String toCode(MedicationAdministrationStatusCodes code) { - if (code == MedicationAdministrationStatusCodes.INPROGRESS) - return "in-progress"; - if (code == MedicationAdministrationStatusCodes.NOTDONE) - return "not-done"; - if (code == MedicationAdministrationStatusCodes.ONHOLD) - return "on-hold"; - if (code == MedicationAdministrationStatusCodes.COMPLETED) - return "completed"; - if (code == MedicationAdministrationStatusCodes.ENTEREDINERROR) - return "entered-in-error"; - if (code == MedicationAdministrationStatusCodes.STOPPED) - return "stopped"; - if (code == MedicationAdministrationStatusCodes.UNKNOWN) - return "unknown"; - return "?"; - } - public String toSystem(MedicationAdministrationStatusCodes code) { - return code.getSystem(); - } - } - - @Block() - public static class MedicationAdministrationPerformerComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Distinguishes the type of involvement of the performer in the medication administration. - */ - @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Type of performance", formalDefinition="Distinguishes the type of involvement of the performer in the medication administration." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/med-admin-perform-function") - protected CodeableConcept function; - - /** - * Indicates who or what performed the medication administration. - */ - @Child(name = "actor", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who or what performed the medication administration", formalDefinition="Indicates who or what performed the medication administration." ) - protected CodeableReference actor; - - private static final long serialVersionUID = -1725418144L; - - /** - * Constructor - */ - public MedicationAdministrationPerformerComponent() { - super(); - } - - /** - * Constructor - */ - public MedicationAdministrationPerformerComponent(CodeableReference actor) { - super(); - this.setActor(actor); - } - - /** - * @return {@link #function} (Distinguishes the type of involvement of the performer in the medication administration.) - */ - public CodeableConcept getFunction() { - if (this.function == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationPerformerComponent.function"); - else if (Configuration.doAutoCreate()) - this.function = new CodeableConcept(); // cc - return this.function; - } - - public boolean hasFunction() { - return this.function != null && !this.function.isEmpty(); - } - - /** - * @param value {@link #function} (Distinguishes the type of involvement of the performer in the medication administration.) - */ - public MedicationAdministrationPerformerComponent setFunction(CodeableConcept value) { - this.function = value; - return this; - } - - /** - * @return {@link #actor} (Indicates who or what performed the medication administration.) - */ - public CodeableReference getActor() { - if (this.actor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationPerformerComponent.actor"); - else if (Configuration.doAutoCreate()) - this.actor = new CodeableReference(); // cc - return this.actor; - } - - public boolean hasActor() { - return this.actor != null && !this.actor.isEmpty(); - } - - /** - * @param value {@link #actor} (Indicates who or what performed the medication administration.) - */ - public MedicationAdministrationPerformerComponent setActor(CodeableReference value) { - this.actor = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the medication administration.", 0, 1, function)); - children.add(new Property("actor", "CodeableReference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device)", "Indicates who or what performed the medication administration.", 0, 1, actor)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the medication administration.", 0, 1, function); - case 92645877: /*actor*/ return new Property("actor", "CodeableReference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device)", "Indicates who or what performed the medication administration.", 0, 1, actor); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept - case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // CodeableReference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 1380938712: // function - this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 92645877: // actor - this.actor = TypeConvertor.castToCodeableReference(value); // CodeableReference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("function")) { - this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("actor")) { - this.actor = TypeConvertor.castToCodeableReference(value); // CodeableReference - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("function")) { - this.function = null; - } else if (name.equals("actor")) { - this.actor = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1380938712: return getFunction(); - case 92645877: return getActor(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; - case 92645877: /*actor*/ return new String[] {"CodeableReference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("function")) { - this.function = new CodeableConcept(); - return this.function; - } - else if (name.equals("actor")) { - this.actor = new CodeableReference(); - return this.actor; - } - else - return super.addChild(name); - } - - public MedicationAdministrationPerformerComponent copy() { - MedicationAdministrationPerformerComponent dst = new MedicationAdministrationPerformerComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(MedicationAdministrationPerformerComponent dst) { - super.copyValues(dst); - dst.function = function == null ? null : function.copy(); - dst.actor = actor == null ? null : actor.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof MedicationAdministrationPerformerComponent)) - return false; - MedicationAdministrationPerformerComponent o = (MedicationAdministrationPerformerComponent) other_; - return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof MedicationAdministrationPerformerComponent)) - return false; - MedicationAdministrationPerformerComponent o = (MedicationAdministrationPerformerComponent) other_; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor); - } - - public String fhirType() { - return "MedicationAdministration.performer"; - - } - - } - - @Block() - public static class MedicationAdministrationDosageComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered. - */ - @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Free text dosage instructions e.g. SIG", formalDefinition="Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered." ) - protected StringType text; - - /** - * A coded specification of the anatomic site where the medication first entered the body. For example, "left arm". - */ - @Child(name = "site", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Body site administered to", formalDefinition="A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\"." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/approach-site-codes") - protected CodeableConcept site; - - /** - * A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc. - */ - @Child(name = "route", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Path of substance into body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/route-codes") - protected CodeableConcept route; - - /** - * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. - */ - @Child(name = "method", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="How drug was administered", formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administration-method-codes") - protected CodeableConcept method; - - /** - * The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection. - */ - @Child(name = "dose", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Amount of medication per dose", formalDefinition="The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection." ) - protected Quantity dose; - - /** - * 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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. - */ - @Child(name = "rate", type = {Ratio.class, Quantity.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Dose quantity 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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) - protected DataType rate; - - private static final long serialVersionUID = -484090956L; - - /** - * Constructor - */ - public MedicationAdministrationDosageComponent() { - super(); - } - - /** - * @return {@link #text} (Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value - */ - public StringType getTextElement() { - if (this.text == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.text"); - else if (Configuration.doAutoCreate()) - this.text = new StringType(); // bb - return this.text; - } - - public boolean hasTextElement() { - return this.text != null && !this.text.isEmpty(); - } - - public boolean hasText() { - return this.text != null && !this.text.isEmpty(); - } - - /** - * @param value {@link #text} (Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value - */ - public MedicationAdministrationDosageComponent setTextElement(StringType value) { - this.text = value; - return this; - } - - /** - * @return Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered. - */ - public String getText() { - return this.text == null ? null : this.text.getValue(); - } - - /** - * @param value Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. The dosage instructions should reflect the dosage of the medication that was administered. - */ - public MedicationAdministrationDosageComponent setText(String value) { - if (Utilities.noString(value)) - this.text = null; - else { - if (this.text == null) - this.text = new StringType(); - this.text.setValue(value); - } - return this; - } - - /** - * @return {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) - */ - public CodeableConcept getSite() { - if (this.site == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.site"); - else if (Configuration.doAutoCreate()) - this.site = new CodeableConcept(); // cc - return this.site; - } - - public boolean hasSite() { - return this.site != null && !this.site.isEmpty(); - } - - /** - * @param value {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) - */ - public MedicationAdministrationDosageComponent setSite(CodeableConcept value) { - this.site = value; - return this; - } - - /** - * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) - */ - public CodeableConcept getRoute() { - if (this.route == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.route"); - else if (Configuration.doAutoCreate()) - this.route = new CodeableConcept(); // cc - return this.route; - } - - public boolean hasRoute() { - return this.route != null && !this.route.isEmpty(); - } - - /** - * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) - */ - public MedicationAdministrationDosageComponent setRoute(CodeableConcept value) { - this.route = value; - return this; - } - - /** - * @return {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) - */ - public CodeableConcept getMethod() { - if (this.method == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.method"); - else if (Configuration.doAutoCreate()) - this.method = new CodeableConcept(); // cc - return this.method; - } - - public boolean hasMethod() { - return this.method != null && !this.method.isEmpty(); - } - - /** - * @param value {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) - */ - public MedicationAdministrationDosageComponent setMethod(CodeableConcept value) { - this.method = value; - return this; - } - - /** - * @return {@link #dose} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) - */ - public Quantity getDose() { - if (this.dose == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.dose"); - else if (Configuration.doAutoCreate()) - this.dose = new Quantity(); // cc - return this.dose; - } - - public boolean hasDose() { - return this.dose != null && !this.dose.isEmpty(); - } - - /** - * @param value {@link #dose} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) - */ - public MedicationAdministrationDosageComponent setDose(Quantity value) { - this.dose = value; - return this; - } - - /** - * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) - */ - public DataType getRate() { - return this.rate; - } - - /** - * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) - */ - public Ratio getRateRatio() throws FHIRException { - if (this.rate == null) - this.rate = new Ratio(); - if (!(this.rate instanceof Ratio)) - throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); - return (Ratio) this.rate; - } - - public boolean hasRateRatio() { - return this != null && this.rate instanceof Ratio; - } - - /** - * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) - */ - public Quantity getRateQuantity() throws FHIRException { - if (this.rate == null) - this.rate = new Quantity(); - if (!(this.rate instanceof Quantity)) - throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.rate.getClass().getName()+" was encountered"); - return (Quantity) this.rate; - } - - public boolean hasRateQuantity() { - return this != null && this.rate instanceof Quantity; - } - - public boolean hasRate() { - return this.rate != null && !this.rate.isEmpty(); - } - - /** - * @param value {@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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) - */ - public MedicationAdministrationDosageComponent setRate(DataType value) { - if (value != null && !(value instanceof Ratio || value instanceof Quantity)) - throw new FHIRException("Not the right type for MedicationAdministration.dosage.rate[x]: "+value.fhirType()); - this.rate = value; - return this; - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("text", "string", "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.", 0, 1, text)); - children.add(new Property("site", "CodeableConcept", "A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\".", 0, 1, site)); - children.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", 0, 1, route)); - children.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, 1, method)); - children.add(new Property("dose", "Quantity", "The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", 0, 1, dose)); - children.add(new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case 3556653: /*text*/ return new Property("text", "string", "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.", 0, 1, text); - case 3530567: /*site*/ return new Property("site", "CodeableConcept", "A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\".", 0, 1, site); - case 108704329: /*route*/ return new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", 0, 1, route); - case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, 1, method); - case 3089437: /*dose*/ return new Property("dose", "Quantity", "The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", 0, 1, dose); - case 983460768: /*rate[x]*/ return new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); - case 3493088: /*rate*/ return new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); - case 204021515: /*rateRatio*/ return new Property("rate[x]", "Ratio", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); - case -1085459061: /*rateQuantity*/ return new Property("rate[x]", "Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType - case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // CodeableConcept - case 108704329: /*route*/ return this.route == null ? new Base[0] : new Base[] {this.route}; // CodeableConcept - case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept - case 3089437: /*dose*/ return this.dose == null ? new Base[0] : new Base[] {this.dose}; // Quantity - case 3493088: /*rate*/ return this.rate == null ? new Base[0] : new Base[] {this.rate}; // DataType - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case 3556653: // text - this.text = TypeConvertor.castToString(value); // StringType - return value; - case 3530567: // site - this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 108704329: // route - this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case -1077554975: // method - this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - return value; - case 3089437: // dose - this.dose = TypeConvertor.castToQuantity(value); // Quantity - return value; - case 3493088: // rate - this.rate = TypeConvertor.castToType(value); // DataType - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("text")) { - this.text = TypeConvertor.castToString(value); // StringType - } else if (name.equals("site")) { - this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("route")) { - this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("method")) { - this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept - } else if (name.equals("dose")) { - this.dose = TypeConvertor.castToQuantity(value); // Quantity - } else if (name.equals("rate[x]")) { - this.rate = TypeConvertor.castToType(value); // DataType - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("text")) { - this.text = null; - } else if (name.equals("site")) { - this.site = null; - } else if (name.equals("route")) { - this.route = null; - } else if (name.equals("method")) { - this.method = null; - } else if (name.equals("dose")) { - this.dose = null; - } else if (name.equals("rate[x]")) { - this.rate = null; - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3556653: return getTextElement(); - case 3530567: return getSite(); - case 108704329: return getRoute(); - case -1077554975: return getMethod(); - case 3089437: return getDose(); - case 983460768: return getRate(); - case 3493088: return getRate(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case 3556653: /*text*/ return new String[] {"string"}; - case 3530567: /*site*/ return new String[] {"CodeableConcept"}; - case 108704329: /*route*/ return new String[] {"CodeableConcept"}; - case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; - case 3089437: /*dose*/ return new String[] {"Quantity"}; - case 3493088: /*rate*/ return new String[] {"Ratio", "Quantity"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.dosage.text"); - } - else if (name.equals("site")) { - this.site = new CodeableConcept(); - return this.site; - } - else if (name.equals("route")) { - this.route = new CodeableConcept(); - return this.route; - } - else if (name.equals("method")) { - this.method = new CodeableConcept(); - return this.method; - } - else if (name.equals("dose")) { - this.dose = new Quantity(); - return this.dose; - } - else if (name.equals("rateRatio")) { - this.rate = new Ratio(); - return this.rate; - } - else if (name.equals("rateQuantity")) { - this.rate = new Quantity(); - return this.rate; - } - else - return super.addChild(name); - } - - public MedicationAdministrationDosageComponent copy() { - MedicationAdministrationDosageComponent dst = new MedicationAdministrationDosageComponent(); - copyValues(dst); - return dst; - } - - public void copyValues(MedicationAdministrationDosageComponent dst) { - super.copyValues(dst); - dst.text = text == null ? null : text.copy(); - dst.site = site == null ? null : site.copy(); - dst.route = route == null ? null : route.copy(); - dst.method = method == null ? null : method.copy(); - dst.dose = dose == null ? null : dose.copy(); - dst.rate = rate == null ? null : rate.copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof MedicationAdministrationDosageComponent)) - return false; - MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other_; - return compareDeep(text, o.text, true) && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) - && compareDeep(method, o.method, true) && compareDeep(dose, o.dose, true) && compareDeep(rate, o.rate, true) - ; - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof MedicationAdministrationDosageComponent)) - return false; - MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other_; - return compareValues(text, o.text, true); - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(text, site, route, method - , dose, rate); - } - - public String fhirType() { - return "MedicationAdministration.dosage"; - - } - - } - - /** - * Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="External identifier", formalDefinition="Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) - protected List identifier; - - /** - * A plan that is fulfilled in whole or in part by this MedicationAdministration. - */ - @Child(name = "basedOn", type = {CarePlan.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Plan this is fulfilled by this administration", formalDefinition="A plan that is fulfilled in whole or in part by this MedicationAdministration." ) - protected List basedOn; - - /** - * A larger event of which this particular event is a component or step. - */ - @Child(name = "partOf", type = {MedicationAdministration.class, Procedure.class, MedicationDispense.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." ) - protected List partOf; - - /** - * Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. - */ - @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="in-progress | not-done | on-hold | completed | entered-in-error | stopped | unknown", formalDefinition="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-admin-status") - protected Enumeration status; - - /** - * A code indicating why the administration was not performed. - */ - @Child(name = "statusReason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Reason administration not performed", formalDefinition="A code indicating why the administration was not performed." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes") - protected List statusReason; - - /** - * The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication). - */ - @Child(name = "category", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Type of medication administration", formalDefinition="The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication)." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-admin-location") - protected List category; - - /** - * Identifies the medication that was 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. - */ - @Child(name = "medication", type = {CodeableReference.class}, order=6, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="What was administered", formalDefinition="Identifies the medication that was 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." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") - protected CodeableReference medication; - - /** - * The person or animal or group receiving the medication. - */ - @Child(name = "subject", type = {Patient.class, Group.class}, order=7, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who received medication", formalDefinition="The person or animal or group receiving the medication." ) - protected Reference subject; - - /** - * The visit, admission, or other contact between patient and health care provider during which the medication administration was performed. - */ - @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit, admission, or other contact between patient and health care provider during which the medication administration was performed." ) - protected Reference encounter; - - /** - * Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says "give "x" if the heartrate exceeds "y"", then the heart rate can be included using this attribute. - */ - @Child(name = "supportingInformation", type = {Reference.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Additional information to support administration", formalDefinition="Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute." ) - protected List supportingInformation; - - /** - * A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate. - */ - @Child(name = "occurence", type = {DateTimeType.class, Period.class, Timing.class}, order=10, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Specific date/time or interval of time during which the administration took place (or did not take place)", formalDefinition="A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." ) - protected DataType occurence; - - /** - * The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. - */ - @Child(name = "recorded", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="When the MedicationAdministration was first captured in the subject's record", formalDefinition="The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event." ) - protected DateTimeType recorded; - - /** - * An indication that the full dose was not administered. - */ - @Child(name = "isSubPotent", type = {BooleanType.class}, order=12, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Full dose was not administered", formalDefinition="An indication that the full dose was not administered." ) - protected BooleanType isSubPotent; - - /** - * The reason or reasons why the full dose was not administered. - */ - @Child(name = "subPotentReason", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Reason full dose was not administered", formalDefinition="The reason or reasons why the full dose was not administered." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administration-subpotent-reason") - protected List subPotentReason; - - /** - * The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers. - */ - @Child(name = "performer", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Who or what performed the medication administration and what type of performance they did", formalDefinition="The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers." ) - protected List performer; - - /** - * A code, Condition or observation that supports why the medication was administered. - */ - @Child(name = "reason", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Concept, condition or observation that supports why the medication was administered", formalDefinition="A code, Condition or observation that supports why the medication was administered." ) - @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reason-medication-given-codes") - protected List reason; - - /** - * The original request, instruction or authority to perform the administration. - */ - @Child(name = "request", type = {MedicationRequest.class}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Request administration performed against", formalDefinition="The original request, instruction or authority to perform the administration." ) - protected Reference request; - - /** - * The device that is to be used for the administration of the medication (for example, PCA Pump). - */ - @Child(name = "device", type = {CodeableReference.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Device used to administer", formalDefinition="The device that is to be used for the administration of the medication (for example, PCA Pump)." ) - protected List device; - - /** - * Extra information about the medication administration that is not conveyed by the other attributes. - */ - @Child(name = "note", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Information about the administration", formalDefinition="Extra information about the medication administration that is not conveyed by the other attributes." ) - protected List note; - - /** - * Describes the medication dosage information details e.g. dose, rate, site, route, etc. - */ - @Child(name = "dosage", type = {}, order=19, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Details of how medication was taken", formalDefinition="Describes the medication dosage information details e.g. dose, rate, site, route, etc." ) - protected MedicationAdministrationDosageComponent dosage; - - /** - * A summary of the events of interest that have occurred, such as when the administration was verified. - */ - @Child(name = "eventHistory", type = {Provenance.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred, such as when the administration was verified." ) - protected List eventHistory; - - private static final long serialVersionUID = 296165909L; - - /** - * Constructor - */ - public MedicationAdministration() { - super(); - } - - /** - * Constructor - */ - public MedicationAdministration(MedicationAdministrationStatusCodes status, CodeableReference medication, Reference subject, DataType occurence) { - super(); - this.setStatus(status); - this.setMedication(medication); - this.setSubject(subject); - this.setOccurence(occurence); - } - - /** - * @return {@link #identifier} (Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setIdentifier(List theIdentifier) { - this.identifier = theIdentifier; - return this; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - public MedicationAdministration addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} - */ - public Identifier getIdentifierFirstRep() { - if (getIdentifier().isEmpty()) { - addIdentifier(); - } - return getIdentifier().get(0); - } - - /** - * @return {@link #basedOn} (A plan that is fulfilled in whole or in part by this MedicationAdministration.) - */ - public List getBasedOn() { - if (this.basedOn == null) - this.basedOn = new ArrayList(); - return this.basedOn; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setBasedOn(List theBasedOn) { - this.basedOn = theBasedOn; - return this; - } - - public boolean hasBasedOn() { - if (this.basedOn == null) - return false; - for (Reference item : this.basedOn) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addBasedOn() { //3 - Reference t = new Reference(); - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return t; - } - - public MedicationAdministration addBasedOn(Reference t) { //3 - if (t == null) - return this; - if (this.basedOn == null) - this.basedOn = new ArrayList(); - this.basedOn.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} - */ - public Reference getBasedOnFirstRep() { - if (getBasedOn().isEmpty()) { - addBasedOn(); - } - return getBasedOn().get(0); - } - - /** - * @return {@link #partOf} (A larger event of which this particular event is a component or step.) - */ - public List getPartOf() { - if (this.partOf == null) - this.partOf = new ArrayList(); - return this.partOf; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setPartOf(List thePartOf) { - this.partOf = thePartOf; - return this; - } - - public boolean hasPartOf() { - if (this.partOf == null) - return false; - for (Reference item : this.partOf) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addPartOf() { //3 - Reference t = new Reference(); - if (this.partOf == null) - this.partOf = new ArrayList(); - this.partOf.add(t); - return t; - } - - public MedicationAdministration addPartOf(Reference t) { //3 - if (t == null) - return this; - if (this.partOf == null) - this.partOf = new ArrayList(); - this.partOf.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3} - */ - public Reference getPartOfFirstRep() { - if (getPartOf().isEmpty()) { - addPartOf(); - } - return getPartOf().get(0); - } - - /** - * @return {@link #status} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). 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 MedicationAdministration.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new MedicationAdministrationStatusCodesEnumFactory()); // 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} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public MedicationAdministration setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. - */ - public MedicationAdministrationStatusCodes getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. - */ - public MedicationAdministration setStatus(MedicationAdministrationStatusCodes value) { - if (this.status == null) - this.status = new Enumeration(new MedicationAdministrationStatusCodesEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #statusReason} (A code indicating why the administration was not performed.) - */ - public List getStatusReason() { - if (this.statusReason == null) - this.statusReason = new ArrayList(); - return this.statusReason; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setStatusReason(List theStatusReason) { - this.statusReason = theStatusReason; - return this; - } - - public boolean hasStatusReason() { - if (this.statusReason == null) - return false; - for (CodeableConcept item : this.statusReason) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addStatusReason() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.statusReason == null) - this.statusReason = new ArrayList(); - this.statusReason.add(t); - return t; - } - - public MedicationAdministration addStatusReason(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.statusReason == null) - this.statusReason = new ArrayList(); - this.statusReason.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #statusReason}, creating it if it does not already exist {3} - */ - public CodeableConcept getStatusReasonFirstRep() { - if (getStatusReason().isEmpty()) { - addStatusReason(); - } - return getStatusReason().get(0); - } - - /** - * @return {@link #category} (The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).) - */ - public List getCategory() { - if (this.category == null) - this.category = new ArrayList(); - return this.category; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setCategory(List theCategory) { - this.category = theCategory; - return this; - } - - public boolean hasCategory() { - if (this.category == null) - return false; - for (CodeableConcept item : this.category) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addCategory() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.category == null) - this.category = new ArrayList(); - this.category.add(t); - return t; - } - - public MedicationAdministration addCategory(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.category == null) - this.category = new ArrayList(); - this.category.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} - */ - public CodeableConcept getCategoryFirstRep() { - if (getCategory().isEmpty()) { - addCategory(); - } - return getCategory().get(0); - } - - /** - * @return {@link #medication} (Identifies the medication that was 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.) - */ - public CodeableReference getMedication() { - if (this.medication == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.medication"); - else if (Configuration.doAutoCreate()) - this.medication = new CodeableReference(); // cc - return this.medication; - } - - public boolean hasMedication() { - return this.medication != null && !this.medication.isEmpty(); - } - - /** - * @param value {@link #medication} (Identifies the medication that was 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.) - */ - public MedicationAdministration setMedication(CodeableReference value) { - this.medication = value; - return this; - } - - /** - * @return {@link #subject} (The person or animal or group receiving the medication.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.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 person or animal or group receiving the medication.) - */ - public MedicationAdministration setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #encounter} (The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.) - */ - public Reference getEncounter() { - if (this.encounter == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.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 visit, admission, or other contact between patient and health care provider during which the medication administration was performed.) - */ - public MedicationAdministration setEncounter(Reference value) { - this.encounter = value; - return this; - } - - /** - * @return {@link #supportingInformation} (Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says "give "x" if the heartrate exceeds "y"", then the heart rate can be included using this attribute.) - */ - public List getSupportingInformation() { - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - return this.supportingInformation; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setSupportingInformation(List theSupportingInformation) { - this.supportingInformation = theSupportingInformation; - return this; - } - - public boolean hasSupportingInformation() { - if (this.supportingInformation == null) - return false; - for (Reference item : this.supportingInformation) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addSupportingInformation() { //3 - Reference t = new Reference(); - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return t; - } - - public MedicationAdministration addSupportingInformation(Reference t) { //3 - if (t == null) - return this; - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} - */ - public Reference getSupportingInformationFirstRep() { - if (getSupportingInformation().isEmpty()) { - addSupportingInformation(); - } - return getSupportingInformation().get(0); - } - - /** - * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) - */ - public DataType getOccurence() { - return this.occurence; - } - - /** - * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) - */ - public DateTimeType getOccurenceDateTimeType() throws FHIRException { - if (this.occurence == null) - this.occurence = new DateTimeType(); - if (!(this.occurence instanceof DateTimeType)) - throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurence.getClass().getName()+" was encountered"); - return (DateTimeType) this.occurence; - } - - public boolean hasOccurenceDateTimeType() { - return this != null && this.occurence instanceof DateTimeType; - } - - /** - * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) - */ - public Period getOccurencePeriod() throws FHIRException { - if (this.occurence == null) - this.occurence = new Period(); - if (!(this.occurence instanceof Period)) - throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurence.getClass().getName()+" was encountered"); - return (Period) this.occurence; - } - - public boolean hasOccurencePeriod() { - return this != null && this.occurence instanceof Period; - } - - /** - * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) - */ - public Timing getOccurenceTiming() throws FHIRException { - if (this.occurence == null) - this.occurence = new Timing(); - if (!(this.occurence instanceof Timing)) - throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurence.getClass().getName()+" was encountered"); - return (Timing) this.occurence; - } - - public boolean hasOccurenceTiming() { - return this != null && this.occurence instanceof Timing; - } - - public boolean hasOccurence() { - return this.occurence != null && !this.occurence.isEmpty(); - } - - /** - * @param value {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) - */ - public MedicationAdministration setOccurence(DataType value) { - if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) - throw new FHIRException("Not the right type for MedicationAdministration.occurence[x]: "+value.fhirType()); - this.occurence = value; - return this; - } - - /** - * @return {@link #recorded} (The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value - */ - public DateTimeType getRecordedElement() { - if (this.recorded == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.recorded"); - else if (Configuration.doAutoCreate()) - this.recorded = new DateTimeType(); // bb - return this.recorded; - } - - public boolean hasRecordedElement() { - return this.recorded != null && !this.recorded.isEmpty(); - } - - public boolean hasRecorded() { - return this.recorded != null && !this.recorded.isEmpty(); - } - - /** - * @param value {@link #recorded} (The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value - */ - public MedicationAdministration setRecordedElement(DateTimeType value) { - this.recorded = value; - return this; - } - - /** - * @return The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. - */ - public Date getRecorded() { - return this.recorded == null ? null : this.recorded.getValue(); - } - - /** - * @param value The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. - */ - public MedicationAdministration setRecorded(Date value) { - if (value == null) - this.recorded = null; - else { - if (this.recorded == null) - this.recorded = new DateTimeType(); - this.recorded.setValue(value); - } - return this; - } - - /** - * @return {@link #isSubPotent} (An indication that the full dose was not administered.). This is the underlying object with id, value and extensions. The accessor "getIsSubPotent" gives direct access to the value - */ - public BooleanType getIsSubPotentElement() { - if (this.isSubPotent == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.isSubPotent"); - else if (Configuration.doAutoCreate()) - this.isSubPotent = new BooleanType(); // bb - return this.isSubPotent; - } - - public boolean hasIsSubPotentElement() { - return this.isSubPotent != null && !this.isSubPotent.isEmpty(); - } - - public boolean hasIsSubPotent() { - return this.isSubPotent != null && !this.isSubPotent.isEmpty(); - } - - /** - * @param value {@link #isSubPotent} (An indication that the full dose was not administered.). This is the underlying object with id, value and extensions. The accessor "getIsSubPotent" gives direct access to the value - */ - public MedicationAdministration setIsSubPotentElement(BooleanType value) { - this.isSubPotent = value; - return this; - } - - /** - * @return An indication that the full dose was not administered. - */ - public boolean getIsSubPotent() { - return this.isSubPotent == null || this.isSubPotent.isEmpty() ? false : this.isSubPotent.getValue(); - } - - /** - * @param value An indication that the full dose was not administered. - */ - public MedicationAdministration setIsSubPotent(boolean value) { - if (this.isSubPotent == null) - this.isSubPotent = new BooleanType(); - this.isSubPotent.setValue(value); - return this; - } - - /** - * @return {@link #subPotentReason} (The reason or reasons why the full dose was not administered.) - */ - public List getSubPotentReason() { - if (this.subPotentReason == null) - this.subPotentReason = new ArrayList(); - return this.subPotentReason; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setSubPotentReason(List theSubPotentReason) { - this.subPotentReason = theSubPotentReason; - return this; - } - - public boolean hasSubPotentReason() { - if (this.subPotentReason == null) - return false; - for (CodeableConcept item : this.subPotentReason) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableConcept addSubPotentReason() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.subPotentReason == null) - this.subPotentReason = new ArrayList(); - this.subPotentReason.add(t); - return t; - } - - public MedicationAdministration addSubPotentReason(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.subPotentReason == null) - this.subPotentReason = new ArrayList(); - this.subPotentReason.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #subPotentReason}, creating it if it does not already exist {3} - */ - public CodeableConcept getSubPotentReasonFirstRep() { - if (getSubPotentReason().isEmpty()) { - addSubPotentReason(); - } - return getSubPotentReason().get(0); - } - - /** - * @return {@link #performer} (The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.) - */ - public List getPerformer() { - if (this.performer == null) - this.performer = new ArrayList(); - return this.performer; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setPerformer(List thePerformer) { - this.performer = thePerformer; - return this; - } - - public boolean hasPerformer() { - if (this.performer == null) - return false; - for (MedicationAdministrationPerformerComponent item : this.performer) - if (!item.isEmpty()) - return true; - return false; - } - - public MedicationAdministrationPerformerComponent addPerformer() { //3 - MedicationAdministrationPerformerComponent t = new MedicationAdministrationPerformerComponent(); - if (this.performer == null) - this.performer = new ArrayList(); - this.performer.add(t); - return t; - } - - public MedicationAdministration addPerformer(MedicationAdministrationPerformerComponent t) { //3 - if (t == null) - return this; - if (this.performer == null) - this.performer = new ArrayList(); - this.performer.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3} - */ - public MedicationAdministrationPerformerComponent getPerformerFirstRep() { - if (getPerformer().isEmpty()) { - addPerformer(); - } - return getPerformer().get(0); - } - - /** - * @return {@link #reason} (A code, Condition or observation that supports why the medication was administered.) - */ - public List getReason() { - if (this.reason == null) - this.reason = new ArrayList(); - return this.reason; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setReason(List theReason) { - this.reason = theReason; - return this; - } - - public boolean hasReason() { - if (this.reason == null) - return false; - for (CodeableReference item : this.reason) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addReason() { //3 - CodeableReference t = new CodeableReference(); - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return t; - } - - public MedicationAdministration addReason(CodeableReference t) { //3 - if (t == null) - return this; - if (this.reason == null) - this.reason = new ArrayList(); - this.reason.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} - */ - public CodeableReference getReasonFirstRep() { - if (getReason().isEmpty()) { - addReason(); - } - return getReason().get(0); - } - - /** - * @return {@link #request} (The original request, instruction or authority to perform the administration.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc - return this.request; - } - - public boolean hasRequest() { - return this.request != null && !this.request.isEmpty(); - } - - /** - * @param value {@link #request} (The original request, instruction or authority to perform the administration.) - */ - public MedicationAdministration setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #device} (The device that is to be used for the administration of the medication (for example, PCA Pump).) - */ - public List getDevice() { - if (this.device == null) - this.device = new ArrayList(); - return this.device; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setDevice(List theDevice) { - this.device = theDevice; - return this; - } - - public boolean hasDevice() { - if (this.device == null) - return false; - for (CodeableReference item : this.device) - if (!item.isEmpty()) - return true; - return false; - } - - public CodeableReference addDevice() { //3 - CodeableReference t = new CodeableReference(); - if (this.device == null) - this.device = new ArrayList(); - this.device.add(t); - return t; - } - - public MedicationAdministration addDevice(CodeableReference t) { //3 - if (t == null) - return this; - if (this.device == null) - this.device = new ArrayList(); - this.device.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #device}, creating it if it does not already exist {3} - */ - public CodeableReference getDeviceFirstRep() { - if (getDevice().isEmpty()) { - addDevice(); - } - return getDevice().get(0); - } - - /** - * @return {@link #note} (Extra information about the medication administration that is not conveyed by the other attributes.) - */ - public List getNote() { - if (this.note == null) - this.note = new ArrayList(); - return this.note; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setNote(List theNote) { - this.note = theNote; - return this; - } - - public boolean hasNote() { - if (this.note == null) - return false; - for (Annotation item : this.note) - if (!item.isEmpty()) - return true; - return false; - } - - public Annotation addNote() { //3 - Annotation t = new Annotation(); - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); - return t; - } - - public MedicationAdministration addNote(Annotation t) { //3 - if (t == null) - return this; - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} - */ - public Annotation getNoteFirstRep() { - if (getNote().isEmpty()) { - addNote(); - } - return getNote().get(0); - } - - /** - * @return {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) - */ - public MedicationAdministrationDosageComponent getDosage() { - if (this.dosage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationAdministration.dosage"); - else if (Configuration.doAutoCreate()) - this.dosage = new MedicationAdministrationDosageComponent(); // cc - return this.dosage; - } - - public boolean hasDosage() { - return this.dosage != null && !this.dosage.isEmpty(); - } - - /** - * @param value {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) - */ - public MedicationAdministration setDosage(MedicationAdministrationDosageComponent value) { - this.dosage = value; - return this; - } - - /** - * @return {@link #eventHistory} (A summary of the events of interest that have occurred, such as when the administration was verified.) - */ - public List getEventHistory() { - if (this.eventHistory == null) - this.eventHistory = new ArrayList(); - return this.eventHistory; - } - - /** - * @return Returns a reference to this for easy method chaining - */ - public MedicationAdministration setEventHistory(List theEventHistory) { - this.eventHistory = theEventHistory; - return this; - } - - public boolean hasEventHistory() { - if (this.eventHistory == null) - return false; - for (Reference item : this.eventHistory) - if (!item.isEmpty()) - return true; - return false; - } - - public Reference addEventHistory() { //3 - Reference t = new Reference(); - if (this.eventHistory == null) - this.eventHistory = new ArrayList(); - this.eventHistory.add(t); - return t; - } - - public MedicationAdministration addEventHistory(Reference t) { //3 - if (t == null) - return this; - if (this.eventHistory == null) - this.eventHistory = new ArrayList(); - this.eventHistory.add(t); - return this; - } - - /** - * @return The first repetition of repeating field {@link #eventHistory}, creating it if it does not already exist {3} - */ - public Reference getEventHistoryFirstRep() { - if (getEventHistory().isEmpty()) { - addEventHistory(); - } - return getEventHistory().get(0); - } - - protected void listChildren(List children) { - super.listChildren(children); - children.add(new Property("identifier", "Identifier", "Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); - children.add(new Property("basedOn", "Reference(CarePlan)", "A plan that is fulfilled in whole or in part by this MedicationAdministration.", 0, java.lang.Integer.MAX_VALUE, basedOn)); - children.add(new Property("partOf", "Reference(MedicationAdministration|Procedure|MedicationDispense)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf)); - children.add(new Property("status", "code", "Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", 0, 1, status)); - children.add(new Property("statusReason", "CodeableConcept", "A code indicating why the administration was not performed.", 0, java.lang.Integer.MAX_VALUE, statusReason)); - children.add(new Property("category", "CodeableConcept", "The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).", 0, java.lang.Integer.MAX_VALUE, category)); - children.add(new Property("medication", "CodeableReference(Medication)", "Identifies the medication that was 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, 1, medication)); - children.add(new Property("subject", "Reference(Patient|Group)", "The person or animal or group receiving the medication.", 0, 1, subject)); - children.add(new Property("encounter", "Reference(Encounter)", "The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.", 0, 1, encounter)); - children.add(new Property("supportingInformation", "Reference(Any)", "Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); - children.add(new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence)); - children.add(new Property("recorded", "dateTime", "The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.", 0, 1, recorded)); - children.add(new Property("isSubPotent", "boolean", "An indication that the full dose was not administered.", 0, 1, isSubPotent)); - children.add(new Property("subPotentReason", "CodeableConcept", "The reason or reasons why the full dose was not administered.", 0, java.lang.Integer.MAX_VALUE, subPotentReason)); - children.add(new Property("performer", "", "The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.", 0, java.lang.Integer.MAX_VALUE, performer)); - children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "A code, Condition or observation that supports why the medication was administered.", 0, java.lang.Integer.MAX_VALUE, reason)); - children.add(new Property("request", "Reference(MedicationRequest)", "The original request, instruction or authority to perform the administration.", 0, 1, request)); - children.add(new Property("device", "CodeableReference(Device)", "The device that is to be used for the administration of the medication (for example, PCA Pump).", 0, java.lang.Integer.MAX_VALUE, device)); - children.add(new Property("note", "Annotation", "Extra information about the medication administration that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); - children.add(new Property("dosage", "", "Describes the medication dosage information details e.g. dose, rate, site, route, etc.", 0, 1, dosage)); - children.add(new Property("eventHistory", "Reference(Provenance)", "A summary of the events of interest that have occurred, such as when the administration was verified.", 0, java.lang.Integer.MAX_VALUE, eventHistory)); - } - - @Override - public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { - switch (_hash) { - case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); - case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan)", "A plan that is fulfilled in whole or in part by this MedicationAdministration.", 0, java.lang.Integer.MAX_VALUE, basedOn); - case -995410646: /*partOf*/ return new Property("partOf", "Reference(MedicationAdministration|Procedure|MedicationDispense)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf); - case -892481550: /*status*/ return new Property("status", "code", "Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", 0, 1, status); - case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "A code indicating why the administration was not performed.", 0, java.lang.Integer.MAX_VALUE, statusReason); - case 50511102: /*category*/ return new Property("category", "CodeableConcept", "The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).", 0, java.lang.Integer.MAX_VALUE, category); - case 1998965455: /*medication*/ return new Property("medication", "CodeableReference(Medication)", "Identifies the medication that was 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, 1, medication); - case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The person or animal or group receiving the medication.", 0, 1, subject); - case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.", 0, 1, encounter); - case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute.", 0, java.lang.Integer.MAX_VALUE, supportingInformation); - case 144188521: /*occurence[x]*/ return new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); - case -1192857417: /*occurence*/ return new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); - case -820552334: /*occurenceDateTime*/ return new Property("occurence[x]", "dateTime", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); - case 221195608: /*occurencePeriod*/ return new Property("occurence[x]", "Period", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); - case 339257313: /*occurenceTiming*/ return new Property("occurence[x]", "Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); - case -799233872: /*recorded*/ return new Property("recorded", "dateTime", "The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.", 0, 1, recorded); - case 702379724: /*isSubPotent*/ return new Property("isSubPotent", "boolean", "An indication that the full dose was not administered.", 0, 1, isSubPotent); - case 969489082: /*subPotentReason*/ return new Property("subPotentReason", "CodeableConcept", "The reason or reasons why the full dose was not administered.", 0, java.lang.Integer.MAX_VALUE, subPotentReason); - case 481140686: /*performer*/ return new Property("performer", "", "The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.", 0, java.lang.Integer.MAX_VALUE, performer); - case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "A code, Condition or observation that supports why the medication was administered.", 0, java.lang.Integer.MAX_VALUE, reason); - case 1095692943: /*request*/ return new Property("request", "Reference(MedicationRequest)", "The original request, instruction or authority to perform the administration.", 0, 1, request); - case -1335157162: /*device*/ return new Property("device", "CodeableReference(Device)", "The device that is to be used for the administration of the medication (for example, PCA Pump).", 0, java.lang.Integer.MAX_VALUE, device); - case 3387378: /*note*/ return new Property("note", "Annotation", "Extra information about the medication administration that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note); - case -1326018889: /*dosage*/ return new Property("dosage", "", "Describes the medication dosage information details e.g. dose, rate, site, route, etc.", 0, 1, dosage); - case 1835190426: /*eventHistory*/ return new Property("eventHistory", "Reference(Provenance)", "A summary of the events of interest that have occurred, such as when the administration was verified.", 0, java.lang.Integer.MAX_VALUE, eventHistory); - default: return super.getNamedProperty(_hash, _name, _checkValid); - } - - } - - @Override - public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier - case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference - case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference - case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration - case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : this.statusReason.toArray(new Base[this.statusReason.size()]); // CodeableConcept - case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept - case 1998965455: /*medication*/ return this.medication == null ? new Base[0] : new Base[] {this.medication}; // CodeableReference - case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference - case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference - case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference - case -1192857417: /*occurence*/ return this.occurence == null ? new Base[0] : new Base[] {this.occurence}; // DataType - case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // DateTimeType - case 702379724: /*isSubPotent*/ return this.isSubPotent == null ? new Base[0] : new Base[] {this.isSubPotent}; // BooleanType - case 969489082: /*subPotentReason*/ return this.subPotentReason == null ? new Base[0] : this.subPotentReason.toArray(new Base[this.subPotentReason.size()]); // CodeableConcept - case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // MedicationAdministrationPerformerComponent - case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference - case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference - case -1335157162: /*device*/ return this.device == null ? new Base[0] : this.device.toArray(new Base[this.device.size()]); // CodeableReference - case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation - case -1326018889: /*dosage*/ return this.dosage == null ? new Base[0] : new Base[] {this.dosage}; // MedicationAdministrationDosageComponent - case 1835190426: /*eventHistory*/ return this.eventHistory == null ? new Base[0] : this.eventHistory.toArray(new Base[this.eventHistory.size()]); // Reference - default: return super.getProperty(hash, name, checkValid); - } - - } - - @Override - public Base setProperty(int hash, String name, Base value) throws FHIRException { - switch (hash) { - case -1618432855: // identifier - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier - return value; - case -332612366: // basedOn - this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -995410646: // partOf - this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -892481550: // status - value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - return value; - case 2051346646: // statusReason - this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 50511102: // category - this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 1998965455: // medication - this.medication = TypeConvertor.castToCodeableReference(value); // CodeableReference - return value; - case -1867885268: // subject - this.subject = TypeConvertor.castToReference(value); // Reference - return value; - case 1524132147: // encounter - this.encounter = TypeConvertor.castToReference(value); // Reference - return value; - case -1248768647: // supportingInformation - this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference - return value; - case -1192857417: // occurence - this.occurence = TypeConvertor.castToType(value); // DataType - return value; - case -799233872: // recorded - this.recorded = TypeConvertor.castToDateTime(value); // DateTimeType - return value; - case 702379724: // isSubPotent - this.isSubPotent = TypeConvertor.castToBoolean(value); // BooleanType - return value; - case 969489082: // subPotentReason - this.getSubPotentReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept - return value; - case 481140686: // performer - this.getPerformer().add((MedicationAdministrationPerformerComponent) value); // MedicationAdministrationPerformerComponent - return value; - case -934964668: // reason - this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case 1095692943: // request - this.request = TypeConvertor.castToReference(value); // Reference - return value; - case -1335157162: // device - this.getDevice().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference - return value; - case 3387378: // note - this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation - return value; - case -1326018889: // dosage - this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent - return value; - case 1835190426: // eventHistory - this.getEventHistory().add(TypeConvertor.castToReference(value)); // Reference - return value; - default: return super.setProperty(hash, name, value); - } - - } - - @Override - public Base setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); - } else if (name.equals("basedOn")) { - this.getBasedOn().add(TypeConvertor.castToReference(value)); - } else if (name.equals("partOf")) { - this.getPartOf().add(TypeConvertor.castToReference(value)); - } else if (name.equals("status")) { - value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("statusReason")) { - this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("category")) { - this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("medication")) { - this.medication = TypeConvertor.castToCodeableReference(value); // CodeableReference - } else if (name.equals("subject")) { - this.subject = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("encounter")) { - this.encounter = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("supportingInformation")) { - this.getSupportingInformation().add(TypeConvertor.castToReference(value)); - } else if (name.equals("occurence[x]")) { - this.occurence = TypeConvertor.castToType(value); // DataType - } else if (name.equals("recorded")) { - this.recorded = TypeConvertor.castToDateTime(value); // DateTimeType - } else if (name.equals("isSubPotent")) { - this.isSubPotent = TypeConvertor.castToBoolean(value); // BooleanType - } else if (name.equals("subPotentReason")) { - this.getSubPotentReason().add(TypeConvertor.castToCodeableConcept(value)); - } else if (name.equals("performer")) { - this.getPerformer().add((MedicationAdministrationPerformerComponent) value); - } else if (name.equals("reason")) { - this.getReason().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("request")) { - this.request = TypeConvertor.castToReference(value); // Reference - } else if (name.equals("device")) { - this.getDevice().add(TypeConvertor.castToCodeableReference(value)); - } else if (name.equals("note")) { - this.getNote().add(TypeConvertor.castToAnnotation(value)); - } else if (name.equals("dosage")) { - this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent - } else if (name.equals("eventHistory")) { - this.getEventHistory().add(TypeConvertor.castToReference(value)); - } else - return super.setProperty(name, value); - return value; - } - - @Override - public void removeChild(String name, Base value) throws FHIRException { - if (name.equals("identifier")) { - this.getIdentifier().remove(value); - } else if (name.equals("basedOn")) { - this.getBasedOn().remove(value); - } else if (name.equals("partOf")) { - this.getPartOf().remove(value); - } else if (name.equals("status")) { - value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); - this.status = (Enumeration) value; // Enumeration - } else if (name.equals("statusReason")) { - this.getStatusReason().remove(value); - } else if (name.equals("category")) { - this.getCategory().remove(value); - } else if (name.equals("medication")) { - this.medication = null; - } else if (name.equals("subject")) { - this.subject = null; - } else if (name.equals("encounter")) { - this.encounter = null; - } else if (name.equals("supportingInformation")) { - this.getSupportingInformation().remove(value); - } else if (name.equals("occurence[x]")) { - this.occurence = null; - } else if (name.equals("recorded")) { - this.recorded = null; - } else if (name.equals("isSubPotent")) { - this.isSubPotent = null; - } else if (name.equals("subPotentReason")) { - this.getSubPotentReason().remove(value); - } else if (name.equals("performer")) { - this.getPerformer().remove((MedicationAdministrationPerformerComponent) value); - } else if (name.equals("reason")) { - this.getReason().remove(value); - } else if (name.equals("request")) { - this.request = null; - } else if (name.equals("device")) { - this.getDevice().remove(value); - } else if (name.equals("note")) { - this.getNote().remove(value); - } else if (name.equals("dosage")) { - this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent - } else if (name.equals("eventHistory")) { - this.getEventHistory().remove(value); - } else - super.removeChild(name, value); - - } - - @Override - public Base makeProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: return addIdentifier(); - case -332612366: return addBasedOn(); - case -995410646: return addPartOf(); - case -892481550: return getStatusElement(); - case 2051346646: return addStatusReason(); - case 50511102: return addCategory(); - case 1998965455: return getMedication(); - case -1867885268: return getSubject(); - case 1524132147: return getEncounter(); - case -1248768647: return addSupportingInformation(); - case 144188521: return getOccurence(); - case -1192857417: return getOccurence(); - case -799233872: return getRecordedElement(); - case 702379724: return getIsSubPotentElement(); - case 969489082: return addSubPotentReason(); - case 481140686: return addPerformer(); - case -934964668: return addReason(); - case 1095692943: return getRequest(); - case -1335157162: return addDevice(); - case 3387378: return addNote(); - case -1326018889: return getDosage(); - case 1835190426: return addEventHistory(); - default: return super.makeProperty(hash, name); - } - - } - - @Override - public String[] getTypesForProperty(int hash, String name) throws FHIRException { - switch (hash) { - case -1618432855: /*identifier*/ return new String[] {"Identifier"}; - case -332612366: /*basedOn*/ return new String[] {"Reference"}; - case -995410646: /*partOf*/ return new String[] {"Reference"}; - case -892481550: /*status*/ return new String[] {"code"}; - case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; - case 50511102: /*category*/ return new String[] {"CodeableConcept"}; - case 1998965455: /*medication*/ return new String[] {"CodeableReference"}; - case -1867885268: /*subject*/ return new String[] {"Reference"}; - case 1524132147: /*encounter*/ return new String[] {"Reference"}; - case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; - case -1192857417: /*occurence*/ return new String[] {"dateTime", "Period", "Timing"}; - case -799233872: /*recorded*/ return new String[] {"dateTime"}; - case 702379724: /*isSubPotent*/ return new String[] {"boolean"}; - case 969489082: /*subPotentReason*/ return new String[] {"CodeableConcept"}; - case 481140686: /*performer*/ return new String[] {}; - case -934964668: /*reason*/ return new String[] {"CodeableReference"}; - case 1095692943: /*request*/ return new String[] {"Reference"}; - case -1335157162: /*device*/ return new String[] {"CodeableReference"}; - case 3387378: /*note*/ return new String[] {"Annotation"}; - case -1326018889: /*dosage*/ return new String[] {}; - case 1835190426: /*eventHistory*/ return new String[] {"Reference"}; - default: return super.getTypesForProperty(hash, name); - } - - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("basedOn")) { - return addBasedOn(); - } - else if (name.equals("partOf")) { - return addPartOf(); - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.status"); - } - else if (name.equals("statusReason")) { - return addStatusReason(); - } - else if (name.equals("category")) { - return addCategory(); - } - else if (name.equals("medication")) { - this.medication = new CodeableReference(); - return this.medication; - } - else if (name.equals("subject")) { - this.subject = new Reference(); - return this.subject; - } - else if (name.equals("encounter")) { - this.encounter = new Reference(); - return this.encounter; - } - else if (name.equals("supportingInformation")) { - return addSupportingInformation(); - } - else if (name.equals("occurenceDateTime")) { - this.occurence = new DateTimeType(); - return this.occurence; - } - else if (name.equals("occurencePeriod")) { - this.occurence = new Period(); - return this.occurence; - } - else if (name.equals("occurenceTiming")) { - this.occurence = new Timing(); - return this.occurence; - } - else if (name.equals("recorded")) { - throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.recorded"); - } - else if (name.equals("isSubPotent")) { - throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.isSubPotent"); - } - else if (name.equals("subPotentReason")) { - return addSubPotentReason(); - } - else if (name.equals("performer")) { - return addPerformer(); - } - else if (name.equals("reason")) { - return addReason(); - } - else if (name.equals("request")) { - this.request = new Reference(); - return this.request; - } - else if (name.equals("device")) { - return addDevice(); - } - else if (name.equals("note")) { - return addNote(); - } - else if (name.equals("dosage")) { - this.dosage = new MedicationAdministrationDosageComponent(); - return this.dosage; - } - else if (name.equals("eventHistory")) { - return addEventHistory(); - } - else - return super.addChild(name); - } - - public String fhirType() { - return "MedicationAdministration"; - - } - - public MedicationAdministration copy() { - MedicationAdministration dst = new MedicationAdministration(); - copyValues(dst); - return dst; - } - - public void copyValues(MedicationAdministration dst) { - super.copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - if (basedOn != null) { - dst.basedOn = new ArrayList(); - for (Reference i : basedOn) - dst.basedOn.add(i.copy()); - }; - if (partOf != null) { - dst.partOf = new ArrayList(); - for (Reference i : partOf) - dst.partOf.add(i.copy()); - }; - dst.status = status == null ? null : status.copy(); - if (statusReason != null) { - dst.statusReason = new ArrayList(); - for (CodeableConcept i : statusReason) - dst.statusReason.add(i.copy()); - }; - if (category != null) { - dst.category = new ArrayList(); - for (CodeableConcept i : category) - dst.category.add(i.copy()); - }; - dst.medication = medication == null ? null : medication.copy(); - dst.subject = subject == null ? null : subject.copy(); - dst.encounter = encounter == null ? null : encounter.copy(); - if (supportingInformation != null) { - dst.supportingInformation = new ArrayList(); - for (Reference i : supportingInformation) - dst.supportingInformation.add(i.copy()); - }; - dst.occurence = occurence == null ? null : occurence.copy(); - dst.recorded = recorded == null ? null : recorded.copy(); - dst.isSubPotent = isSubPotent == null ? null : isSubPotent.copy(); - if (subPotentReason != null) { - dst.subPotentReason = new ArrayList(); - for (CodeableConcept i : subPotentReason) - dst.subPotentReason.add(i.copy()); - }; - if (performer != null) { - dst.performer = new ArrayList(); - for (MedicationAdministrationPerformerComponent i : performer) - dst.performer.add(i.copy()); - }; - if (reason != null) { - dst.reason = new ArrayList(); - for (CodeableReference i : reason) - dst.reason.add(i.copy()); - }; - dst.request = request == null ? null : request.copy(); - if (device != null) { - dst.device = new ArrayList(); - for (CodeableReference i : device) - dst.device.add(i.copy()); - }; - if (note != null) { - dst.note = new ArrayList(); - for (Annotation i : note) - dst.note.add(i.copy()); - }; - dst.dosage = dosage == null ? null : dosage.copy(); - if (eventHistory != null) { - dst.eventHistory = new ArrayList(); - for (Reference i : eventHistory) - dst.eventHistory.add(i.copy()); - }; - } - - protected MedicationAdministration typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other_) { - if (!super.equalsDeep(other_)) - return false; - if (!(other_ instanceof MedicationAdministration)) - return false; - MedicationAdministration o = (MedicationAdministration) other_; - return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) - && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(category, o.category, true) - && compareDeep(medication, o.medication, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) - && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(occurence, o.occurence, true) - && compareDeep(recorded, o.recorded, true) && compareDeep(isSubPotent, o.isSubPotent, true) && compareDeep(subPotentReason, o.subPotentReason, true) - && compareDeep(performer, o.performer, true) && compareDeep(reason, o.reason, true) && compareDeep(request, o.request, true) - && compareDeep(device, o.device, true) && compareDeep(note, o.note, true) && compareDeep(dosage, o.dosage, true) - && compareDeep(eventHistory, o.eventHistory, true); - } - - @Override - public boolean equalsShallow(Base other_) { - if (!super.equalsShallow(other_)) - return false; - if (!(other_ instanceof MedicationAdministration)) - return false; - MedicationAdministration o = (MedicationAdministration) other_; - return compareValues(status, o.status, true) && compareValues(recorded, o.recorded, true) && compareValues(isSubPotent, o.isSubPotent, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf - , status, statusReason, category, medication, subject, encounter, supportingInformation - , occurence, recorded, isSubPotent, subPotentReason, performer, reason, request - , device, note, dosage, eventHistory); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.MedicationAdministration; - } - - /** - * Search parameter: device - *

- * Description: Return administrations with this administration device identity
- * Type: reference
- * Path: MedicationAdministration.device.reference
- *

- */ - @SearchParamDefinition(name="device", path="MedicationAdministration.device.reference", description="Return administrations with this administration device identity", type="reference", target={Device.class } ) - public static final String SP_DEVICE = "device"; - /** - * Fluent Client search parameter constant for device - *

- * Description: Return administrations with this administration device identity
- * Type: reference
- * Path: MedicationAdministration.device.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "MedicationAdministration:device". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("MedicationAdministration:device").toLocked(); - - /** - * Search parameter: performer-device-code - *

- * Description: The identity of the individual who administered the medication
- * Type: token
- * Path: MedicationAdministration.performer.actor.concept
- *

- */ - @SearchParamDefinition(name="performer-device-code", path="MedicationAdministration.performer.actor.concept", description="The identity of the individual who administered the medication", type="token" ) - public static final String SP_PERFORMER_DEVICE_CODE = "performer-device-code"; - /** - * Fluent Client search parameter constant for performer-device-code - *

- * Description: The identity of the individual who administered the medication
- * Type: token
- * Path: MedicationAdministration.performer.actor.concept
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER_DEVICE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER_DEVICE_CODE); - - /** - * Search parameter: performer - *

- * Description: The identity of the individual who administered the medication
- * Type: reference
- * Path: MedicationAdministration.performer.actor.reference
- *

- */ - @SearchParamDefinition(name="performer", path="MedicationAdministration.performer.actor.reference", description="The identity of the individual who administered the medication", type="reference", target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) - public static final String SP_PERFORMER = "performer"; - /** - * Fluent Client search parameter constant for performer - *

- * Description: The identity of the individual who administered the medication
- * Type: reference
- * Path: MedicationAdministration.performer.actor.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "MedicationAdministration:performer". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("MedicationAdministration:performer").toLocked(); - - /** - * Search parameter: reason-given-code - *

- * Description: Reasons for administering the medication
- * Type: token
- * Path: MedicationAdministration.reason.concept
- *

- */ - @SearchParamDefinition(name="reason-given-code", path="MedicationAdministration.reason.concept", description="Reasons for administering the medication", type="token" ) - public static final String SP_REASON_GIVEN_CODE = "reason-given-code"; - /** - * Fluent Client search parameter constant for reason-given-code - *

- * Description: Reasons for administering the medication
- * Type: token
- * Path: MedicationAdministration.reason.concept
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_GIVEN_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_GIVEN_CODE); - - /** - * Search parameter: reason-given - *

- * Description: Reference to a resource (by instance)
- * Type: reference
- * Path: MedicationAdministration.reason.reference
- *

- */ - @SearchParamDefinition(name="reason-given", path="MedicationAdministration.reason.reference", description="Reference to a resource (by instance)", type="reference", target={Condition.class, DiagnosticReport.class, Observation.class } ) - public static final String SP_REASON_GIVEN = "reason-given"; - /** - * Fluent Client search parameter constant for reason-given - *

- * Description: Reference to a resource (by instance)
- * Type: reference
- * Path: MedicationAdministration.reason.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_GIVEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_GIVEN); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "MedicationAdministration:reason-given". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_GIVEN = new ca.uhn.fhir.model.api.Include("MedicationAdministration:reason-given").toLocked(); - - /** - * Search parameter: reason-not-given - *

- * Description: Reasons for not administering the medication
- * Type: token
- * Path: MedicationAdministration.statusReason
- *

- */ - @SearchParamDefinition(name="reason-not-given", path="MedicationAdministration.statusReason", description="Reasons for not administering the medication", type="token" ) - public static final String SP_REASON_NOT_GIVEN = "reason-not-given"; - /** - * Fluent Client search parameter constant for reason-not-given - *

- * Description: Reasons for not administering the medication
- * Type: token
- * Path: MedicationAdministration.statusReason
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_NOT_GIVEN = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_NOT_GIVEN); - - /** - * Search parameter: request - *

- * Description: The identity of a request to list administrations from
- * Type: reference
- * Path: MedicationAdministration.request
- *

- */ - @SearchParamDefinition(name="request", path="MedicationAdministration.request", description="The identity of a request to list administrations from", type="reference", target={MedicationRequest.class } ) - public static final String SP_REQUEST = "request"; - /** - * Fluent Client search parameter constant for request - *

- * Description: The identity of a request to list administrations from
- * Type: reference
- * Path: MedicationAdministration.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 "MedicationAdministration:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("MedicationAdministration:request").toLocked(); - - /** - * Search parameter: subject - *

- * Description: The identity of the individual or group to list administrations for
- * Type: reference
- * Path: MedicationAdministration.subject
- *

- */ - @SearchParamDefinition(name="subject", path="MedicationAdministration.subject", description="The identity of the individual or group to list administrations for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) - public static final String SP_SUBJECT = "subject"; - /** - * Fluent Client search parameter constant for subject - *

- * Description: The identity of the individual or group to list administrations for
- * Type: reference
- * Path: MedicationAdministration.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 "MedicationAdministration:subject". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MedicationAdministration:subject").toLocked(); - - /** - * Search parameter: code - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted -* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance -* [AuditEvent](auditevent.html): More specific code for the event -* [Basic](basic.html): Kind of Resource -* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code -* [Condition](condition.html): Code for the condition -* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc. -* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered -* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result -* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code -* [ImagingSelection](imagingselection.html): The imaging selection status -* [List](list.html): What the purpose of this list is -* [Medication](medication.html): Returns medications for a specific code -* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code -* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code -* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code -* [MedicationStatement](medicationstatement.html): Return statements of this medication code -* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake -* [Observation](observation.html): The code of the observation type -* [Procedure](procedure.html): A code to identify a procedure -* [RequestOrchestration](requestorchestration.html): The code of the request orchestration -* [Task](task.html): Search by task code -
- * Type: token
- * Path: AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code
- *

- */ - @SearchParamDefinition(name="code", path="AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [AuditEvent](auditevent.html): More specific code for the event\r\n* [Basic](basic.html): Kind of Resource\r\n* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code\r\n* [Condition](condition.html): Code for the condition\r\n* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [ImagingSelection](imagingselection.html): The imaging selection status\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a procedure\r\n* [RequestOrchestration](requestorchestration.html): The code of the request orchestration\r\n* [Task](task.html): Search by task code\r\n", type="token" ) - public static final String SP_CODE = "code"; - /** - * Fluent Client search parameter constant for code - *

- * Description: Multiple Resources: - -* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted -* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance -* [AuditEvent](auditevent.html): More specific code for the event -* [Basic](basic.html): Kind of Resource -* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code -* [Condition](condition.html): Code for the condition -* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc. -* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered -* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result -* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code -* [ImagingSelection](imagingselection.html): The imaging selection status -* [List](list.html): What the purpose of this list is -* [Medication](medication.html): Returns medications for a specific code -* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code -* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code -* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code -* [MedicationStatement](medicationstatement.html): Return statements of this medication code -* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake -* [Observation](observation.html): The code of the observation type -* [Procedure](procedure.html): A code to identify a procedure -* [RequestOrchestration](requestorchestration.html): The code of the request orchestration -* [Task](task.html): Search by task code -
- * Type: token
- * Path: AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: Multiple Resources: - -* [Account](account.html): Account number -* [AdverseEvent](adverseevent.html): Business identifier for the event -* [AllergyIntolerance](allergyintolerance.html): External ids for this item -* [Appointment](appointment.html): An Identifier of the Appointment -* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response -* [Basic](basic.html): Business identifier -* [BodyStructure](bodystructure.html): Bodystructure identifier -* [CarePlan](careplan.html): External Ids for this plan -* [CareTeam](careteam.html): External Ids for this team -* [ChargeItem](chargeitem.html): Business Identifier for item -* [Claim](claim.html): The primary identifier of the financial resource -* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse -* [ClinicalImpression](clinicalimpression.html): Business identifier -* [Communication](communication.html): Unique identifier -* [CommunicationRequest](communicationrequest.html): Unique identifier -* [Composition](composition.html): Version-independent identifier for the Composition -* [Condition](condition.html): A unique identifier of the condition record -* [Consent](consent.html): Identifier for this record (external references) -* [Contract](contract.html): The identity of the contract -* [Coverage](coverage.html): The primary identifier of the insured and the coverage -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier -* [DetectedIssue](detectedissue.html): Unique id for the detected issue -* [DeviceRequest](devicerequest.html): Business identifier for request/order -* [DeviceUsage](deviceusage.html): Search by identifier -* [DiagnosticReport](diagnosticreport.html): An identifier for the report -* [DocumentReference](documentreference.html): Identifier of the attachment binary -* [Encounter](encounter.html): Identifier(s) by which this encounter is known -* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment -* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare -* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit -* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier -* [Flag](flag.html): Business identifier -* [Goal](goal.html): External Ids for this goal -* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response -* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection -* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID -* [Immunization](immunization.html): Business identifier -* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation -* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier -* [Invoice](invoice.html): Business Identifier for item -* [List](list.html): Business identifier -* [MeasureReport](measurereport.html): External identifier of the measure report to be returned -* [Medication](medication.html): Returns medications with this external identifier -* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier -* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier -* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier -* [MedicationStatement](medicationstatement.html): Return statements with this external identifier -* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence -* [NutritionIntake](nutritionintake.html): Return statements with this external identifier -* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier -* [Observation](observation.html): The unique id for a particular observation -* [Person](person.html): A person Identifier -* [Procedure](procedure.html): A unique identifier for a procedure -* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response -* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson -* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration -* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study -* [RiskAssessment](riskassessment.html): Unique identifier for the assessment -* [ServiceRequest](servicerequest.html): Identifiers assigned to this order -* [Specimen](specimen.html): The unique identifier associated with the specimen -* [SupplyDelivery](supplydelivery.html): External identifier -* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest -* [Task](task.html): Search for a task instance by its business identifier -* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier -
- * Type: token
- * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
- *

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

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
- *

- */ - @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: Multiple Resources: - -* [Account](account.html): The entity that caused the expenses -* [AdverseEvent](adverseevent.html): Subject impacted by event -* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for -* [Appointment](appointment.html): One of the individuals of the appointment is this patient -* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient -* [AuditEvent](auditevent.html): Where the activity involved patient data -* [Basic](basic.html): Identifies the focus of this resource -* [BodyStructure](bodystructure.html): Who this is about -* [CarePlan](careplan.html): Who the care plan is for -* [CareTeam](careteam.html): Who care team is for -* [ChargeItem](chargeitem.html): Individual service was done for/to -* [Claim](claim.html): Patient receiving the products or services -* [ClaimResponse](claimresponse.html): The subject of care -* [ClinicalImpression](clinicalimpression.html): Patient assessed -* [Communication](communication.html): Focus of message -* [CommunicationRequest](communicationrequest.html): Focus of message -* [Composition](composition.html): Who and/or what the composition is about -* [Condition](condition.html): Who has the condition? -* [Consent](consent.html): Who the consent applies to -* [Contract](contract.html): The identity of the subject of the contract (if a patient) -* [Coverage](coverage.html): Retrieve coverages for a patient -* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient -* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient -* [DetectedIssue](detectedissue.html): Associated patient -* [DeviceRequest](devicerequest.html): Individual the service is ordered for -* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device -* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient -* [DocumentReference](documentreference.html): Who/what is the subject of the document -* [Encounter](encounter.html): The patient present at the encounter -* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled -* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care -* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient -* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for -* [Flag](flag.html): The identity of a subject to list flags for -* [Goal](goal.html): Who this goal is intended for -* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results -* [ImagingSelection](imagingselection.html): Who the study is about -* [ImagingStudy](imagingstudy.html): Who the study is about -* [Immunization](immunization.html): The patient for the vaccination record -* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated -* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for -* [Invoice](invoice.html): Recipient(s) of goods and services -* [List](list.html): If all resources have the same subject -* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for -* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for -* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for -* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient -* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. -* [MolecularSequence](molecularsequence.html): The subject that the sequence is about -* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. -* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement -* [Observation](observation.html): The subject that the observation is about (if patient) -* [Person](person.html): The Person links to this Patient -* [Procedure](procedure.html): Search by subject - a patient -* [Provenance](provenance.html): Where the activity involved patient data -* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response -* [RelatedPerson](relatedperson.html): The patient this related person is related to -* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations -* [ResearchSubject](researchsubject.html): Who or what is part of study -* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? -* [ServiceRequest](servicerequest.html): Search by subject - a patient -* [Specimen](specimen.html): The patient the specimen comes from -* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied -* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined -* [Task](task.html): Search by patient -* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for -
- * Type: reference
- * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "MedicationAdministration:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MedicationAdministration:patient").toLocked(); - - /** - * Search parameter: date - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen) -
- * Type: date
- * Path: MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)
- *

- */ - @SearchParamDefinition(name="date", path="MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen)\r\n", type="date" ) - public static final String SP_DATE = "date"; - /** - * Fluent Client search parameter constant for date - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen) -
- * Type: date
- * Path: MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)
- *

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

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter -* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier -
- * Type: reference
- * Path: MedicationAdministration.encounter | MedicationRequest.encounter
- *

- */ - @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter | MedicationRequest.encounter", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } ) - public static final String SP_ENCOUNTER = "encounter"; - /** - * Fluent Client search parameter constant for encounter - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter -* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier -
- * Type: reference
- * Path: MedicationAdministration.encounter | MedicationRequest.encounter
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "MedicationAdministration:encounter". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("MedicationAdministration:encounter").toLocked(); - - /** - * Search parameter: medication - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference -* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource -* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference -* [MedicationStatement](medicationstatement.html): Return statements of this medication reference -
- * Type: reference
- * Path: MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference
- *

- */ - @SearchParamDefinition(name="medication", path="MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication reference\r\n", type="reference", target={Medication.class } ) - public static final String SP_MEDICATION = "medication"; - /** - * Fluent Client search parameter constant for medication - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference -* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource -* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference -* [MedicationStatement](medicationstatement.html): Return statements of this medication reference -
- * Type: reference
- * Path: MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEDICATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEDICATION); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "MedicationAdministration:medication". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_MEDICATION = new ca.uhn.fhir.model.api.Include("MedicationAdministration:medication").toLocked(); - - /** - * Search parameter: status - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) -* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status -* [MedicationRequest](medicationrequest.html): Status of the prescription -* [MedicationStatement](medicationstatement.html): Return statements that match the given status -
- * Type: token
- * Path: MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status
- *

- */ - @SearchParamDefinition(name="status", path="MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified)\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status\r\n* [MedicationRequest](medicationrequest.html): Status of the prescription\r\n* [MedicationStatement](medicationstatement.html): Return statements that match the given status\r\n", type="token" ) - public static final String SP_STATUS = "status"; - /** - * Fluent Client search parameter constant for status - *

- * Description: Multiple Resources: - -* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) -* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status -* [MedicationRequest](medicationrequest.html): Status of the prescription -* [MedicationStatement](medicationstatement.html): Return statements that match the given status -
- * Type: token
- * Path: MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - - -} - +package org.hl7.fhir.r5.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 Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.r5.model.Enumerations.*; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.instance.model.api.ICompositeType; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.ChildOrder; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; + +/** + * 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. This event can also be used to record waste using a status of not-done and the appropriate statusReason. + */ +@ResourceDef(name="MedicationAdministration", profile="http://hl7.org/fhir/StructureDefinition/MedicationAdministration") +public class MedicationAdministration extends DomainResource { + + public enum MedicationAdministrationStatusCodes { + /** + * The administration has started but has not yet completed. + */ + INPROGRESS, + /** + * The administration was terminated prior to any impact on the subject (though preparatory actions may have been taken) + */ + NOTDONE, + /** + * Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called 'suspended'. + */ + ONHOLD, + /** + * All actions that are implied by the administration have occurred. + */ + COMPLETED, + /** + * The administration was entered in error and therefore nullified. + */ + ENTEREDINERROR, + /** + * Actions implied by the administration have been permanently halted, before all of them occurred. + */ + STOPPED, + /** + * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, it's just not known which one. + */ + UNKNOWN, + /** + * added to help the parsers with the generic types + */ + NULL; + public static MedicationAdministrationStatusCodes fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("not-done".equals(codeString)) + return NOTDONE; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + if ("stopped".equals(codeString)) + return STOPPED; + if ("unknown".equals(codeString)) + return UNKNOWN; + if (Configuration.isAcceptInvalidEnums()) + return null; + else + throw new FHIRException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case NOTDONE: return "not-done"; + case ONHOLD: return "on-hold"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + case STOPPED: return "stopped"; + case UNKNOWN: return "unknown"; + case NULL: return null; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case NOTDONE: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case ONHOLD: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case COMPLETED: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case ENTEREDINERROR: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case STOPPED: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case UNKNOWN: return "http://hl7.org/fhir/CodeSystem/medication-admin-status"; + case NULL: return null; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The administration has started but has not yet completed."; + case NOTDONE: return "The administration was terminated prior to any impact on the subject (though preparatory actions may have been taken)"; + case ONHOLD: return "Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called 'suspended'."; + case COMPLETED: return "All actions that are implied by the administration have occurred."; + case ENTEREDINERROR: return "The administration was entered in error and therefore nullified."; + case STOPPED: return "Actions implied by the administration have been permanently halted, before all of them occurred."; + case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, it's just not known which one."; + case NULL: return null; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case NOTDONE: return "Not Done"; + case ONHOLD: return "On Hold"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; + case STOPPED: return "Stopped"; + case UNKNOWN: return "Unknown"; + case NULL: return null; + default: return "?"; + } + } + } + + public static class MedicationAdministrationStatusCodesEnumFactory implements EnumFactory { + public MedicationAdministrationStatusCodes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return MedicationAdministrationStatusCodes.INPROGRESS; + if ("not-done".equals(codeString)) + return MedicationAdministrationStatusCodes.NOTDONE; + if ("on-hold".equals(codeString)) + return MedicationAdministrationStatusCodes.ONHOLD; + if ("completed".equals(codeString)) + return MedicationAdministrationStatusCodes.COMPLETED; + if ("entered-in-error".equals(codeString)) + return MedicationAdministrationStatusCodes.ENTEREDINERROR; + if ("stopped".equals(codeString)) + return MedicationAdministrationStatusCodes.STOPPED; + if ("unknown".equals(codeString)) + return MedicationAdministrationStatusCodes.UNKNOWN; + throw new IllegalArgumentException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); + } + public Enumeration fromType(PrimitiveType code) throws FHIRException { + if (code == null) + return null; + if (code.isEmpty()) + return new Enumeration(this, MedicationAdministrationStatusCodes.NULL, code); + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.NULL, code); + if ("in-progress".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.INPROGRESS, code); + if ("not-done".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.NOTDONE, code); + if ("on-hold".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.ONHOLD, code); + if ("completed".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.COMPLETED, code); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.ENTEREDINERROR, code); + if ("stopped".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.STOPPED, code); + if ("unknown".equals(codeString)) + return new Enumeration(this, MedicationAdministrationStatusCodes.UNKNOWN, code); + throw new FHIRException("Unknown MedicationAdministrationStatusCodes code '"+codeString+"'"); + } + public String toCode(MedicationAdministrationStatusCodes code) { + if (code == MedicationAdministrationStatusCodes.NULL) + return null; + if (code == MedicationAdministrationStatusCodes.INPROGRESS) + return "in-progress"; + if (code == MedicationAdministrationStatusCodes.NOTDONE) + return "not-done"; + if (code == MedicationAdministrationStatusCodes.ONHOLD) + return "on-hold"; + if (code == MedicationAdministrationStatusCodes.COMPLETED) + return "completed"; + if (code == MedicationAdministrationStatusCodes.ENTEREDINERROR) + return "entered-in-error"; + if (code == MedicationAdministrationStatusCodes.STOPPED) + return "stopped"; + if (code == MedicationAdministrationStatusCodes.UNKNOWN) + return "unknown"; + return "?"; + } + public String toSystem(MedicationAdministrationStatusCodes code) { + return code.getSystem(); + } + } + + @Block() + public static class MedicationAdministrationPerformerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Distinguishes the type of involvement of the performer in the medication administration. + */ + @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Type of performance", formalDefinition="Distinguishes the type of involvement of the performer in the medication administration." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/med-admin-perform-function") + protected CodeableConcept function; + + /** + * Indicates who or what performed the medication administration. + */ + @Child(name = "actor", type = {CodeableReference.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who or what performed the medication administration", formalDefinition="Indicates who or what performed the medication administration." ) + protected CodeableReference actor; + + private static final long serialVersionUID = -1725418144L; + + /** + * Constructor + */ + public MedicationAdministrationPerformerComponent() { + super(); + } + + /** + * Constructor + */ + public MedicationAdministrationPerformerComponent(CodeableReference actor) { + super(); + this.setActor(actor); + } + + /** + * @return {@link #function} (Distinguishes the type of involvement of the performer in the medication administration.) + */ + public CodeableConcept getFunction() { + if (this.function == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationPerformerComponent.function"); + else if (Configuration.doAutoCreate()) + this.function = new CodeableConcept(); // cc + return this.function; + } + + public boolean hasFunction() { + return this.function != null && !this.function.isEmpty(); + } + + /** + * @param value {@link #function} (Distinguishes the type of involvement of the performer in the medication administration.) + */ + public MedicationAdministrationPerformerComponent setFunction(CodeableConcept value) { + this.function = value; + return this; + } + + /** + * @return {@link #actor} (Indicates who or what performed the medication administration.) + */ + public CodeableReference getActor() { + if (this.actor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationPerformerComponent.actor"); + else if (Configuration.doAutoCreate()) + this.actor = new CodeableReference(); // cc + return this.actor; + } + + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); + } + + /** + * @param value {@link #actor} (Indicates who or what performed the medication administration.) + */ + public MedicationAdministrationPerformerComponent setActor(CodeableReference value) { + this.actor = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the medication administration.", 0, 1, function)); + children.add(new Property("actor", "CodeableReference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device)", "Indicates who or what performed the medication administration.", 0, 1, actor)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the medication administration.", 0, 1, function); + case 92645877: /*actor*/ return new Property("actor", "CodeableReference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device)", "Indicates who or what performed the medication administration.", 0, 1, actor); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept + case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // CodeableReference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 1380938712: // function + this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 92645877: // actor + this.actor = TypeConvertor.castToCodeableReference(value); // CodeableReference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("function")) { + this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("actor")) { + this.actor = TypeConvertor.castToCodeableReference(value); // CodeableReference + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("function")) { + this.function = null; + } else if (name.equals("actor")) { + this.actor = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1380938712: return getFunction(); + case 92645877: return getActor(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; + case 92645877: /*actor*/ return new String[] {"CodeableReference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("function")) { + this.function = new CodeableConcept(); + return this.function; + } + else if (name.equals("actor")) { + this.actor = new CodeableReference(); + return this.actor; + } + else + return super.addChild(name); + } + + public MedicationAdministrationPerformerComponent copy() { + MedicationAdministrationPerformerComponent dst = new MedicationAdministrationPerformerComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(MedicationAdministrationPerformerComponent dst) { + super.copyValues(dst); + dst.function = function == null ? null : function.copy(); + dst.actor = actor == null ? null : actor.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof MedicationAdministrationPerformerComponent)) + return false; + MedicationAdministrationPerformerComponent o = (MedicationAdministrationPerformerComponent) other_; + return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof MedicationAdministrationPerformerComponent)) + return false; + MedicationAdministrationPerformerComponent o = (MedicationAdministrationPerformerComponent) other_; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor); + } + + public String fhirType() { + return "MedicationAdministration.performer"; + + } + + } + + @Block() + public static class MedicationAdministrationDosageComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. + +The dosage instructions should reflect the dosage of the medication that was administered. + */ + @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Free text dosage instructions e.g. SIG", formalDefinition="Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered." ) + protected StringType text; + + /** + * A coded specification of the anatomic site where the medication first entered the body. For example, "left arm". + */ + @Child(name = "site", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Body site administered to", formalDefinition="A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\"." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/approach-site-codes") + protected CodeableConcept site; + + /** + * A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc. + */ + @Child(name = "route", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Path of substance into body", formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/route-codes") + protected CodeableConcept route; + + /** + * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. + */ + @Child(name = "method", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="How drug was administered", formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administration-method-codes") + protected CodeableConcept method; + + /** + * The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection. + */ + @Child(name = "dose", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Amount of medication per dose", formalDefinition="The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection." ) + protected Quantity dose; + + /** + * 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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. + */ + @Child(name = "rate", type = {Ratio.class, Quantity.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Dose quantity 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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) + protected DataType rate; + + private static final long serialVersionUID = -484090956L; + + /** + * Constructor + */ + public MedicationAdministrationDosageComponent() { + super(); + } + + /** + * @return {@link #text} (Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. + +The dosage instructions should reflect the dosage of the medication that was administered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public StringType getTextElement() { + if (this.text == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.text"); + else if (Configuration.doAutoCreate()) + this.text = new StringType(); // bb + return this.text; + } + + public boolean hasTextElement() { + return this.text != null && !this.text.isEmpty(); + } + + public boolean hasText() { + return this.text != null && !this.text.isEmpty(); + } + + /** + * @param value {@link #text} (Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. + +The dosage instructions should reflect the dosage of the medication that was administered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value + */ + public MedicationAdministrationDosageComponent setTextElement(StringType value) { + this.text = value; + return this; + } + + /** + * @return Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. + +The dosage instructions should reflect the dosage of the medication that was administered. + */ + public String getText() { + return this.text == null ? null : this.text.getValue(); + } + + /** + * @param value Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans. + +The dosage instructions should reflect the dosage of the medication that was administered. + */ + public MedicationAdministrationDosageComponent setText(String value) { + if (Utilities.noString(value)) + this.text = null; + else { + if (this.text == null) + this.text = new StringType(); + this.text.setValue(value); + } + return this; + } + + /** + * @return {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public CodeableConcept getSite() { + if (this.site == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.site"); + else if (Configuration.doAutoCreate()) + this.site = new CodeableConcept(); // cc + return this.site; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (A coded specification of the anatomic site where the medication first entered the body. For example, "left arm".) + */ + public MedicationAdministrationDosageComponent setSite(CodeableConcept value) { + this.site = value; + return this; + } + + /** + * @return {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) + */ + public CodeableConcept getRoute() { + if (this.route == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.route"); + else if (Configuration.doAutoCreate()) + this.route = new CodeableConcept(); // cc + return this.route; + } + + public boolean hasRoute() { + return this.route != null && !this.route.isEmpty(); + } + + /** + * @param value {@link #route} (A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.) + */ + public MedicationAdministrationDosageComponent setRoute(CodeableConcept value) { + this.route = value; + return this; + } + + /** + * @return {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public CodeableConcept getMethod() { + if (this.method == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.method"); + else if (Configuration.doAutoCreate()) + this.method = new CodeableConcept(); // cc + return this.method; + } + + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); + } + + /** + * @param value {@link #method} (A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.) + */ + public MedicationAdministrationDosageComponent setMethod(CodeableConcept value) { + this.method = value; + return this; + } + + /** + * @return {@link #dose} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) + */ + public Quantity getDose() { + if (this.dose == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministrationDosageComponent.dose"); + else if (Configuration.doAutoCreate()) + this.dose = new Quantity(); // cc + return this.dose; + } + + public boolean hasDose() { + return this.dose != null && !this.dose.isEmpty(); + } + + /** + * @param value {@link #dose} (The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.) + */ + public MedicationAdministrationDosageComponent setDose(Quantity value) { + this.dose = value; + return this; + } + + /** + * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public DataType getRate() { + return this.rate; + } + + /** + * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Ratio getRateRatio() throws FHIRException { + if (this.rate == null) + this.rate = new Ratio(); + if (!(this.rate instanceof Ratio)) + throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Ratio) this.rate; + } + + public boolean hasRateRatio() { + return this != null && this.rate instanceof Ratio; + } + + /** + * @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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public Quantity getRateQuantity() throws FHIRException { + if (this.rate == null) + this.rate = new Quantity(); + if (!(this.rate instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (Quantity) this.rate; + } + + public boolean hasRateQuantity() { + return this != null && this.rate instanceof Quantity; + } + + public boolean hasRate() { + return this.rate != null && !this.rate.isEmpty(); + } + + /** + * @param value {@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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public MedicationAdministrationDosageComponent setRate(DataType value) { + if (value != null && !(value instanceof Ratio || value instanceof Quantity)) + throw new FHIRException("Not the right type for MedicationAdministration.dosage.rate[x]: "+value.fhirType()); + this.rate = value; + return this; + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("text", "string", "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.", 0, 1, text)); + children.add(new Property("site", "CodeableConcept", "A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\".", 0, 1, site)); + children.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", 0, 1, route)); + children.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, 1, method)); + children.add(new Property("dose", "Quantity", "The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", 0, 1, dose)); + children.add(new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case 3556653: /*text*/ return new Property("text", "string", "Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.\r\rThe dosage instructions should reflect the dosage of the medication that was administered.", 0, 1, text); + case 3530567: /*site*/ return new Property("site", "CodeableConcept", "A coded specification of the anatomic site where the medication first entered the body. For example, \"left arm\".", 0, 1, site); + case 108704329: /*route*/ return new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient. For example, topical, intravenous, etc.", 0, 1, route); + case -1077554975: /*method*/ return new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV.", 0, 1, method); + case 3089437: /*dose*/ return new Property("dose", "Quantity", "The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.", 0, 1, dose); + case 983460768: /*rate[x]*/ return new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); + case 3493088: /*rate*/ return new Property("rate[x]", "Ratio|Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); + case 204021515: /*rateRatio*/ return new Property("rate[x]", "Ratio", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); + case -1085459061: /*rateQuantity*/ return new Property("rate[x]", "Quantity", "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. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, 1, rate); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType + case 3530567: /*site*/ return this.site == null ? new Base[0] : new Base[] {this.site}; // CodeableConcept + case 108704329: /*route*/ return this.route == null ? new Base[0] : new Base[] {this.route}; // CodeableConcept + case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept + case 3089437: /*dose*/ return this.dose == null ? new Base[0] : new Base[] {this.dose}; // Quantity + case 3493088: /*rate*/ return this.rate == null ? new Base[0] : new Base[] {this.rate}; // DataType + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case 3556653: // text + this.text = TypeConvertor.castToString(value); // StringType + return value; + case 3530567: // site + this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 108704329: // route + this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case -1077554975: // method + this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + return value; + case 3089437: // dose + this.dose = TypeConvertor.castToQuantity(value); // Quantity + return value; + case 3493088: // rate + this.rate = TypeConvertor.castToType(value); // DataType + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("text")) { + this.text = TypeConvertor.castToString(value); // StringType + } else if (name.equals("site")) { + this.site = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("route")) { + this.route = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("method")) { + this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept + } else if (name.equals("dose")) { + this.dose = TypeConvertor.castToQuantity(value); // Quantity + } else if (name.equals("rate[x]")) { + this.rate = TypeConvertor.castToType(value); // DataType + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("text")) { + this.text = null; + } else if (name.equals("site")) { + this.site = null; + } else if (name.equals("route")) { + this.route = null; + } else if (name.equals("method")) { + this.method = null; + } else if (name.equals("dose")) { + this.dose = null; + } else if (name.equals("rate[x]")) { + this.rate = null; + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3556653: return getTextElement(); + case 3530567: return getSite(); + case 108704329: return getRoute(); + case -1077554975: return getMethod(); + case 3089437: return getDose(); + case 983460768: return getRate(); + case 3493088: return getRate(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case 3556653: /*text*/ return new String[] {"string"}; + case 3530567: /*site*/ return new String[] {"CodeableConcept"}; + case 108704329: /*route*/ return new String[] {"CodeableConcept"}; + case -1077554975: /*method*/ return new String[] {"CodeableConcept"}; + case 3089437: /*dose*/ return new String[] {"Quantity"}; + case 3493088: /*rate*/ return new String[] {"Ratio", "Quantity"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("text")) { + throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.dosage.text"); + } + else if (name.equals("site")) { + this.site = new CodeableConcept(); + return this.site; + } + else if (name.equals("route")) { + this.route = new CodeableConcept(); + return this.route; + } + else if (name.equals("method")) { + this.method = new CodeableConcept(); + return this.method; + } + else if (name.equals("dose")) { + this.dose = new Quantity(); + return this.dose; + } + else if (name.equals("rateRatio")) { + this.rate = new Ratio(); + return this.rate; + } + else if (name.equals("rateQuantity")) { + this.rate = new Quantity(); + return this.rate; + } + else + return super.addChild(name); + } + + public MedicationAdministrationDosageComponent copy() { + MedicationAdministrationDosageComponent dst = new MedicationAdministrationDosageComponent(); + copyValues(dst); + return dst; + } + + public void copyValues(MedicationAdministrationDosageComponent dst) { + super.copyValues(dst); + dst.text = text == null ? null : text.copy(); + dst.site = site == null ? null : site.copy(); + dst.route = route == null ? null : route.copy(); + dst.method = method == null ? null : method.copy(); + dst.dose = dose == null ? null : dose.copy(); + dst.rate = rate == null ? null : rate.copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof MedicationAdministrationDosageComponent)) + return false; + MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other_; + return compareDeep(text, o.text, true) && compareDeep(site, o.site, true) && compareDeep(route, o.route, true) + && compareDeep(method, o.method, true) && compareDeep(dose, o.dose, true) && compareDeep(rate, o.rate, true) + ; + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof MedicationAdministrationDosageComponent)) + return false; + MedicationAdministrationDosageComponent o = (MedicationAdministrationDosageComponent) other_; + return compareValues(text, o.text, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(text, site, route, method + , dose, rate); + } + + public String fhirType() { + return "MedicationAdministration.dosage"; + + } + + } + + /** + * Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="External identifier", formalDefinition="Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) + protected List identifier; + + /** + * A plan that is fulfilled in whole or in part by this MedicationAdministration. + */ + @Child(name = "basedOn", type = {CarePlan.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Plan this is fulfilled by this administration", formalDefinition="A plan that is fulfilled in whole or in part by this MedicationAdministration." ) + protected List basedOn; + + /** + * A larger event of which this particular event is a component or step. + */ + @Child(name = "partOf", type = {MedicationAdministration.class, Procedure.class, MedicationDispense.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." ) + protected List partOf; + + /** + * Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="in-progress | not-done | on-hold | completed | entered-in-error | stopped | unknown", formalDefinition="Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-admin-status") + protected Enumeration status; + + /** + * A code indicating why the administration was not performed. + */ + @Child(name = "statusReason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reason administration not performed", formalDefinition="A code indicating why the administration was not performed." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes") + protected List statusReason; + + /** + * The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication). + */ + @Child(name = "category", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Type of medication administration", formalDefinition="The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication)." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-admin-location") + protected List category; + + /** + * Identifies the medication that was 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. + */ + @Child(name = "medication", type = {CodeableReference.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="What was administered", formalDefinition="Identifies the medication that was 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." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes") + protected CodeableReference medication; + + /** + * The person or animal or group receiving the medication. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who received medication", formalDefinition="The person or animal or group receiving the medication." ) + protected Reference subject; + + /** + * The visit, admission, or other contact between patient and health care provider during which the medication administration was performed. + */ + @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Encounter administered as part of", formalDefinition="The visit, admission, or other contact between patient and health care provider during which the medication administration was performed." ) + protected Reference encounter; + + /** + * Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says "give "x" if the heartrate exceeds "y"", then the heart rate can be included using this attribute. + */ + @Child(name = "supportingInformation", type = {Reference.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional information to support administration", formalDefinition="Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute." ) + protected List supportingInformation; + + /** + * A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate. + */ + @Child(name = "occurence", type = {DateTimeType.class, Period.class, Timing.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific date/time or interval of time during which the administration took place (or did not take place)", formalDefinition="A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." ) + protected DataType occurence; + + /** + * The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. + */ + @Child(name = "recorded", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the MedicationAdministration was first captured in the subject's record", formalDefinition="The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event." ) + protected DateTimeType recorded; + + /** + * An indication that the full dose was not administered. + */ + @Child(name = "isSubPotent", type = {BooleanType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Full dose was not administered", formalDefinition="An indication that the full dose was not administered." ) + protected BooleanType isSubPotent; + + /** + * The reason or reasons why the full dose was not administered. + */ + @Child(name = "subPotentReason", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Reason full dose was not administered", formalDefinition="The reason or reasons why the full dose was not administered." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administration-subpotent-reason") + protected List subPotentReason; + + /** + * The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers. + */ + @Child(name = "performer", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Who or what performed the medication administration and what type of performance they did", formalDefinition="The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers." ) + protected List performer; + + /** + * A code, Condition or observation that supports why the medication was administered. + */ + @Child(name = "reason", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Concept, condition or observation that supports why the medication was administered", formalDefinition="A code, Condition or observation that supports why the medication was administered." ) + @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reason-medication-given-codes") + protected List reason; + + /** + * The original request, instruction or authority to perform the administration. + */ + @Child(name = "request", type = {MedicationRequest.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Request administration performed against", formalDefinition="The original request, instruction or authority to perform the administration." ) + protected Reference request; + + /** + * The device that is to be used for the administration of the medication (for example, PCA Pump). + */ + @Child(name = "device", type = {CodeableReference.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Device used to administer", formalDefinition="The device that is to be used for the administration of the medication (for example, PCA Pump)." ) + protected List device; + + /** + * Extra information about the medication administration that is not conveyed by the other attributes. + */ + @Child(name = "note", type = {Annotation.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Information about the administration", formalDefinition="Extra information about the medication administration that is not conveyed by the other attributes." ) + protected List note; + + /** + * Describes the medication dosage information details e.g. dose, rate, site, route, etc. + */ + @Child(name = "dosage", type = {}, order=19, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details of how medication was taken", formalDefinition="Describes the medication dosage information details e.g. dose, rate, site, route, etc." ) + protected MedicationAdministrationDosageComponent dosage; + + /** + * A summary of the events of interest that have occurred, such as when the administration was verified. + */ + @Child(name = "eventHistory", type = {Provenance.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A list of events of interest in the lifecycle", formalDefinition="A summary of the events of interest that have occurred, such as when the administration was verified." ) + protected List eventHistory; + + private static final long serialVersionUID = 296165909L; + + /** + * Constructor + */ + public MedicationAdministration() { + super(); + } + + /** + * Constructor + */ + public MedicationAdministration(MedicationAdministrationStatusCodes status, CodeableReference medication, Reference subject, DataType occurence) { + super(); + this.setStatus(status); + this.setMedication(medication); + this.setSubject(subject); + this.setOccurence(occurence); + } + + /** + * @return {@link #identifier} (Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setIdentifier(List theIdentifier) { + this.identifier = theIdentifier; + return this; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + public MedicationAdministration addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} + */ + public Identifier getIdentifierFirstRep() { + if (getIdentifier().isEmpty()) { + addIdentifier(); + } + return getIdentifier().get(0); + } + + /** + * @return {@link #basedOn} (A plan that is fulfilled in whole or in part by this MedicationAdministration.) + */ + public List getBasedOn() { + if (this.basedOn == null) + this.basedOn = new ArrayList(); + return this.basedOn; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setBasedOn(List theBasedOn) { + this.basedOn = theBasedOn; + return this; + } + + public boolean hasBasedOn() { + if (this.basedOn == null) + return false; + for (Reference item : this.basedOn) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addBasedOn() { //3 + Reference t = new Reference(); + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return t; + } + + public MedicationAdministration addBasedOn(Reference t) { //3 + if (t == null) + return this; + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} + */ + public Reference getBasedOnFirstRep() { + if (getBasedOn().isEmpty()) { + addBasedOn(); + } + return getBasedOn().get(0); + } + + /** + * @return {@link #partOf} (A larger event of which this particular event is a component or step.) + */ + public List getPartOf() { + if (this.partOf == null) + this.partOf = new ArrayList(); + return this.partOf; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setPartOf(List thePartOf) { + this.partOf = thePartOf; + return this; + } + + public boolean hasPartOf() { + if (this.partOf == null) + return false; + for (Reference item : this.partOf) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addPartOf() { //3 + Reference t = new Reference(); + if (this.partOf == null) + this.partOf = new ArrayList(); + this.partOf.add(t); + return t; + } + + public MedicationAdministration addPartOf(Reference t) { //3 + if (t == null) + return this; + if (this.partOf == null) + this.partOf = new ArrayList(); + this.partOf.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3} + */ + public Reference getPartOfFirstRep() { + if (getPartOf().isEmpty()) { + addPartOf(); + } + return getPartOf().get(0); + } + + /** + * @return {@link #status} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). 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 MedicationAdministration.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MedicationAdministrationStatusCodesEnumFactory()); // 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} (Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MedicationAdministration setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + public MedicationAdministrationStatusCodes getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way. + */ + public MedicationAdministration setStatus(MedicationAdministrationStatusCodes value) { + if (this.status == null) + this.status = new Enumeration(new MedicationAdministrationStatusCodesEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #statusReason} (A code indicating why the administration was not performed.) + */ + public List getStatusReason() { + if (this.statusReason == null) + this.statusReason = new ArrayList(); + return this.statusReason; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setStatusReason(List theStatusReason) { + this.statusReason = theStatusReason; + return this; + } + + public boolean hasStatusReason() { + if (this.statusReason == null) + return false; + for (CodeableConcept item : this.statusReason) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addStatusReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.statusReason == null) + this.statusReason = new ArrayList(); + this.statusReason.add(t); + return t; + } + + public MedicationAdministration addStatusReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.statusReason == null) + this.statusReason = new ArrayList(); + this.statusReason.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #statusReason}, creating it if it does not already exist {3} + */ + public CodeableConcept getStatusReasonFirstRep() { + if (getStatusReason().isEmpty()) { + addStatusReason(); + } + return getStatusReason().get(0); + } + + /** + * @return {@link #category} (The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).) + */ + public List getCategory() { + if (this.category == null) + this.category = new ArrayList(); + return this.category; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setCategory(List theCategory) { + this.category = theCategory; + return this; + } + + public boolean hasCategory() { + if (this.category == null) + return false; + for (CodeableConcept item : this.category) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addCategory() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return t; + } + + public MedicationAdministration addCategory(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.category == null) + this.category = new ArrayList(); + this.category.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3} + */ + public CodeableConcept getCategoryFirstRep() { + if (getCategory().isEmpty()) { + addCategory(); + } + return getCategory().get(0); + } + + /** + * @return {@link #medication} (Identifies the medication that was 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.) + */ + public CodeableReference getMedication() { + if (this.medication == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.medication"); + else if (Configuration.doAutoCreate()) + this.medication = new CodeableReference(); // cc + return this.medication; + } + + public boolean hasMedication() { + return this.medication != null && !this.medication.isEmpty(); + } + + /** + * @param value {@link #medication} (Identifies the medication that was 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.) + */ + public MedicationAdministration setMedication(CodeableReference value) { + this.medication = value; + return this; + } + + /** + * @return {@link #subject} (The person or animal or group receiving the medication.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.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 person or animal or group receiving the medication.) + */ + public MedicationAdministration setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #encounter} (The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.) + */ + public Reference getEncounter() { + if (this.encounter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.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 visit, admission, or other contact between patient and health care provider during which the medication administration was performed.) + */ + public MedicationAdministration setEncounter(Reference value) { + this.encounter = value; + return this; + } + + /** + * @return {@link #supportingInformation} (Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says "give "x" if the heartrate exceeds "y"", then the heart rate can be included using this attribute.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setSupportingInformation(List theSupportingInformation) { + this.supportingInformation = theSupportingInformation; + return this; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + public MedicationAdministration addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} + */ + public Reference getSupportingInformationFirstRep() { + if (getSupportingInformation().isEmpty()) { + addSupportingInformation(); + } + return getSupportingInformation().get(0); + } + + /** + * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public DataType getOccurence() { + return this.occurence; + } + + /** + * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public DateTimeType getOccurenceDateTimeType() throws FHIRException { + if (this.occurence == null) + this.occurence = new DateTimeType(); + if (!(this.occurence instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurence.getClass().getName()+" was encountered"); + return (DateTimeType) this.occurence; + } + + public boolean hasOccurenceDateTimeType() { + return this != null && this.occurence instanceof DateTimeType; + } + + /** + * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public Period getOccurencePeriod() throws FHIRException { + if (this.occurence == null) + this.occurence = new Period(); + if (!(this.occurence instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurence.getClass().getName()+" was encountered"); + return (Period) this.occurence; + } + + public boolean hasOccurencePeriod() { + return this != null && this.occurence instanceof Period; + } + + /** + * @return {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public Timing getOccurenceTiming() throws FHIRException { + if (this.occurence == null) + this.occurence = new Timing(); + if (!(this.occurence instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurence.getClass().getName()+" was encountered"); + return (Timing) this.occurence; + } + + public boolean hasOccurenceTiming() { + return this != null && this.occurence instanceof Timing; + } + + public boolean hasOccurence() { + return this.occurence != null && !this.occurence.isEmpty(); + } + + /** + * @param value {@link #occurence} (A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.) + */ + public MedicationAdministration setOccurence(DataType value) { + if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing)) + throw new FHIRException("Not the right type for MedicationAdministration.occurence[x]: "+value.fhirType()); + this.occurence = value; + return this; + } + + /** + * @return {@link #recorded} (The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public DateTimeType getRecordedElement() { + if (this.recorded == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.recorded"); + else if (Configuration.doAutoCreate()) + this.recorded = new DateTimeType(); // bb + return this.recorded; + } + + public boolean hasRecordedElement() { + return this.recorded != null && !this.recorded.isEmpty(); + } + + public boolean hasRecorded() { + return this.recorded != null && !this.recorded.isEmpty(); + } + + /** + * @param value {@link #recorded} (The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.). This is the underlying object with id, value and extensions. The accessor "getRecorded" gives direct access to the value + */ + public MedicationAdministration setRecordedElement(DateTimeType value) { + this.recorded = value; + return this; + } + + /** + * @return The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. + */ + public Date getRecorded() { + return this.recorded == null ? null : this.recorded.getValue(); + } + + /** + * @param value The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event. + */ + public MedicationAdministration setRecorded(Date value) { + if (value == null) + this.recorded = null; + else { + if (this.recorded == null) + this.recorded = new DateTimeType(); + this.recorded.setValue(value); + } + return this; + } + + /** + * @return {@link #isSubPotent} (An indication that the full dose was not administered.). This is the underlying object with id, value and extensions. The accessor "getIsSubPotent" gives direct access to the value + */ + public BooleanType getIsSubPotentElement() { + if (this.isSubPotent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.isSubPotent"); + else if (Configuration.doAutoCreate()) + this.isSubPotent = new BooleanType(); // bb + return this.isSubPotent; + } + + public boolean hasIsSubPotentElement() { + return this.isSubPotent != null && !this.isSubPotent.isEmpty(); + } + + public boolean hasIsSubPotent() { + return this.isSubPotent != null && !this.isSubPotent.isEmpty(); + } + + /** + * @param value {@link #isSubPotent} (An indication that the full dose was not administered.). This is the underlying object with id, value and extensions. The accessor "getIsSubPotent" gives direct access to the value + */ + public MedicationAdministration setIsSubPotentElement(BooleanType value) { + this.isSubPotent = value; + return this; + } + + /** + * @return An indication that the full dose was not administered. + */ + public boolean getIsSubPotent() { + return this.isSubPotent == null || this.isSubPotent.isEmpty() ? false : this.isSubPotent.getValue(); + } + + /** + * @param value An indication that the full dose was not administered. + */ + public MedicationAdministration setIsSubPotent(boolean value) { + if (this.isSubPotent == null) + this.isSubPotent = new BooleanType(); + this.isSubPotent.setValue(value); + return this; + } + + /** + * @return {@link #subPotentReason} (The reason or reasons why the full dose was not administered.) + */ + public List getSubPotentReason() { + if (this.subPotentReason == null) + this.subPotentReason = new ArrayList(); + return this.subPotentReason; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setSubPotentReason(List theSubPotentReason) { + this.subPotentReason = theSubPotentReason; + return this; + } + + public boolean hasSubPotentReason() { + if (this.subPotentReason == null) + return false; + for (CodeableConcept item : this.subPotentReason) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableConcept addSubPotentReason() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.subPotentReason == null) + this.subPotentReason = new ArrayList(); + this.subPotentReason.add(t); + return t; + } + + public MedicationAdministration addSubPotentReason(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.subPotentReason == null) + this.subPotentReason = new ArrayList(); + this.subPotentReason.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #subPotentReason}, creating it if it does not already exist {3} + */ + public CodeableConcept getSubPotentReasonFirstRep() { + if (getSubPotentReason().isEmpty()) { + addSubPotentReason(); + } + return getSubPotentReason().get(0); + } + + /** + * @return {@link #performer} (The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.) + */ + public List getPerformer() { + if (this.performer == null) + this.performer = new ArrayList(); + return this.performer; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setPerformer(List thePerformer) { + this.performer = thePerformer; + return this; + } + + public boolean hasPerformer() { + if (this.performer == null) + return false; + for (MedicationAdministrationPerformerComponent item : this.performer) + if (!item.isEmpty()) + return true; + return false; + } + + public MedicationAdministrationPerformerComponent addPerformer() { //3 + MedicationAdministrationPerformerComponent t = new MedicationAdministrationPerformerComponent(); + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return t; + } + + public MedicationAdministration addPerformer(MedicationAdministrationPerformerComponent t) { //3 + if (t == null) + return this; + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3} + */ + public MedicationAdministrationPerformerComponent getPerformerFirstRep() { + if (getPerformer().isEmpty()) { + addPerformer(); + } + return getPerformer().get(0); + } + + /** + * @return {@link #reason} (A code, Condition or observation that supports why the medication was administered.) + */ + public List getReason() { + if (this.reason == null) + this.reason = new ArrayList(); + return this.reason; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setReason(List theReason) { + this.reason = theReason; + return this; + } + + public boolean hasReason() { + if (this.reason == null) + return false; + for (CodeableReference item : this.reason) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addReason() { //3 + CodeableReference t = new CodeableReference(); + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return t; + } + + public MedicationAdministration addReason(CodeableReference t) { //3 + if (t == null) + return this; + if (this.reason == null) + this.reason = new ArrayList(); + this.reason.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} + */ + public CodeableReference getReasonFirstRep() { + if (getReason().isEmpty()) { + addReason(); + } + return getReason().get(0); + } + + /** + * @return {@link #request} (The original request, instruction or authority to perform the administration.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (The original request, instruction or authority to perform the administration.) + */ + public MedicationAdministration setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #device} (The device that is to be used for the administration of the medication (for example, PCA Pump).) + */ + public List getDevice() { + if (this.device == null) + this.device = new ArrayList(); + return this.device; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setDevice(List theDevice) { + this.device = theDevice; + return this; + } + + public boolean hasDevice() { + if (this.device == null) + return false; + for (CodeableReference item : this.device) + if (!item.isEmpty()) + return true; + return false; + } + + public CodeableReference addDevice() { //3 + CodeableReference t = new CodeableReference(); + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return t; + } + + public MedicationAdministration addDevice(CodeableReference t) { //3 + if (t == null) + return this; + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #device}, creating it if it does not already exist {3} + */ + public CodeableReference getDeviceFirstRep() { + if (getDevice().isEmpty()) { + addDevice(); + } + return getDevice().get(0); + } + + /** + * @return {@link #note} (Extra information about the medication administration that is not conveyed by the other attributes.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setNote(List theNote) { + this.note = theNote; + return this; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + public MedicationAdministration addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} + */ + public Annotation getNoteFirstRep() { + if (getNote().isEmpty()) { + addNote(); + } + return getNote().get(0); + } + + /** + * @return {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) + */ + public MedicationAdministrationDosageComponent getDosage() { + if (this.dosage == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MedicationAdministration.dosage"); + else if (Configuration.doAutoCreate()) + this.dosage = new MedicationAdministrationDosageComponent(); // cc + return this.dosage; + } + + public boolean hasDosage() { + return this.dosage != null && !this.dosage.isEmpty(); + } + + /** + * @param value {@link #dosage} (Describes the medication dosage information details e.g. dose, rate, site, route, etc.) + */ + public MedicationAdministration setDosage(MedicationAdministrationDosageComponent value) { + this.dosage = value; + return this; + } + + /** + * @return {@link #eventHistory} (A summary of the events of interest that have occurred, such as when the administration was verified.) + */ + public List getEventHistory() { + if (this.eventHistory == null) + this.eventHistory = new ArrayList(); + return this.eventHistory; + } + + /** + * @return Returns a reference to this for easy method chaining + */ + public MedicationAdministration setEventHistory(List theEventHistory) { + this.eventHistory = theEventHistory; + return this; + } + + public boolean hasEventHistory() { + if (this.eventHistory == null) + return false; + for (Reference item : this.eventHistory) + if (!item.isEmpty()) + return true; + return false; + } + + public Reference addEventHistory() { //3 + Reference t = new Reference(); + if (this.eventHistory == null) + this.eventHistory = new ArrayList(); + this.eventHistory.add(t); + return t; + } + + public MedicationAdministration addEventHistory(Reference t) { //3 + if (t == null) + return this; + if (this.eventHistory == null) + this.eventHistory = new ArrayList(); + this.eventHistory.add(t); + return this; + } + + /** + * @return The first repetition of repeating field {@link #eventHistory}, creating it if it does not already exist {3} + */ + public Reference getEventHistoryFirstRep() { + if (getEventHistory().isEmpty()) { + addEventHistory(); + } + return getEventHistory().get(0); + } + + protected void listChildren(List children) { + super.listChildren(children); + children.add(new Property("identifier", "Identifier", "Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier)); + children.add(new Property("basedOn", "Reference(CarePlan)", "A plan that is fulfilled in whole or in part by this MedicationAdministration.", 0, java.lang.Integer.MAX_VALUE, basedOn)); + children.add(new Property("partOf", "Reference(MedicationAdministration|Procedure|MedicationDispense)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf)); + children.add(new Property("status", "code", "Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", 0, 1, status)); + children.add(new Property("statusReason", "CodeableConcept", "A code indicating why the administration was not performed.", 0, java.lang.Integer.MAX_VALUE, statusReason)); + children.add(new Property("category", "CodeableConcept", "The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).", 0, java.lang.Integer.MAX_VALUE, category)); + children.add(new Property("medication", "CodeableReference(Medication)", "Identifies the medication that was 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, 1, medication)); + children.add(new Property("subject", "Reference(Patient|Group)", "The person or animal or group receiving the medication.", 0, 1, subject)); + children.add(new Property("encounter", "Reference(Encounter)", "The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.", 0, 1, encounter)); + children.add(new Property("supportingInformation", "Reference(Any)", "Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); + children.add(new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence)); + children.add(new Property("recorded", "dateTime", "The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.", 0, 1, recorded)); + children.add(new Property("isSubPotent", "boolean", "An indication that the full dose was not administered.", 0, 1, isSubPotent)); + children.add(new Property("subPotentReason", "CodeableConcept", "The reason or reasons why the full dose was not administered.", 0, java.lang.Integer.MAX_VALUE, subPotentReason)); + children.add(new Property("performer", "", "The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.", 0, java.lang.Integer.MAX_VALUE, performer)); + children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "A code, Condition or observation that supports why the medication was administered.", 0, java.lang.Integer.MAX_VALUE, reason)); + children.add(new Property("request", "Reference(MedicationRequest)", "The original request, instruction or authority to perform the administration.", 0, 1, request)); + children.add(new Property("device", "CodeableReference(Device)", "The device that is to be used for the administration of the medication (for example, PCA Pump).", 0, java.lang.Integer.MAX_VALUE, device)); + children.add(new Property("note", "Annotation", "Extra information about the medication administration that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); + children.add(new Property("dosage", "", "Describes the medication dosage information details e.g. dose, rate, site, route, etc.", 0, 1, dosage)); + children.add(new Property("eventHistory", "Reference(Provenance)", "A summary of the events of interest that have occurred, such as when the administration was verified.", 0, java.lang.Integer.MAX_VALUE, eventHistory)); + } + + @Override + public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { + switch (_hash) { + case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifiers associated with this Medication Administration 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. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier); + case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan)", "A plan that is fulfilled in whole or in part by this MedicationAdministration.", 0, java.lang.Integer.MAX_VALUE, basedOn); + case -995410646: /*partOf*/ return new Property("partOf", "Reference(MedicationAdministration|Procedure|MedicationDispense)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf); + case -892481550: /*status*/ return new Property("status", "code", "Will generally be set to show that the administration has been completed. For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way.", 0, 1, status); + case 2051346646: /*statusReason*/ return new Property("statusReason", "CodeableConcept", "A code indicating why the administration was not performed.", 0, java.lang.Integer.MAX_VALUE, statusReason); + case 50511102: /*category*/ return new Property("category", "CodeableConcept", "The type of medication administration (for example, drug classification like ATC, where meds would be administered, legal category of the medication).", 0, java.lang.Integer.MAX_VALUE, category); + case 1998965455: /*medication*/ return new Property("medication", "CodeableReference(Medication)", "Identifies the medication that was 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, 1, medication); + case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The person or animal or group receiving the medication.", 0, 1, subject); + case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.", 0, 1, encounter); + case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Additional information (for example, patient height and weight) that supports the administration of the medication. This attribute can be used to provide documentation of specific characteristics of the patient present at the time of administration. For example, if the dose says \"give \"x\" if the heartrate exceeds \"y\"\", then the heart rate can be included using this attribute.", 0, java.lang.Integer.MAX_VALUE, supportingInformation); + case 144188521: /*occurence[x]*/ return new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); + case -1192857417: /*occurence*/ return new Property("occurence[x]", "dateTime|Period|Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); + case -820552334: /*occurenceDateTime*/ return new Property("occurence[x]", "dateTime", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); + case 221195608: /*occurencePeriod*/ return new Property("occurence[x]", "Period", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); + case 339257313: /*occurenceTiming*/ return new Property("occurence[x]", "Timing", "A specific date/time or interval of time during which the administration took place (or did not take place). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.", 0, 1, occurence); + case -799233872: /*recorded*/ return new Property("recorded", "dateTime", "The date the occurrence of the MedicationAdministration was first captured in the record - potentially significantly after the occurrence of the event.", 0, 1, recorded); + case 702379724: /*isSubPotent*/ return new Property("isSubPotent", "boolean", "An indication that the full dose was not administered.", 0, 1, isSubPotent); + case 969489082: /*subPotentReason*/ return new Property("subPotentReason", "CodeableConcept", "The reason or reasons why the full dose was not administered.", 0, java.lang.Integer.MAX_VALUE, subPotentReason); + case 481140686: /*performer*/ return new Property("performer", "", "The performer of the medication treatment. For devices this is the device that performed the administration of the medication. An IV Pump would be an example of a device that is performing the administration. Both the IV Pump and the practitioner that set the rate or bolus on the pump can be listed as performers.", 0, java.lang.Integer.MAX_VALUE, performer); + case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport)", "A code, Condition or observation that supports why the medication was administered.", 0, java.lang.Integer.MAX_VALUE, reason); + case 1095692943: /*request*/ return new Property("request", "Reference(MedicationRequest)", "The original request, instruction or authority to perform the administration.", 0, 1, request); + case -1335157162: /*device*/ return new Property("device", "CodeableReference(Device)", "The device that is to be used for the administration of the medication (for example, PCA Pump).", 0, java.lang.Integer.MAX_VALUE, device); + case 3387378: /*note*/ return new Property("note", "Annotation", "Extra information about the medication administration that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note); + case -1326018889: /*dosage*/ return new Property("dosage", "", "Describes the medication dosage information details e.g. dose, rate, site, route, etc.", 0, 1, dosage); + case 1835190426: /*eventHistory*/ return new Property("eventHistory", "Reference(Provenance)", "A summary of the events of interest that have occurred, such as when the administration was verified.", 0, java.lang.Integer.MAX_VALUE, eventHistory); + default: return super.getNamedProperty(_hash, _name, _checkValid); + } + + } + + @Override + public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier + case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference + case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference + case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration + case 2051346646: /*statusReason*/ return this.statusReason == null ? new Base[0] : this.statusReason.toArray(new Base[this.statusReason.size()]); // CodeableConcept + case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept + case 1998965455: /*medication*/ return this.medication == null ? new Base[0] : new Base[] {this.medication}; // CodeableReference + case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference + case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference + case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference + case -1192857417: /*occurence*/ return this.occurence == null ? new Base[0] : new Base[] {this.occurence}; // DataType + case -799233872: /*recorded*/ return this.recorded == null ? new Base[0] : new Base[] {this.recorded}; // DateTimeType + case 702379724: /*isSubPotent*/ return this.isSubPotent == null ? new Base[0] : new Base[] {this.isSubPotent}; // BooleanType + case 969489082: /*subPotentReason*/ return this.subPotentReason == null ? new Base[0] : this.subPotentReason.toArray(new Base[this.subPotentReason.size()]); // CodeableConcept + case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // MedicationAdministrationPerformerComponent + case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference + case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference + case -1335157162: /*device*/ return this.device == null ? new Base[0] : this.device.toArray(new Base[this.device.size()]); // CodeableReference + case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation + case -1326018889: /*dosage*/ return this.dosage == null ? new Base[0] : new Base[] {this.dosage}; // MedicationAdministrationDosageComponent + case 1835190426: /*eventHistory*/ return this.eventHistory == null ? new Base[0] : this.eventHistory.toArray(new Base[this.eventHistory.size()]); // Reference + default: return super.getProperty(hash, name, checkValid); + } + + } + + @Override + public Base setProperty(int hash, String name, Base value) throws FHIRException { + switch (hash) { + case -1618432855: // identifier + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier + return value; + case -332612366: // basedOn + this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -995410646: // partOf + this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -892481550: // status + value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + return value; + case 2051346646: // statusReason + this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 50511102: // category + this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 1998965455: // medication + this.medication = TypeConvertor.castToCodeableReference(value); // CodeableReference + return value; + case -1867885268: // subject + this.subject = TypeConvertor.castToReference(value); // Reference + return value; + case 1524132147: // encounter + this.encounter = TypeConvertor.castToReference(value); // Reference + return value; + case -1248768647: // supportingInformation + this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference + return value; + case -1192857417: // occurence + this.occurence = TypeConvertor.castToType(value); // DataType + return value; + case -799233872: // recorded + this.recorded = TypeConvertor.castToDateTime(value); // DateTimeType + return value; + case 702379724: // isSubPotent + this.isSubPotent = TypeConvertor.castToBoolean(value); // BooleanType + return value; + case 969489082: // subPotentReason + this.getSubPotentReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept + return value; + case 481140686: // performer + this.getPerformer().add((MedicationAdministrationPerformerComponent) value); // MedicationAdministrationPerformerComponent + return value; + case -934964668: // reason + this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case 1095692943: // request + this.request = TypeConvertor.castToReference(value); // Reference + return value; + case -1335157162: // device + this.getDevice().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference + return value; + case 3387378: // note + this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation + return value; + case -1326018889: // dosage + this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent + return value; + case 1835190426: // eventHistory + this.getEventHistory().add(TypeConvertor.castToReference(value)); // Reference + return value; + default: return super.setProperty(hash, name, value); + } + + } + + @Override + public Base setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); + } else if (name.equals("basedOn")) { + this.getBasedOn().add(TypeConvertor.castToReference(value)); + } else if (name.equals("partOf")) { + this.getPartOf().add(TypeConvertor.castToReference(value)); + } else if (name.equals("status")) { + value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("statusReason")) { + this.getStatusReason().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("category")) { + this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("medication")) { + this.medication = TypeConvertor.castToCodeableReference(value); // CodeableReference + } else if (name.equals("subject")) { + this.subject = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("encounter")) { + this.encounter = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("supportingInformation")) { + this.getSupportingInformation().add(TypeConvertor.castToReference(value)); + } else if (name.equals("occurence[x]")) { + this.occurence = TypeConvertor.castToType(value); // DataType + } else if (name.equals("recorded")) { + this.recorded = TypeConvertor.castToDateTime(value); // DateTimeType + } else if (name.equals("isSubPotent")) { + this.isSubPotent = TypeConvertor.castToBoolean(value); // BooleanType + } else if (name.equals("subPotentReason")) { + this.getSubPotentReason().add(TypeConvertor.castToCodeableConcept(value)); + } else if (name.equals("performer")) { + this.getPerformer().add((MedicationAdministrationPerformerComponent) value); + } else if (name.equals("reason")) { + this.getReason().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("request")) { + this.request = TypeConvertor.castToReference(value); // Reference + } else if (name.equals("device")) { + this.getDevice().add(TypeConvertor.castToCodeableReference(value)); + } else if (name.equals("note")) { + this.getNote().add(TypeConvertor.castToAnnotation(value)); + } else if (name.equals("dosage")) { + this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent + } else if (name.equals("eventHistory")) { + this.getEventHistory().add(TypeConvertor.castToReference(value)); + } else + return super.setProperty(name, value); + return value; + } + + @Override + public void removeChild(String name, Base value) throws FHIRException { + if (name.equals("identifier")) { + this.getIdentifier().remove(value); + } else if (name.equals("basedOn")) { + this.getBasedOn().remove(value); + } else if (name.equals("partOf")) { + this.getPartOf().remove(value); + } else if (name.equals("status")) { + value = new MedicationAdministrationStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); + this.status = (Enumeration) value; // Enumeration + } else if (name.equals("statusReason")) { + this.getStatusReason().remove(value); + } else if (name.equals("category")) { + this.getCategory().remove(value); + } else if (name.equals("medication")) { + this.medication = null; + } else if (name.equals("subject")) { + this.subject = null; + } else if (name.equals("encounter")) { + this.encounter = null; + } else if (name.equals("supportingInformation")) { + this.getSupportingInformation().remove(value); + } else if (name.equals("occurence[x]")) { + this.occurence = null; + } else if (name.equals("recorded")) { + this.recorded = null; + } else if (name.equals("isSubPotent")) { + this.isSubPotent = null; + } else if (name.equals("subPotentReason")) { + this.getSubPotentReason().remove(value); + } else if (name.equals("performer")) { + this.getPerformer().remove((MedicationAdministrationPerformerComponent) value); + } else if (name.equals("reason")) { + this.getReason().remove(value); + } else if (name.equals("request")) { + this.request = null; + } else if (name.equals("device")) { + this.getDevice().remove(value); + } else if (name.equals("note")) { + this.getNote().remove(value); + } else if (name.equals("dosage")) { + this.dosage = (MedicationAdministrationDosageComponent) value; // MedicationAdministrationDosageComponent + } else if (name.equals("eventHistory")) { + this.getEventHistory().remove(value); + } else + super.removeChild(name, value); + + } + + @Override + public Base makeProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: return addIdentifier(); + case -332612366: return addBasedOn(); + case -995410646: return addPartOf(); + case -892481550: return getStatusElement(); + case 2051346646: return addStatusReason(); + case 50511102: return addCategory(); + case 1998965455: return getMedication(); + case -1867885268: return getSubject(); + case 1524132147: return getEncounter(); + case -1248768647: return addSupportingInformation(); + case 144188521: return getOccurence(); + case -1192857417: return getOccurence(); + case -799233872: return getRecordedElement(); + case 702379724: return getIsSubPotentElement(); + case 969489082: return addSubPotentReason(); + case 481140686: return addPerformer(); + case -934964668: return addReason(); + case 1095692943: return getRequest(); + case -1335157162: return addDevice(); + case 3387378: return addNote(); + case -1326018889: return getDosage(); + case 1835190426: return addEventHistory(); + default: return super.makeProperty(hash, name); + } + + } + + @Override + public String[] getTypesForProperty(int hash, String name) throws FHIRException { + switch (hash) { + case -1618432855: /*identifier*/ return new String[] {"Identifier"}; + case -332612366: /*basedOn*/ return new String[] {"Reference"}; + case -995410646: /*partOf*/ return new String[] {"Reference"}; + case -892481550: /*status*/ return new String[] {"code"}; + case 2051346646: /*statusReason*/ return new String[] {"CodeableConcept"}; + case 50511102: /*category*/ return new String[] {"CodeableConcept"}; + case 1998965455: /*medication*/ return new String[] {"CodeableReference"}; + case -1867885268: /*subject*/ return new String[] {"Reference"}; + case 1524132147: /*encounter*/ return new String[] {"Reference"}; + case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; + case -1192857417: /*occurence*/ return new String[] {"dateTime", "Period", "Timing"}; + case -799233872: /*recorded*/ return new String[] {"dateTime"}; + case 702379724: /*isSubPotent*/ return new String[] {"boolean"}; + case 969489082: /*subPotentReason*/ return new String[] {"CodeableConcept"}; + case 481140686: /*performer*/ return new String[] {}; + case -934964668: /*reason*/ return new String[] {"CodeableReference"}; + case 1095692943: /*request*/ return new String[] {"Reference"}; + case -1335157162: /*device*/ return new String[] {"CodeableReference"}; + case 3387378: /*note*/ return new String[] {"Annotation"}; + case -1326018889: /*dosage*/ return new String[] {}; + case 1835190426: /*eventHistory*/ return new String[] {"Reference"}; + default: return super.getTypesForProperty(hash, name); + } + + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("basedOn")) { + return addBasedOn(); + } + else if (name.equals("partOf")) { + return addPartOf(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.status"); + } + else if (name.equals("statusReason")) { + return addStatusReason(); + } + else if (name.equals("category")) { + return addCategory(); + } + else if (name.equals("medication")) { + this.medication = new CodeableReference(); + return this.medication; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("encounter")) { + this.encounter = new Reference(); + return this.encounter; + } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } + else if (name.equals("occurenceDateTime")) { + this.occurence = new DateTimeType(); + return this.occurence; + } + else if (name.equals("occurencePeriod")) { + this.occurence = new Period(); + return this.occurence; + } + else if (name.equals("occurenceTiming")) { + this.occurence = new Timing(); + return this.occurence; + } + else if (name.equals("recorded")) { + throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.recorded"); + } + else if (name.equals("isSubPotent")) { + throw new FHIRException("Cannot call addChild on a singleton property MedicationAdministration.isSubPotent"); + } + else if (name.equals("subPotentReason")) { + return addSubPotentReason(); + } + else if (name.equals("performer")) { + return addPerformer(); + } + else if (name.equals("reason")) { + return addReason(); + } + else if (name.equals("request")) { + this.request = new Reference(); + return this.request; + } + else if (name.equals("device")) { + return addDevice(); + } + else if (name.equals("note")) { + return addNote(); + } + else if (name.equals("dosage")) { + this.dosage = new MedicationAdministrationDosageComponent(); + return this.dosage; + } + else if (name.equals("eventHistory")) { + return addEventHistory(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MedicationAdministration"; + + } + + public MedicationAdministration copy() { + MedicationAdministration dst = new MedicationAdministration(); + copyValues(dst); + return dst; + } + + public void copyValues(MedicationAdministration dst) { + super.copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (basedOn != null) { + dst.basedOn = new ArrayList(); + for (Reference i : basedOn) + dst.basedOn.add(i.copy()); + }; + if (partOf != null) { + dst.partOf = new ArrayList(); + for (Reference i : partOf) + dst.partOf.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + if (statusReason != null) { + dst.statusReason = new ArrayList(); + for (CodeableConcept i : statusReason) + dst.statusReason.add(i.copy()); + }; + if (category != null) { + dst.category = new ArrayList(); + for (CodeableConcept i : category) + dst.category.add(i.copy()); + }; + dst.medication = medication == null ? null : medication.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.encounter = encounter == null ? null : encounter.copy(); + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; + dst.occurence = occurence == null ? null : occurence.copy(); + dst.recorded = recorded == null ? null : recorded.copy(); + dst.isSubPotent = isSubPotent == null ? null : isSubPotent.copy(); + if (subPotentReason != null) { + dst.subPotentReason = new ArrayList(); + for (CodeableConcept i : subPotentReason) + dst.subPotentReason.add(i.copy()); + }; + if (performer != null) { + dst.performer = new ArrayList(); + for (MedicationAdministrationPerformerComponent i : performer) + dst.performer.add(i.copy()); + }; + if (reason != null) { + dst.reason = new ArrayList(); + for (CodeableReference i : reason) + dst.reason.add(i.copy()); + }; + dst.request = request == null ? null : request.copy(); + if (device != null) { + dst.device = new ArrayList(); + for (CodeableReference i : device) + dst.device.add(i.copy()); + }; + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; + dst.dosage = dosage == null ? null : dosage.copy(); + if (eventHistory != null) { + dst.eventHistory = new ArrayList(); + for (Reference i : eventHistory) + dst.eventHistory.add(i.copy()); + }; + } + + protected MedicationAdministration typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other_) { + if (!super.equalsDeep(other_)) + return false; + if (!(other_ instanceof MedicationAdministration)) + return false; + MedicationAdministration o = (MedicationAdministration) other_; + return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) + && compareDeep(status, o.status, true) && compareDeep(statusReason, o.statusReason, true) && compareDeep(category, o.category, true) + && compareDeep(medication, o.medication, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) + && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(occurence, o.occurence, true) + && compareDeep(recorded, o.recorded, true) && compareDeep(isSubPotent, o.isSubPotent, true) && compareDeep(subPotentReason, o.subPotentReason, true) + && compareDeep(performer, o.performer, true) && compareDeep(reason, o.reason, true) && compareDeep(request, o.request, true) + && compareDeep(device, o.device, true) && compareDeep(note, o.note, true) && compareDeep(dosage, o.dosage, true) + && compareDeep(eventHistory, o.eventHistory, true); + } + + @Override + public boolean equalsShallow(Base other_) { + if (!super.equalsShallow(other_)) + return false; + if (!(other_ instanceof MedicationAdministration)) + return false; + MedicationAdministration o = (MedicationAdministration) other_; + return compareValues(status, o.status, true) && compareValues(recorded, o.recorded, true) && compareValues(isSubPotent, o.isSubPotent, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf + , status, statusReason, category, medication, subject, encounter, supportingInformation + , occurence, recorded, isSubPotent, subPotentReason, performer, reason, request + , device, note, dosage, eventHistory); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MedicationAdministration; + } + + /** + * Search parameter: device + *

+ * Description: Return administrations with this administration device identity
+ * Type: reference
+ * Path: MedicationAdministration.device.reference
+ *

+ */ + @SearchParamDefinition(name="device", path="MedicationAdministration.device.reference", description="Return administrations with this administration device identity", type="reference", target={Device.class } ) + public static final String SP_DEVICE = "device"; + /** + * Fluent Client search parameter constant for device + *

+ * Description: Return administrations with this administration device identity
+ * Type: reference
+ * Path: MedicationAdministration.device.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MedicationAdministration:device". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("MedicationAdministration:device").toLocked(); + + /** + * Search parameter: performer-device-code + *

+ * Description: The identity of the individual who administered the medication
+ * Type: token
+ * Path: MedicationAdministration.performer.actor.concept
+ *

+ */ + @SearchParamDefinition(name="performer-device-code", path="MedicationAdministration.performer.actor.concept", description="The identity of the individual who administered the medication", type="token" ) + public static final String SP_PERFORMER_DEVICE_CODE = "performer-device-code"; + /** + * Fluent Client search parameter constant for performer-device-code + *

+ * Description: The identity of the individual who administered the medication
+ * Type: token
+ * Path: MedicationAdministration.performer.actor.concept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER_DEVICE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER_DEVICE_CODE); + + /** + * Search parameter: performer + *

+ * Description: The identity of the individual who administered the medication
+ * Type: reference
+ * Path: MedicationAdministration.performer.actor.reference
+ *

+ */ + @SearchParamDefinition(name="performer", path="MedicationAdministration.performer.actor.reference", description="The identity of the individual who administered the medication", type="reference", target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) + public static final String SP_PERFORMER = "performer"; + /** + * Fluent Client search parameter constant for performer + *

+ * Description: The identity of the individual who administered the medication
+ * Type: reference
+ * Path: MedicationAdministration.performer.actor.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MedicationAdministration:performer". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("MedicationAdministration:performer").toLocked(); + + /** + * Search parameter: reason-given-code + *

+ * Description: Reasons for administering the medication
+ * Type: token
+ * Path: MedicationAdministration.reason.concept
+ *

+ */ + @SearchParamDefinition(name="reason-given-code", path="MedicationAdministration.reason.concept", description="Reasons for administering the medication", type="token" ) + public static final String SP_REASON_GIVEN_CODE = "reason-given-code"; + /** + * Fluent Client search parameter constant for reason-given-code + *

+ * Description: Reasons for administering the medication
+ * Type: token
+ * Path: MedicationAdministration.reason.concept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_GIVEN_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_GIVEN_CODE); + + /** + * Search parameter: reason-given + *

+ * Description: Reference to a resource (by instance)
+ * Type: reference
+ * Path: MedicationAdministration.reason.reference
+ *

+ */ + @SearchParamDefinition(name="reason-given", path="MedicationAdministration.reason.reference", description="Reference to a resource (by instance)", type="reference", target={Condition.class, DiagnosticReport.class, Observation.class } ) + public static final String SP_REASON_GIVEN = "reason-given"; + /** + * Fluent Client search parameter constant for reason-given + *

+ * Description: Reference to a resource (by instance)
+ * Type: reference
+ * Path: MedicationAdministration.reason.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_GIVEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_GIVEN); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MedicationAdministration:reason-given". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_GIVEN = new ca.uhn.fhir.model.api.Include("MedicationAdministration:reason-given").toLocked(); + + /** + * Search parameter: reason-not-given + *

+ * Description: Reasons for not administering the medication
+ * Type: token
+ * Path: MedicationAdministration.statusReason
+ *

+ */ + @SearchParamDefinition(name="reason-not-given", path="MedicationAdministration.statusReason", description="Reasons for not administering the medication", type="token" ) + public static final String SP_REASON_NOT_GIVEN = "reason-not-given"; + /** + * Fluent Client search parameter constant for reason-not-given + *

+ * Description: Reasons for not administering the medication
+ * Type: token
+ * Path: MedicationAdministration.statusReason
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_NOT_GIVEN = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_NOT_GIVEN); + + /** + * Search parameter: request + *

+ * Description: The identity of a request to list administrations from
+ * Type: reference
+ * Path: MedicationAdministration.request
+ *

+ */ + @SearchParamDefinition(name="request", path="MedicationAdministration.request", description="The identity of a request to list administrations from", type="reference", target={MedicationRequest.class } ) + public static final String SP_REQUEST = "request"; + /** + * Fluent Client search parameter constant for request + *

+ * Description: The identity of a request to list administrations from
+ * Type: reference
+ * Path: MedicationAdministration.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 "MedicationAdministration:request". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("MedicationAdministration:request").toLocked(); + + /** + * Search parameter: subject + *

+ * Description: The identity of the individual or group to list administrations for
+ * Type: reference
+ * Path: MedicationAdministration.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="MedicationAdministration.subject", description="The identity of the individual or group to list administrations for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: The identity of the individual or group to list administrations for
+ * Type: reference
+ * Path: MedicationAdministration.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 "MedicationAdministration:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MedicationAdministration:subject").toLocked(); + + /** + * Search parameter: code + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted +* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance +* [AuditEvent](auditevent.html): More specific code for the event +* [Basic](basic.html): Kind of Resource +* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code +* [Condition](condition.html): Code for the condition +* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc. +* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered +* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result +* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code +* [ImagingSelection](imagingselection.html): The imaging selection status +* [List](list.html): What the purpose of this list is +* [Medication](medication.html): Returns medications for a specific code +* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code +* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code +* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code +* [MedicationStatement](medicationstatement.html): Return statements of this medication code +* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake +* [Observation](observation.html): The code of the observation type +* [Procedure](procedure.html): A code to identify a procedure +* [RequestOrchestration](requestorchestration.html): The code of the request orchestration +* [Task](task.html): Search by task code +
+ * Type: token
+ * Path: AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code
+ *

+ */ + @SearchParamDefinition(name="code", path="AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [AuditEvent](auditevent.html): More specific code for the event\r\n* [Basic](basic.html): Kind of Resource\r\n* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code\r\n* [Condition](condition.html): Code for the condition\r\n* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [ImagingSelection](imagingselection.html): The imaging selection status\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a procedure\r\n* [RequestOrchestration](requestorchestration.html): The code of the request orchestration\r\n* [Task](task.html): Search by task code\r\n", type="token" ) + public static final String SP_CODE = "code"; + /** + * Fluent Client search parameter constant for code + *

+ * Description: Multiple Resources: + +* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted +* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance +* [AuditEvent](auditevent.html): More specific code for the event +* [Basic](basic.html): Kind of Resource +* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code +* [Condition](condition.html): Code for the condition +* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc. +* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered +* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result +* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code +* [ImagingSelection](imagingselection.html): The imaging selection status +* [List](list.html): What the purpose of this list is +* [Medication](medication.html): Returns medications for a specific code +* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code +* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code +* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code +* [MedicationStatement](medicationstatement.html): Return statements of this medication code +* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake +* [Observation](observation.html): The code of the observation type +* [Procedure](procedure.html): A code to identify a procedure +* [RequestOrchestration](requestorchestration.html): The code of the request orchestration +* [Task](task.html): Search by task code +
+ * Type: token
+ * Path: AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Multiple Resources: + +* [Account](account.html): Account number +* [AdverseEvent](adverseevent.html): Business identifier for the event +* [AllergyIntolerance](allergyintolerance.html): External ids for this item +* [Appointment](appointment.html): An Identifier of the Appointment +* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response +* [Basic](basic.html): Business identifier +* [BodyStructure](bodystructure.html): Bodystructure identifier +* [CarePlan](careplan.html): External Ids for this plan +* [CareTeam](careteam.html): External Ids for this team +* [ChargeItem](chargeitem.html): Business Identifier for item +* [Claim](claim.html): The primary identifier of the financial resource +* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse +* [ClinicalImpression](clinicalimpression.html): Business identifier +* [Communication](communication.html): Unique identifier +* [CommunicationRequest](communicationrequest.html): Unique identifier +* [Composition](composition.html): Version-independent identifier for the Composition +* [Condition](condition.html): A unique identifier of the condition record +* [Consent](consent.html): Identifier for this record (external references) +* [Contract](contract.html): The identity of the contract +* [Coverage](coverage.html): The primary identifier of the insured and the coverage +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier +* [DetectedIssue](detectedissue.html): Unique id for the detected issue +* [DeviceRequest](devicerequest.html): Business identifier for request/order +* [DeviceUsage](deviceusage.html): Search by identifier +* [DiagnosticReport](diagnosticreport.html): An identifier for the report +* [DocumentReference](documentreference.html): Identifier of the attachment binary +* [Encounter](encounter.html): Identifier(s) by which this encounter is known +* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment +* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare +* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit +* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier +* [Flag](flag.html): Business identifier +* [Goal](goal.html): External Ids for this goal +* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response +* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection +* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID +* [Immunization](immunization.html): Business identifier +* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation +* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier +* [Invoice](invoice.html): Business Identifier for item +* [List](list.html): Business identifier +* [MeasureReport](measurereport.html): External identifier of the measure report to be returned +* [Medication](medication.html): Returns medications with this external identifier +* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier +* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier +* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier +* [MedicationStatement](medicationstatement.html): Return statements with this external identifier +* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence +* [NutritionIntake](nutritionintake.html): Return statements with this external identifier +* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier +* [Observation](observation.html): The unique id for a particular observation +* [Person](person.html): A person Identifier +* [Procedure](procedure.html): A unique identifier for a procedure +* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response +* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson +* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration +* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study +* [RiskAssessment](riskassessment.html): Unique identifier for the assessment +* [ServiceRequest](servicerequest.html): Identifiers assigned to this order +* [Specimen](specimen.html): The unique identifier associated with the specimen +* [SupplyDelivery](supplydelivery.html): External identifier +* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest +* [Task](task.html): Search for a task instance by its business identifier +* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier +
+ * Type: token
+ * Path: Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier
+ *

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

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Multiple Resources: + +* [Account](account.html): The entity that caused the expenses +* [AdverseEvent](adverseevent.html): Subject impacted by event +* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for +* [Appointment](appointment.html): One of the individuals of the appointment is this patient +* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient +* [AuditEvent](auditevent.html): Where the activity involved patient data +* [Basic](basic.html): Identifies the focus of this resource +* [BodyStructure](bodystructure.html): Who this is about +* [CarePlan](careplan.html): Who the care plan is for +* [CareTeam](careteam.html): Who care team is for +* [ChargeItem](chargeitem.html): Individual service was done for/to +* [Claim](claim.html): Patient receiving the products or services +* [ClaimResponse](claimresponse.html): The subject of care +* [ClinicalImpression](clinicalimpression.html): Patient assessed +* [Communication](communication.html): Focus of message +* [CommunicationRequest](communicationrequest.html): Focus of message +* [Composition](composition.html): Who and/or what the composition is about +* [Condition](condition.html): Who has the condition? +* [Consent](consent.html): Who the consent applies to +* [Contract](contract.html): The identity of the subject of the contract (if a patient) +* [Coverage](coverage.html): Retrieve coverages for a patient +* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient +* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient +* [DetectedIssue](detectedissue.html): Associated patient +* [DeviceRequest](devicerequest.html): Individual the service is ordered for +* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device +* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient +* [DocumentReference](documentreference.html): Who/what is the subject of the document +* [Encounter](encounter.html): The patient present at the encounter +* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled +* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care +* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient +* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for +* [Flag](flag.html): The identity of a subject to list flags for +* [Goal](goal.html): Who this goal is intended for +* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results +* [ImagingSelection](imagingselection.html): Who the study is about +* [ImagingStudy](imagingstudy.html): Who the study is about +* [Immunization](immunization.html): The patient for the vaccination record +* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated +* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for +* [Invoice](invoice.html): Recipient(s) of goods and services +* [List](list.html): If all resources have the same subject +* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for +* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for +* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for +* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient +* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. +* [MolecularSequence](molecularsequence.html): The subject that the sequence is about +* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. +* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement +* [Observation](observation.html): The subject that the observation is about (if patient) +* [Person](person.html): The Person links to this Patient +* [Procedure](procedure.html): Search by subject - a patient +* [Provenance](provenance.html): Where the activity involved patient data +* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response +* [RelatedPerson](relatedperson.html): The patient this related person is related to +* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations +* [ResearchSubject](researchsubject.html): Who or what is part of study +* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? +* [ServiceRequest](servicerequest.html): Search by subject - a patient +* [Specimen](specimen.html): The patient the specimen comes from +* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied +* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined +* [Task](task.html): Search by patient +* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for +
+ * Type: reference
+ * Path: Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.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 "MedicationAdministration:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MedicationAdministration:patient").toLocked(); + + /** + * Search parameter: date + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen) +
+ * Type: date
+ * Path: MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)
+ *

+ */ + @SearchParamDefinition(name="date", path="MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen)\r\n", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Date administration happened (or did not happen) +
+ * Type: date
+ * Path: MedicationAdministration.occurence.ofType(dateTime) | MedicationAdministration.occurence.ofType(Period)
+ *

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

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter +* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier +
+ * Type: reference
+ * Path: MedicationAdministration.encounter | MedicationRequest.encounter
+ *

+ */ + @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter | MedicationRequest.encounter", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } ) + public static final String SP_ENCOUNTER = "encounter"; + /** + * Fluent Client search parameter constant for encounter + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Return administrations that share this encounter +* [MedicationRequest](medicationrequest.html): Return prescriptions with this encounter identifier +
+ * Type: reference
+ * Path: MedicationAdministration.encounter | MedicationRequest.encounter
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MedicationAdministration:encounter". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("MedicationAdministration:encounter").toLocked(); + + /** + * Search parameter: medication + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference +* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource +* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference +* [MedicationStatement](medicationstatement.html): Return statements of this medication reference +
+ * Type: reference
+ * Path: MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference
+ *

+ */ + @SearchParamDefinition(name="medication", path="MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication reference\r\n", type="reference", target={Medication.class } ) + public static final String SP_MEDICATION = "medication"; + /** + * Fluent Client search parameter constant for medication + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): Return administrations of this medication reference +* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine resource +* [MedicationRequest](medicationrequest.html): Return prescriptions for this medication reference +* [MedicationStatement](medicationstatement.html): Return statements of this medication reference +
+ * Type: reference
+ * Path: MedicationAdministration.medication.reference | MedicationDispense.medication.reference | MedicationRequest.medication.reference | MedicationStatement.medication.reference
+ *

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

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) +* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status +* [MedicationRequest](medicationrequest.html): Status of the prescription +* [MedicationStatement](medicationstatement.html): Return statements that match the given status +
+ * Type: token
+ * Path: MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status
+ *

+ */ + @SearchParamDefinition(name="status", path="MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status", description="Multiple Resources: \r\n\r\n* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified)\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status\r\n* [MedicationRequest](medicationrequest.html): Status of the prescription\r\n* [MedicationStatement](medicationstatement.html): Return statements that match the given status\r\n", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Multiple Resources: + +* [MedicationAdministration](medicationadministration.html): MedicationAdministration event status (for example one of active/paused/completed/nullified) +* [MedicationDispense](medicationdispense.html): Returns dispenses with a specified dispense status +* [MedicationRequest](medicationrequest.html): Status of the prescription +* [MedicationStatement](medicationstatement.html): Return statements that match the given status +
+ * Type: token
+ * Path: MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationDispense.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationDispense.java index 8a4b55ec1..3be9dcd76 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationDispense.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationDispense.java @@ -236,7 +236,9 @@ public class MedicationDispense extends DomainResource { throw new FHIRException("Unknown MedicationDispenseStatusCodes code '"+codeString+"'"); } public String toCode(MedicationDispenseStatusCodes code) { - if (code == MedicationDispenseStatusCodes.PREPARATION) + if (code == MedicationDispenseStatusCodes.NULL) + return null; + if (code == MedicationDispenseStatusCodes.PREPARATION) return "preparation"; if (code == MedicationDispenseStatusCodes.INPROGRESS) return "in-progress"; @@ -255,7 +257,7 @@ public class MedicationDispense extends DomainResource { if (code == MedicationDispenseStatusCodes.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(MedicationDispenseStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationKnowledge.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationKnowledge.java index 86a461867..977edf8b7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationKnowledge.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationKnowledge.java @@ -152,14 +152,16 @@ public class MedicationKnowledge extends DomainResource { throw new FHIRException("Unknown MedicationKnowledgeStatusCodes code '"+codeString+"'"); } public String toCode(MedicationKnowledgeStatusCodes code) { - if (code == MedicationKnowledgeStatusCodes.ACTIVE) + if (code == MedicationKnowledgeStatusCodes.NULL) + return null; + if (code == MedicationKnowledgeStatusCodes.ACTIVE) return "active"; if (code == MedicationKnowledgeStatusCodes.ENTEREDINERROR) return "entered-in-error"; if (code == MedicationKnowledgeStatusCodes.INACTIVE) return "inactive"; return "?"; - } + } public String toSystem(MedicationKnowledgeStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationRequest.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationRequest.java index b1f1daa11..a38dcc148 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationRequest.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationRequest.java @@ -222,7 +222,9 @@ public class MedicationRequest extends DomainResource { throw new FHIRException("Unknown MedicationRequestIntent code '"+codeString+"'"); } public String toCode(MedicationRequestIntent code) { - if (code == MedicationRequestIntent.PROPOSAL) + if (code == MedicationRequestIntent.NULL) + return null; + if (code == MedicationRequestIntent.PROPOSAL) return "proposal"; if (code == MedicationRequestIntent.PLAN) return "plan"; @@ -239,7 +241,7 @@ public class MedicationRequest extends DomainResource { if (code == MedicationRequestIntent.OPTION) return "option"; return "?"; - } + } public String toSystem(MedicationRequestIntent code) { return code.getSystem(); } @@ -428,7 +430,9 @@ public class MedicationRequest extends DomainResource { throw new FHIRException("Unknown MedicationrequestStatus code '"+codeString+"'"); } public String toCode(MedicationrequestStatus code) { - if (code == MedicationrequestStatus.ACTIVE) + if (code == MedicationrequestStatus.NULL) + return null; + if (code == MedicationrequestStatus.ACTIVE) return "active"; if (code == MedicationrequestStatus.ONHOLD) return "on-hold"; @@ -447,7 +451,7 @@ public class MedicationRequest extends DomainResource { if (code == MedicationrequestStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(MedicationrequestStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationStatement.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationStatement.java index 8a00c06ae..debf40199 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationStatement.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MedicationStatement.java @@ -154,14 +154,16 @@ public class MedicationStatement extends DomainResource { throw new FHIRException("Unknown MedicationStatementStatusCodes code '"+codeString+"'"); } public String toCode(MedicationStatementStatusCodes code) { - if (code == MedicationStatementStatusCodes.RECORDED) + if (code == MedicationStatementStatusCodes.NULL) + return null; + if (code == MedicationStatementStatusCodes.RECORDED) return "recorded"; if (code == MedicationStatementStatusCodes.ENTEREDINERROR) return "entered-in-error"; if (code == MedicationStatementStatusCodes.DRAFT) return "draft"; return "?"; - } + } public String toSystem(MedicationStatementStatusCodes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageDefinition.java index 0981edfe0..6591b77e9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageDefinition.java @@ -152,14 +152,16 @@ public class MessageDefinition extends CanonicalResource { throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); } public String toCode(MessageSignificanceCategory code) { - if (code == MessageSignificanceCategory.CONSEQUENCE) + if (code == MessageSignificanceCategory.NULL) + return null; + if (code == MessageSignificanceCategory.CONSEQUENCE) return "consequence"; if (code == MessageSignificanceCategory.CURRENCY) return "currency"; if (code == MessageSignificanceCategory.NOTIFICATION) return "notification"; return "?"; - } + } public String toSystem(MessageSignificanceCategory code) { return code.getSystem(); } @@ -278,7 +280,9 @@ public class MessageDefinition extends CanonicalResource { throw new FHIRException("Unknown MessageheaderResponseRequest code '"+codeString+"'"); } public String toCode(MessageheaderResponseRequest code) { - if (code == MessageheaderResponseRequest.ALWAYS) + if (code == MessageheaderResponseRequest.NULL) + return null; + if (code == MessageheaderResponseRequest.ALWAYS) return "always"; if (code == MessageheaderResponseRequest.ONERROR) return "on-error"; @@ -287,7 +291,7 @@ public class MessageDefinition extends CanonicalResource { if (code == MessageheaderResponseRequest.ONSUCCESS) return "on-success"; return "?"; - } + } public String toSystem(MessageheaderResponseRequest code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageHeader.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageHeader.java index d119f4304..a0d759150 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageHeader.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MessageHeader.java @@ -152,14 +152,16 @@ public class MessageHeader extends DomainResource { throw new FHIRException("Unknown ResponseType code '"+codeString+"'"); } public String toCode(ResponseType code) { - if (code == ResponseType.OK) + if (code == ResponseType.NULL) + return null; + if (code == ResponseType.OK) return "ok"; if (code == ResponseType.TRANSIENTERROR) return "transient-error"; if (code == ResponseType.FATALERROR) return "fatal-error"; return "?"; - } + } public String toSystem(ResponseType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MolecularSequence.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MolecularSequence.java index 7d8a47b66..862b265e6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MolecularSequence.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MolecularSequence.java @@ -138,12 +138,14 @@ public class MolecularSequence extends DomainResource { throw new FHIRException("Unknown OrientationType code '"+codeString+"'"); } public String toCode(OrientationType code) { - if (code == OrientationType.SENSE) + if (code == OrientationType.NULL) + return null; + if (code == OrientationType.SENSE) return "sense"; if (code == OrientationType.ANTISENSE) return "antisense"; return "?"; - } + } public String toSystem(OrientationType code) { return code.getSystem(); } @@ -248,14 +250,16 @@ public class MolecularSequence extends DomainResource { throw new FHIRException("Unknown SequenceType code '"+codeString+"'"); } public String toCode(SequenceType code) { - if (code == SequenceType.AA) + if (code == SequenceType.NULL) + return null; + if (code == SequenceType.AA) return "aa"; if (code == SequenceType.DNA) return "dna"; if (code == SequenceType.RNA) return "rna"; return "?"; - } + } public String toSystem(SequenceType code) { return code.getSystem(); } @@ -346,12 +350,14 @@ public class MolecularSequence extends DomainResource { throw new FHIRException("Unknown StrandType code '"+codeString+"'"); } public String toCode(StrandType code) { - if (code == StrandType.WATSON) + if (code == StrandType.NULL) + return null; + if (code == StrandType.WATSON) return "watson"; if (code == StrandType.CRICK) return "crick"; return "?"; - } + } public String toSystem(StrandType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MonetaryComponent.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MonetaryComponent.java index f99697165..7bf4a45cb 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MonetaryComponent.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/MonetaryComponent.java @@ -193,7 +193,9 @@ public class MonetaryComponent extends DataType implements ICompositeType { throw new FHIRException("Unknown PriceComponentType code '"+codeString+"'"); } public String toCode(PriceComponentType code) { - if (code == PriceComponentType.BASE) + if (code == PriceComponentType.NULL) + return null; + if (code == PriceComponentType.BASE) return "base"; if (code == PriceComponentType.SURCHARGE) return "surcharge"; @@ -206,7 +208,7 @@ public class MonetaryComponent extends DataType implements ICompositeType { if (code == PriceComponentType.INFORMATIONAL) return "informational"; return "?"; - } + } public String toSystem(PriceComponentType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NamingSystem.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NamingSystem.java index 80aec8825..def10703a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NamingSystem.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NamingSystem.java @@ -194,7 +194,9 @@ public class NamingSystem extends MetadataResource { throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'"); } public String toCode(NamingSystemIdentifierType code) { - if (code == NamingSystemIdentifierType.OID) + if (code == NamingSystemIdentifierType.NULL) + return null; + if (code == NamingSystemIdentifierType.OID) return "oid"; if (code == NamingSystemIdentifierType.UUID) return "uuid"; @@ -207,7 +209,7 @@ public class NamingSystem extends MetadataResource { if (code == NamingSystemIdentifierType.OTHER) return "other"; return "?"; - } + } public String toSystem(NamingSystemIdentifierType code) { return code.getSystem(); } @@ -312,7 +314,9 @@ public class NamingSystem extends MetadataResource { throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'"); } public String toCode(NamingSystemType code) { - if (code == NamingSystemType.NULL) + if (code == NamingSystemType.NULL) + return null; + if (code == NamingSystemType.NULL) return null; if (code == NamingSystemType.CODESYSTEM) return "codesystem"; @@ -321,7 +325,7 @@ public class NamingSystem extends MetadataResource { if (code == NamingSystemType.ROOT) return "root"; return "?"; - } + } public String toSystem(NamingSystemType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Narrative.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Narrative.java index 22de67518..7377ff067 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Narrative.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Narrative.java @@ -167,7 +167,9 @@ public class Narrative extends BaseNarrative implements INarrative { throw new FHIRException("Unknown NarrativeStatus code '"+codeString+"'"); } public String toCode(NarrativeStatus code) { - if (code == NarrativeStatus.GENERATED) + if (code == NarrativeStatus.NULL) + return null; + if (code == NarrativeStatus.GENERATED) return "generated"; if (code == NarrativeStatus.EXTENSIONS) return "extensions"; @@ -176,7 +178,7 @@ public class Narrative extends BaseNarrative implements INarrative { if (code == NarrativeStatus.EMPTY) return "empty"; return "?"; - } + } public String toSystem(NarrativeStatus code) { return code.getSystem(); } @@ -287,7 +289,7 @@ public class Narrative extends BaseNarrative implements INarrative { protected void listChildren(List children) { super.listChildren(children); children.add(new Property("status", "code", "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.", 0, 1, status)); - children.add(new Property("div", "xhtml", "he actual narrative content, a stripped down version of XHTML", 0, 1, new XhtmlType(this))); + children.add(new Property("div", "xhtml", "he actual narrative content, a stripped down version of XHTML", 0, 1, new XhtmlType(this))); } @Override diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NutritionProduct.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NutritionProduct.java index 3349d657b..8a5c1205d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NutritionProduct.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/NutritionProduct.java @@ -152,14 +152,16 @@ public class NutritionProduct extends DomainResource { throw new FHIRException("Unknown NutritionProductStatus code '"+codeString+"'"); } public String toCode(NutritionProductStatus code) { - if (code == NutritionProductStatus.ACTIVE) + if (code == NutritionProductStatus.NULL) + return null; + if (code == NutritionProductStatus.ACTIVE) return "active"; if (code == NutritionProductStatus.INACTIVE) return "inactive"; if (code == NutritionProductStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(NutritionProductStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java index 752583c26..e57675b23 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Observation.java @@ -152,14 +152,16 @@ public class Observation extends DomainResource { throw new FHIRException("Unknown TriggeredBytype code '"+codeString+"'"); } public String toCode(TriggeredBytype code) { - if (code == TriggeredBytype.REFLEX) + if (code == TriggeredBytype.NULL) + return null; + if (code == TriggeredBytype.REFLEX) return "reflex"; if (code == TriggeredBytype.REPEAT) return "repeat"; if (code == TriggeredBytype.RERUN) return "re-run"; return "?"; - } + } public String toSystem(TriggeredBytype code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ObservationDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ObservationDefinition.java index 644f1c504..f165e73be 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ObservationDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ObservationDefinition.java @@ -264,7 +264,9 @@ public class ObservationDefinition extends DomainResource { throw new FHIRException("Unknown ObservationDataType code '"+codeString+"'"); } public String toCode(ObservationDataType code) { - if (code == ObservationDataType.QUANTITY) + if (code == ObservationDataType.NULL) + return null; + if (code == ObservationDataType.QUANTITY) return "Quantity"; if (code == ObservationDataType.CODEABLECONCEPT) return "CodeableConcept"; @@ -287,7 +289,7 @@ public class ObservationDefinition extends DomainResource { if (code == ObservationDataType.PERIOD) return "Period"; return "?"; - } + } public String toSystem(ObservationDataType code) { return code.getSystem(); } @@ -392,14 +394,16 @@ public class ObservationDefinition extends DomainResource { throw new FHIRException("Unknown ObservationRangeCategory code '"+codeString+"'"); } public String toCode(ObservationRangeCategory code) { - if (code == ObservationRangeCategory.REFERENCE) + if (code == ObservationRangeCategory.NULL) + return null; + if (code == ObservationRangeCategory.REFERENCE) return "reference"; if (code == ObservationRangeCategory.CRITICAL) return "critical"; if (code == ObservationRangeCategory.ABSOLUTE) return "absolute"; return "?"; - } + } public String toSystem(ObservationRangeCategory code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationDefinition.java index 03e1e33a5..3600e5825 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationDefinition.java @@ -138,12 +138,14 @@ public class OperationDefinition extends CanonicalResource { throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); } public String toCode(OperationKind code) { - if (code == OperationKind.OPERATION) + if (code == OperationKind.NULL) + return null; + if (code == OperationKind.OPERATION) return "operation"; if (code == OperationKind.QUERY) return "query"; return "?"; - } + } public String toSystem(OperationKind code) { return code.getSystem(); } @@ -248,14 +250,16 @@ public class OperationDefinition extends CanonicalResource { throw new FHIRException("Unknown OperationParameterScope code '"+codeString+"'"); } public String toCode(OperationParameterScope code) { - if (code == OperationParameterScope.INSTANCE) + if (code == OperationParameterScope.NULL) + return null; + if (code == OperationParameterScope.INSTANCE) return "instance"; if (code == OperationParameterScope.TYPE) return "type"; if (code == OperationParameterScope.SYSTEM) return "system"; return "?"; - } + } public String toSystem(OperationParameterScope code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationOutcome.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationOutcome.java index 83f9b9f4b..e3d0c2b1f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationOutcome.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/OperationOutcome.java @@ -185,7 +185,9 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu throw new FHIRException("Unknown IssueSeverity code '"+codeString+"'"); } public String toCode(IssueSeverity code) { - if (code == IssueSeverity.FATAL) + if (code == IssueSeverity.NULL) + return null; + if (code == IssueSeverity.FATAL) return "fatal"; if (code == IssueSeverity.ERROR) return "error"; @@ -196,7 +198,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu if (code == IssueSeverity.SUCCESS) return "success"; return "?"; - } + } public String toSystem(IssueSeverity code) { return code.getSystem(); } @@ -721,7 +723,9 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu throw new FHIRException("Unknown IssueType code '"+codeString+"'"); } public String toCode(IssueType code) { - if (code == IssueType.INVALID) + if (code == IssueType.NULL) + return null; + if (code == IssueType.INVALID) return "invalid"; if (code == IssueType.STRUCTURE) return "structure"; @@ -788,7 +792,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu if (code == IssueType.SUCCESS) return "success"; return "?"; - } + } public String toSystem(IssueType code) { return code.getSystem(); } @@ -828,8 +832,8 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu protected StringType diagnostics; /** - * This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. - + * This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. + For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name. */ @Child(name = "location", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @@ -1025,8 +1029,8 @@ For resource issues, this will be a simple XPath limited to element names, repet } /** - * @return {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. - + * @return {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. + For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.) */ public List getLocation() { @@ -1053,8 +1057,8 @@ For resource issues, this will be a simple XPath limited to element names, repet } /** - * @return {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. - + * @return {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. + For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.) */ public StringType addLocationElement() {//2 @@ -1066,8 +1070,8 @@ For resource issues, this will be a simple XPath limited to element names, repet } /** - * @param value {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. - + * @param value {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. + For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.) */ public OperationOutcomeIssueComponent addLocation(String value) { //1 @@ -1080,8 +1084,8 @@ For resource issues, this will be a simple XPath limited to element names, repet } /** - * @param value {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. - + * @param value {@link #location} (This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. + For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised. For HTTP errors, will be "http." + the parameter name.) */ public boolean hasLocation(String value) { @@ -1373,14 +1377,14 @@ For resource issues, this will be a simple XPath limited to element names, repet } // added from java-adornments.txt: - @Override + @Override public String toString() { - String srvr = hasExtension(ToolingExtensions.EXT_ISSUE_SERVER) ? " (from "+getExtensionString(ToolingExtensions.EXT_ISSUE_SERVER)+")" : ""; - if (getExpression().size() == 1) { - return getExpression().get(0)+" "+getDiagnostics()+" "+getSeverity().toCode()+"/"+getCode().toCode()+": "+getDetails().getText()+srvr; - } else { - return getExpression()+" "+getDiagnostics()+" "+getSeverity().toCode()+"/"+getCode().toCode()+": "+getDetails().getText()+srvr; - } + String srvr = hasExtension(ToolingExtensions.EXT_ISSUE_SERVER) ? " (from "+getExtensionString(ToolingExtensions.EXT_ISSUE_SERVER)+")" : ""; + if (getExpression().size() == 1) { + return getExpression().get(0)+" "+getDiagnostics()+" "+getSeverity().toCode()+"/"+getCode().toCode()+": "+getDetails().getText()+srvr; + } else { + return getExpression()+" "+getDiagnostics()+" "+getSeverity().toCode()+"/"+getCode().toCode()+": "+getDetails().getText()+srvr; + } } public boolean isWarningOrMore() { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Patient.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Patient.java index c47818673..00e87c517 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Patient.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Patient.java @@ -166,7 +166,9 @@ public class Patient extends DomainResource { throw new FHIRException("Unknown LinkType code '"+codeString+"'"); } public String toCode(LinkType code) { - if (code == LinkType.REPLACEDBY) + if (code == LinkType.NULL) + return null; + if (code == LinkType.REPLACEDBY) return "replaced-by"; if (code == LinkType.REPLACES) return "replaces"; @@ -175,7 +177,7 @@ public class Patient extends DomainResource { if (code == LinkType.SEEALSO) return "seealso"; return "?"; - } + } public String toSystem(LinkType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PaymentReconciliation.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PaymentReconciliation.java index 235a6ceb4..1a1c767ac 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PaymentReconciliation.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/PaymentReconciliation.java @@ -152,14 +152,16 @@ public class PaymentReconciliation extends DomainResource { throw new FHIRException("Unknown NoteType code '"+codeString+"'"); } public String toCode(NoteType code) { - if (code == NoteType.DISPLAY) + if (code == NoteType.NULL) + return null; + if (code == NoteType.DISPLAY) return "display"; if (code == NoteType.PRINT) return "print"; if (code == NoteType.PRINTOPER) return "printoper"; return "?"; - } + } public String toSystem(NoteType code) { return code.getSystem(); } @@ -278,7 +280,9 @@ public class PaymentReconciliation extends DomainResource { throw new FHIRException("Unknown PaymentOutcome code '"+codeString+"'"); } public String toCode(PaymentOutcome code) { - if (code == PaymentOutcome.QUEUED) + if (code == PaymentOutcome.NULL) + return null; + if (code == PaymentOutcome.QUEUED) return "queued"; if (code == PaymentOutcome.COMPLETE) return "complete"; @@ -287,7 +291,7 @@ public class PaymentReconciliation extends DomainResource { if (code == PaymentOutcome.PARTIAL) return "partial"; return "?"; - } + } public String toSystem(PaymentOutcome code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Permission.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Permission.java index 28bbeb6d3..441a734cb 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Permission.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Permission.java @@ -194,7 +194,9 @@ public class Permission extends DomainResource { throw new FHIRException("Unknown PermissionRuleCombining code '"+codeString+"'"); } public String toCode(PermissionRuleCombining code) { - if (code == PermissionRuleCombining.DENYOVERRIDES) + if (code == PermissionRuleCombining.NULL) + return null; + if (code == PermissionRuleCombining.DENYOVERRIDES) return "deny-overrides"; if (code == PermissionRuleCombining.PERMITOVERRIDES) return "permit-overrides"; @@ -207,7 +209,7 @@ public class Permission extends DomainResource { if (code == PermissionRuleCombining.PERMITUNLESSDENY) return "permit-unless-deny"; return "?"; - } + } public String toSystem(PermissionRuleCombining code) { return code.getSystem(); } @@ -326,7 +328,9 @@ public class Permission extends DomainResource { throw new FHIRException("Unknown PermissionStatus code '"+codeString+"'"); } public String toCode(PermissionStatus code) { - if (code == PermissionStatus.ACTIVE) + if (code == PermissionStatus.NULL) + return null; + if (code == PermissionStatus.ACTIVE) return "active"; if (code == PermissionStatus.ENTEREDINERROR) return "entered-in-error"; @@ -335,7 +339,7 @@ public class Permission extends DomainResource { if (code == PermissionStatus.REJECTED) return "rejected"; return "?"; - } + } public String toSystem(PermissionStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Person.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Person.java index 2744ca3a0..f509d4c71 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Person.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Person.java @@ -166,7 +166,9 @@ public class Person extends DomainResource { throw new FHIRException("Unknown IdentityAssuranceLevel code '"+codeString+"'"); } public String toCode(IdentityAssuranceLevel code) { - if (code == IdentityAssuranceLevel.LEVEL1) + if (code == IdentityAssuranceLevel.NULL) + return null; + if (code == IdentityAssuranceLevel.LEVEL1) return "level1"; if (code == IdentityAssuranceLevel.LEVEL2) return "level2"; @@ -175,7 +177,7 @@ public class Person extends DomainResource { if (code == IdentityAssuranceLevel.LEVEL4) return "level4"; return "?"; - } + } public String toSystem(IdentityAssuranceLevel code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Provenance.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Provenance.java index 5764ec6d9..cea2278a9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Provenance.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Provenance.java @@ -180,7 +180,9 @@ public class Provenance extends DomainResource { throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); } public String toCode(ProvenanceEntityRole code) { - if (code == ProvenanceEntityRole.REVISION) + if (code == ProvenanceEntityRole.NULL) + return null; + if (code == ProvenanceEntityRole.REVISION) return "revision"; if (code == ProvenanceEntityRole.QUOTATION) return "quotation"; @@ -191,7 +193,7 @@ public class Provenance extends DomainResource { if (code == ProvenanceEntityRole.REMOVAL) return "removal"; return "?"; - } + } public String toSystem(ProvenanceEntityRole code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Questionnaire.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Questionnaire.java index a49ec3e17..7f48a36b8 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Questionnaire.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Questionnaire.java @@ -138,12 +138,14 @@ public class Questionnaire extends MetadataResource { throw new FHIRException("Unknown EnableWhenBehavior code '"+codeString+"'"); } public String toCode(EnableWhenBehavior code) { - if (code == EnableWhenBehavior.ALL) + if (code == EnableWhenBehavior.NULL) + return null; + if (code == EnableWhenBehavior.ALL) return "all"; if (code == EnableWhenBehavior.ANY) return "any"; return "?"; - } + } public String toSystem(EnableWhenBehavior code) { return code.getSystem(); } @@ -248,14 +250,16 @@ public class Questionnaire extends MetadataResource { throw new FHIRException("Unknown QuestionnaireAnswerConstraint code '"+codeString+"'"); } public String toCode(QuestionnaireAnswerConstraint code) { - if (code == QuestionnaireAnswerConstraint.OPTIONSONLY) + if (code == QuestionnaireAnswerConstraint.NULL) + return null; + if (code == QuestionnaireAnswerConstraint.OPTIONSONLY) return "optionsOnly"; if (code == QuestionnaireAnswerConstraint.OPTIONSORTYPE) return "optionsOrType"; if (code == QuestionnaireAnswerConstraint.OPTIONSORSTRING) return "optionsOrString"; return "?"; - } + } public String toSystem(QuestionnaireAnswerConstraint code) { return code.getSystem(); } @@ -346,12 +350,14 @@ public class Questionnaire extends MetadataResource { throw new FHIRException("Unknown QuestionnaireItemDisabledDisplay code '"+codeString+"'"); } public String toCode(QuestionnaireItemDisabledDisplay code) { - if (code == QuestionnaireItemDisabledDisplay.HIDDEN) + if (code == QuestionnaireItemDisabledDisplay.NULL) + return null; + if (code == QuestionnaireItemDisabledDisplay.HIDDEN) return "hidden"; if (code == QuestionnaireItemDisabledDisplay.PROTECTED) return "protected"; return "?"; - } + } public String toSystem(QuestionnaireItemDisabledDisplay code) { return code.getSystem(); } @@ -512,7 +518,9 @@ public class Questionnaire extends MetadataResource { throw new FHIRException("Unknown QuestionnaireItemOperator code '"+codeString+"'"); } public String toCode(QuestionnaireItemOperator code) { - if (code == QuestionnaireItemOperator.EXISTS) + if (code == QuestionnaireItemOperator.NULL) + return null; + if (code == QuestionnaireItemOperator.EXISTS) return "exists"; if (code == QuestionnaireItemOperator.EQUAL) return "="; @@ -527,7 +535,7 @@ public class Questionnaire extends MetadataResource { if (code == QuestionnaireItemOperator.LESS_OR_EQUAL) return "<="; return "?"; - } + } public String toSystem(QuestionnaireItemOperator code) { return code.getSystem(); } @@ -814,7 +822,9 @@ public class Questionnaire extends MetadataResource { throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); } public String toCode(QuestionnaireItemType code) { - if (code == QuestionnaireItemType.GROUP) + if (code == QuestionnaireItemType.NULL) + return null; + if (code == QuestionnaireItemType.GROUP) return "group"; if (code == QuestionnaireItemType.DISPLAY) return "display"; @@ -847,7 +857,7 @@ public class Questionnaire extends MetadataResource { if (code == QuestionnaireItemType.QUANTITY) return "quantity"; return "?"; - } + } public String toSystem(QuestionnaireItemType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/QuestionnaireResponse.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/QuestionnaireResponse.java index 8d07848b8..544e869b2 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/QuestionnaireResponse.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/QuestionnaireResponse.java @@ -180,7 +180,9 @@ public class QuestionnaireResponse extends DomainResource { throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); } public String toCode(QuestionnaireResponseStatus code) { - if (code == QuestionnaireResponseStatus.INPROGRESS) + if (code == QuestionnaireResponseStatus.NULL) + return null; + if (code == QuestionnaireResponseStatus.INPROGRESS) return "in-progress"; if (code == QuestionnaireResponseStatus.COMPLETED) return "completed"; @@ -191,7 +193,7 @@ public class QuestionnaireResponse extends DomainResource { if (code == QuestionnaireResponseStatus.STOPPED) return "stopped"; return "?"; - } + } public String toSystem(QuestionnaireResponseStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/RelatedArtifact.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/RelatedArtifact.java index e7448b978..203effc83 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/RelatedArtifact.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/RelatedArtifact.java @@ -612,7 +612,9 @@ public class RelatedArtifact extends DataType implements ICompositeType { throw new FHIRException("Unknown RelatedArtifactType code '"+codeString+"'"); } public String toCode(RelatedArtifactType code) { - if (code == RelatedArtifactType.DOCUMENTATION) + if (code == RelatedArtifactType.NULL) + return null; + if (code == RelatedArtifactType.DOCUMENTATION) return "documentation"; if (code == RelatedArtifactType.JUSTIFICATION) return "justification"; @@ -685,7 +687,7 @@ public class RelatedArtifact extends DataType implements ICompositeType { if (code == RelatedArtifactType.CITEAS) return "cite-as"; return "?"; - } + } public String toSystem(RelatedArtifactType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Requirements.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Requirements.java index d1fc5b760..45fcc9922 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Requirements.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Requirements.java @@ -166,7 +166,9 @@ public class Requirements extends CanonicalResource { throw new FHIRException("Unknown ConformanceExpectation code '"+codeString+"'"); } public String toCode(ConformanceExpectation code) { - if (code == ConformanceExpectation.SHALL) + if (code == ConformanceExpectation.NULL) + return null; + if (code == ConformanceExpectation.SHALL) return "SHALL"; if (code == ConformanceExpectation.SHOULD) return "SHOULD"; @@ -175,7 +177,7 @@ public class Requirements extends CanonicalResource { if (code == ConformanceExpectation.SHOULDNOT) return "SHOULD-NOT"; return "?"; - } + } public String toSystem(ConformanceExpectation code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SearchParameter.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SearchParameter.java index 576516bbe..e7b17f2e5 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SearchParameter.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SearchParameter.java @@ -152,14 +152,16 @@ public class SearchParameter extends CanonicalResource { throw new FHIRException("Unknown SearchProcessingModeType code '"+codeString+"'"); } public String toCode(SearchProcessingModeType code) { - if (code == SearchProcessingModeType.NORMAL) + if (code == SearchProcessingModeType.NULL) + return null; + if (code == SearchProcessingModeType.NORMAL) return "normal"; if (code == SearchProcessingModeType.PHONETIC) return "phonetic"; if (code == SearchProcessingModeType.OTHER) return "other"; return "?"; - } + } public String toSystem(SearchProcessingModeType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Slot.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Slot.java index 9580e813c..6be03425f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Slot.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Slot.java @@ -180,7 +180,9 @@ public class Slot extends DomainResource { throw new FHIRException("Unknown SlotStatus code '"+codeString+"'"); } public String toCode(SlotStatus code) { - if (code == SlotStatus.BUSY) + if (code == SlotStatus.NULL) + return null; + if (code == SlotStatus.BUSY) return "busy"; if (code == SlotStatus.FREE) return "free"; @@ -191,7 +193,7 @@ public class Slot extends DomainResource { if (code == SlotStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(SlotStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Specimen.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Specimen.java index 887f2c489..c1ac48821 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Specimen.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Specimen.java @@ -138,12 +138,14 @@ public class Specimen extends DomainResource { throw new FHIRException("Unknown SpecimenCombined code '"+codeString+"'"); } public String toCode(SpecimenCombined code) { - if (code == SpecimenCombined.GROUPED) + if (code == SpecimenCombined.NULL) + return null; + if (code == SpecimenCombined.GROUPED) return "grouped"; if (code == SpecimenCombined.POOLED) return "pooled"; return "?"; - } + } public String toSystem(SpecimenCombined code) { return code.getSystem(); } @@ -262,7 +264,9 @@ public class Specimen extends DomainResource { throw new FHIRException("Unknown SpecimenStatus code '"+codeString+"'"); } public String toCode(SpecimenStatus code) { - if (code == SpecimenStatus.AVAILABLE) + if (code == SpecimenStatus.NULL) + return null; + if (code == SpecimenStatus.AVAILABLE) return "available"; if (code == SpecimenStatus.UNAVAILABLE) return "unavailable"; @@ -271,7 +275,7 @@ public class Specimen extends DomainResource { if (code == SpecimenStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(SpecimenStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SpecimenDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SpecimenDefinition.java index b201ba323..ebf0ba60b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SpecimenDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SpecimenDefinition.java @@ -138,12 +138,14 @@ public class SpecimenDefinition extends DomainResource { throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'"); } public String toCode(SpecimenContainedPreference code) { - if (code == SpecimenContainedPreference.PREFERRED) + if (code == SpecimenContainedPreference.NULL) + return null; + if (code == SpecimenContainedPreference.PREFERRED) return "preferred"; if (code == SpecimenContainedPreference.ALTERNATE) return "alternate"; return "?"; - } + } public String toSystem(SpecimenContainedPreference code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java index 7f659bc4d..7b5589721 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java @@ -152,14 +152,16 @@ public class StructureDefinition extends CanonicalResource { throw new FHIRException("Unknown ExtensionContextType code '"+codeString+"'"); } public String toCode(ExtensionContextType code) { - if (code == ExtensionContextType.FHIRPATH) + if (code == ExtensionContextType.NULL) + return null; + if (code == ExtensionContextType.FHIRPATH) return "fhirpath"; if (code == ExtensionContextType.ELEMENT) return "element"; if (code == ExtensionContextType.EXTENSION) return "extension"; return "?"; - } + } public String toSystem(ExtensionContextType code) { return code.getSystem(); } @@ -278,7 +280,9 @@ public class StructureDefinition extends CanonicalResource { throw new FHIRException("Unknown StructureDefinitionKind code '"+codeString+"'"); } public String toCode(StructureDefinitionKind code) { - if (code == StructureDefinitionKind.PRIMITIVETYPE) + if (code == StructureDefinitionKind.NULL) + return null; + if (code == StructureDefinitionKind.PRIMITIVETYPE) return "primitive-type"; if (code == StructureDefinitionKind.COMPLEXTYPE) return "complex-type"; @@ -287,7 +291,7 @@ public class StructureDefinition extends CanonicalResource { if (code == StructureDefinitionKind.LOGICAL) return "logical"; return "?"; - } + } public String toSystem(StructureDefinitionKind code) { return code.getSystem(); } @@ -378,12 +382,14 @@ public class StructureDefinition extends CanonicalResource { throw new FHIRException("Unknown TypeDerivationRule code '"+codeString+"'"); } public String toCode(TypeDerivationRule code) { - if (code == TypeDerivationRule.SPECIALIZATION) + if (code == TypeDerivationRule.NULL) + return null; + if (code == TypeDerivationRule.SPECIALIZATION) return "specialization"; if (code == TypeDerivationRule.CONSTRAINT) return "constraint"; return "?"; - } + } public String toSystem(TypeDerivationRule code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureMap.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureMap.java index 717fdc14b..329c7b525 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureMap.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureMap.java @@ -139,12 +139,14 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapGroupTypeMode code '"+codeString+"'"); } public String toCode(StructureMapGroupTypeMode code) { - if (code == StructureMapGroupTypeMode.TYPES) + if (code == StructureMapGroupTypeMode.NULL) + return null; + if (code == StructureMapGroupTypeMode.TYPES) return "types"; if (code == StructureMapGroupTypeMode.TYPEANDTYPES) return "type-and-types"; return "?"; - } + } public String toSystem(StructureMapGroupTypeMode code) { return code.getSystem(); } @@ -235,12 +237,14 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapInputMode code '"+codeString+"'"); } public String toCode(StructureMapInputMode code) { - if (code == StructureMapInputMode.SOURCE) + if (code == StructureMapInputMode.NULL) + return null; + if (code == StructureMapInputMode.SOURCE) return "source"; if (code == StructureMapInputMode.TARGET) return "target"; return "?"; - } + } public String toSystem(StructureMapInputMode code) { return code.getSystem(); } @@ -359,7 +363,9 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapModelMode code '"+codeString+"'"); } public String toCode(StructureMapModelMode code) { - if (code == StructureMapModelMode.SOURCE) + if (code == StructureMapModelMode.NULL) + return null; + if (code == StructureMapModelMode.SOURCE) return "source"; if (code == StructureMapModelMode.QUERIED) return "queried"; @@ -368,7 +374,7 @@ public class StructureMap extends CanonicalResource { if (code == StructureMapModelMode.PRODUCED) return "produced"; return "?"; - } + } public String toSystem(StructureMapModelMode code) { return code.getSystem(); } @@ -501,7 +507,9 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapSourceListMode code '"+codeString+"'"); } public String toCode(StructureMapSourceListMode code) { - if (code == StructureMapSourceListMode.FIRST) + if (code == StructureMapSourceListMode.NULL) + return null; + if (code == StructureMapSourceListMode.FIRST) return "first"; if (code == StructureMapSourceListMode.NOTFIRST) return "not_first"; @@ -512,7 +520,7 @@ public class StructureMap extends CanonicalResource { if (code == StructureMapSourceListMode.ONLYONE) return "only_one"; return "?"; - } + } public String toSystem(StructureMapSourceListMode code) { return code.getSystem(); } @@ -631,7 +639,9 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapTargetListMode code '"+codeString+"'"); } public String toCode(StructureMapTargetListMode code) { - if (code == StructureMapTargetListMode.FIRST) + if (code == StructureMapTargetListMode.NULL) + return null; + if (code == StructureMapTargetListMode.FIRST) return "first"; if (code == StructureMapTargetListMode.SHARE) return "share"; @@ -640,7 +650,7 @@ public class StructureMap extends CanonicalResource { if (code == StructureMapTargetListMode.SINGLE) return "single"; return "?"; - } + } public String toSystem(StructureMapTargetListMode code) { return code.getSystem(); } @@ -941,7 +951,9 @@ public class StructureMap extends CanonicalResource { throw new FHIRException("Unknown StructureMapTransform code '"+codeString+"'"); } public String toCode(StructureMapTransform code) { - if (code == StructureMapTransform.CREATE) + if (code == StructureMapTransform.NULL) + return null; + if (code == StructureMapTransform.CREATE) return "create"; if (code == StructureMapTransform.COPY) return "copy"; @@ -976,7 +988,7 @@ public class StructureMap extends CanonicalResource { if (code == StructureMapTransform.CP) return "cp"; return "?"; - } + } public String toSystem(StructureMapTransform code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Subscription.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Subscription.java index 66b4c9997..d2bc26147 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Subscription.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Subscription.java @@ -152,14 +152,16 @@ public class Subscription extends DomainResource { throw new FHIRException("Unknown SubscriptionPayloadContent code '"+codeString+"'"); } public String toCode(SubscriptionPayloadContent code) { - if (code == SubscriptionPayloadContent.EMPTY) + if (code == SubscriptionPayloadContent.NULL) + return null; + if (code == SubscriptionPayloadContent.EMPTY) return "empty"; if (code == SubscriptionPayloadContent.IDONLY) return "id-only"; if (code == SubscriptionPayloadContent.FULLRESOURCE) return "full-resource"; return "?"; - } + } public String toSystem(SubscriptionPayloadContent code) { return code.getSystem(); } @@ -1018,10 +1020,10 @@ public class Subscription extends DomainResource { protected UnsignedIntType timeout; /** - * The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: - -* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. - + * The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: + +* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. + * additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel. */ @Child(name = "contentType", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=true) @@ -1700,10 +1702,10 @@ public class Subscription extends DomainResource { } /** - * @return {@link #contentType} (The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: - -* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. - + * @return {@link #contentType} (The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: + +* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. + * additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public CodeType getContentTypeElement() { @@ -1724,10 +1726,10 @@ public class Subscription extends DomainResource { } /** - * @param value {@link #contentType} (The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: - -* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. - + * @param value {@link #contentType} (The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: + +* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. + * additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public Subscription setContentTypeElement(CodeType value) { @@ -1736,10 +1738,10 @@ public class Subscription extends DomainResource { } /** - * @return The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: - -* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. - + * @return The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: + +* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. + * additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel. */ public String getContentType() { @@ -1747,10 +1749,10 @@ public class Subscription extends DomainResource { } /** - * @param value The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: - -* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. - + * @param value The MIME type to send the payload in - e.g., `application/fhir+xml` or `application/fhir+json`. Note that: + +* clients may request notifications in a specific FHIR version by using the [FHIR Version Parameter](http.html#version-parameter) - e.g., `application/fhir+json; fhirVersion=4.0`. + * additional MIME types can be allowed by channels - e.g., `text/plain` and `text/html` are defined by the Email channel. */ public Subscription setContentType(String value) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionStatus.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionStatus.java index d8414d2e8..f0eba4e27 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionStatus.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionStatus.java @@ -180,7 +180,9 @@ public class SubscriptionStatus extends DomainResource { throw new FHIRException("Unknown SubscriptionNotificationType code '"+codeString+"'"); } public String toCode(SubscriptionNotificationType code) { - if (code == SubscriptionNotificationType.HANDSHAKE) + if (code == SubscriptionNotificationType.NULL) + return null; + if (code == SubscriptionNotificationType.HANDSHAKE) return "handshake"; if (code == SubscriptionNotificationType.HEARTBEAT) return "heartbeat"; @@ -191,7 +193,7 @@ public class SubscriptionStatus extends DomainResource { if (code == SubscriptionNotificationType.QUERYEVENT) return "query-event"; return "?"; - } + } public String toSystem(SubscriptionNotificationType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionTopic.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionTopic.java index 32991831b..940979e7e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionTopic.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SubscriptionTopic.java @@ -138,12 +138,14 @@ public class SubscriptionTopic extends CanonicalResource { throw new FHIRException("Unknown CriteriaNotExistsBehavior code '"+codeString+"'"); } public String toCode(CriteriaNotExistsBehavior code) { - if (code == CriteriaNotExistsBehavior.TESTPASSES) + if (code == CriteriaNotExistsBehavior.NULL) + return null; + if (code == CriteriaNotExistsBehavior.TESTPASSES) return "test-passes"; if (code == CriteriaNotExistsBehavior.TESTFAILS) return "test-fails"; return "?"; - } + } public String toSystem(CriteriaNotExistsBehavior code) { return code.getSystem(); } @@ -248,14 +250,16 @@ public class SubscriptionTopic extends CanonicalResource { throw new FHIRException("Unknown InteractionTrigger code '"+codeString+"'"); } public String toCode(InteractionTrigger code) { - if (code == InteractionTrigger.CREATE) + if (code == InteractionTrigger.NULL) + return null; + if (code == InteractionTrigger.CREATE) return "create"; if (code == InteractionTrigger.UPDATE) return "update"; if (code == InteractionTrigger.DELETE) return "delete"; return "?"; - } + } public String toSystem(InteractionTrigger code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Substance.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Substance.java index 1d4bc3a5b..d6e56eee2 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Substance.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Substance.java @@ -152,14 +152,16 @@ public class Substance extends DomainResource { throw new FHIRException("Unknown FHIRSubstanceStatus code '"+codeString+"'"); } public String toCode(FHIRSubstanceStatus code) { - if (code == FHIRSubstanceStatus.ACTIVE) + if (code == FHIRSubstanceStatus.NULL) + return null; + if (code == FHIRSubstanceStatus.ACTIVE) return "active"; if (code == FHIRSubstanceStatus.INACTIVE) return "inactive"; if (code == FHIRSubstanceStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(FHIRSubstanceStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyDelivery.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyDelivery.java index 0008251bc..23d8fdbe8 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyDelivery.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyDelivery.java @@ -166,7 +166,9 @@ public class SupplyDelivery extends DomainResource { throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'"); } public String toCode(SupplyDeliveryStatus code) { - if (code == SupplyDeliveryStatus.INPROGRESS) + if (code == SupplyDeliveryStatus.NULL) + return null; + if (code == SupplyDeliveryStatus.INPROGRESS) return "in-progress"; if (code == SupplyDeliveryStatus.COMPLETED) return "completed"; @@ -175,7 +177,7 @@ public class SupplyDelivery extends DomainResource { if (code == SupplyDeliveryStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(SupplyDeliveryStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyRequest.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyRequest.java index cb82d4def..ba66e8df3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyRequest.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/SupplyRequest.java @@ -208,7 +208,9 @@ public class SupplyRequest extends DomainResource { throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'"); } public String toCode(SupplyRequestStatus code) { - if (code == SupplyRequestStatus.DRAFT) + if (code == SupplyRequestStatus.NULL) + return null; + if (code == SupplyRequestStatus.DRAFT) return "draft"; if (code == SupplyRequestStatus.ACTIVE) return "active"; @@ -223,7 +225,7 @@ public class SupplyRequest extends DomainResource { if (code == SupplyRequestStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(SupplyRequestStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Task.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Task.java index 2ac2e2486..37438c8fc 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Task.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Task.java @@ -236,7 +236,9 @@ public class Task extends DomainResource { throw new FHIRException("Unknown TaskIntent code '"+codeString+"'"); } public String toCode(TaskIntent code) { - if (code == TaskIntent.UNKNOWN) + if (code == TaskIntent.NULL) + return null; + if (code == TaskIntent.UNKNOWN) return "unknown"; if (code == TaskIntent.PROPOSAL) return "proposal"; @@ -255,7 +257,7 @@ public class Task extends DomainResource { if (code == TaskIntent.OPTION) return "option"; return "?"; - } + } public String toSystem(TaskIntent code) { return code.getSystem(); } @@ -486,7 +488,9 @@ public class Task extends DomainResource { throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); } public String toCode(TaskStatus code) { - if (code == TaskStatus.DRAFT) + if (code == TaskStatus.NULL) + return null; + if (code == TaskStatus.DRAFT) return "draft"; if (code == TaskStatus.REQUESTED) return "requested"; @@ -511,7 +515,7 @@ public class Task extends DomainResource { if (code == TaskStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(TaskStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TerminologyCapabilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TerminologyCapabilities.java index a1b472edd..21ee463bf 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TerminologyCapabilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TerminologyCapabilities.java @@ -152,14 +152,16 @@ public class TerminologyCapabilities extends CanonicalResource { throw new FHIRException("Unknown CodeSearchSupport code '"+codeString+"'"); } public String toCode(CodeSearchSupport code) { - if (code == CodeSearchSupport.INCOMPOSE) + if (code == CodeSearchSupport.NULL) + return null; + if (code == CodeSearchSupport.INCOMPOSE) return "in-compose"; if (code == CodeSearchSupport.INEXPANSION) return "in-expansion"; if (code == CodeSearchSupport.INCOMPOSEOREXPANSION) return "in-compose-or-expansion"; return "?"; - } + } public String toSystem(CodeSearchSupport code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestReport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestReport.java index 52daf47c9..cb5823f8b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestReport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestReport.java @@ -181,7 +181,9 @@ public class TestReport extends DomainResource { throw new FHIRException("Unknown TestReportActionResult code '"+codeString+"'"); } public String toCode(TestReportActionResult code) { - if (code == TestReportActionResult.PASS) + if (code == TestReportActionResult.NULL) + return null; + if (code == TestReportActionResult.PASS) return "pass"; if (code == TestReportActionResult.SKIP) return "skip"; @@ -192,7 +194,7 @@ public class TestReport extends DomainResource { if (code == TestReportActionResult.ERROR) return "error"; return "?"; - } + } public String toSystem(TestReportActionResult code) { return code.getSystem(); } @@ -297,14 +299,16 @@ public class TestReport extends DomainResource { throw new FHIRException("Unknown TestReportParticipantType code '"+codeString+"'"); } public String toCode(TestReportParticipantType code) { - if (code == TestReportParticipantType.TESTENGINE) + if (code == TestReportParticipantType.NULL) + return null; + if (code == TestReportParticipantType.TESTENGINE) return "test-engine"; if (code == TestReportParticipantType.CLIENT) return "client"; if (code == TestReportParticipantType.SERVER) return "server"; return "?"; - } + } public String toSystem(TestReportParticipantType code) { return code.getSystem(); } @@ -409,14 +413,16 @@ public class TestReport extends DomainResource { throw new FHIRException("Unknown TestReportResult code '"+codeString+"'"); } public String toCode(TestReportResult code) { - if (code == TestReportResult.PASS) + if (code == TestReportResult.NULL) + return null; + if (code == TestReportResult.PASS) return "pass"; if (code == TestReportResult.FAIL) return "fail"; if (code == TestReportResult.PENDING) return "pending"; return "?"; - } + } public String toSystem(TestReportResult code) { return code.getSystem(); } @@ -549,7 +555,9 @@ public class TestReport extends DomainResource { throw new FHIRException("Unknown TestReportStatus code '"+codeString+"'"); } public String toCode(TestReportStatus code) { - if (code == TestReportStatus.COMPLETED) + if (code == TestReportStatus.NULL) + return null; + if (code == TestReportStatus.COMPLETED) return "completed"; if (code == TestReportStatus.INPROGRESS) return "in-progress"; @@ -560,7 +568,7 @@ public class TestReport extends DomainResource { if (code == TestReportStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(TestReportStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestScript.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestScript.java index 9f7bd0b01..659d5a88f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestScript.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TestScript.java @@ -138,12 +138,14 @@ public class TestScript extends CanonicalResource { throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); } public String toCode(AssertionDirectionType code) { - if (code == AssertionDirectionType.RESPONSE) + if (code == AssertionDirectionType.NULL) + return null; + if (code == AssertionDirectionType.RESPONSE) return "response"; if (code == AssertionDirectionType.REQUEST) return "request"; return "?"; - } + } public String toSystem(AssertionDirectionType code) { return code.getSystem(); } @@ -262,7 +264,9 @@ public class TestScript extends CanonicalResource { throw new FHIRException("Unknown AssertionManualCompletionType code '"+codeString+"'"); } public String toCode(AssertionManualCompletionType code) { - if (code == AssertionManualCompletionType.FAIL) + if (code == AssertionManualCompletionType.NULL) + return null; + if (code == AssertionManualCompletionType.FAIL) return "fail"; if (code == AssertionManualCompletionType.PASS) return "pass"; @@ -271,7 +275,7 @@ public class TestScript extends CanonicalResource { if (code == AssertionManualCompletionType.STOP) return "stop"; return "?"; - } + } public String toSystem(AssertionManualCompletionType code) { return code.getSystem(); } @@ -502,7 +506,9 @@ public class TestScript extends CanonicalResource { throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); } public String toCode(AssertionOperatorType code) { - if (code == AssertionOperatorType.EQUALS) + if (code == AssertionOperatorType.NULL) + return null; + if (code == AssertionOperatorType.EQUALS) return "equals"; if (code == AssertionOperatorType.NOTEQUALS) return "notEquals"; @@ -527,7 +533,7 @@ public class TestScript extends CanonicalResource { if (code == AssertionOperatorType.MANUALEVAL) return "manualEval"; return "?"; - } + } public String toSystem(AssertionOperatorType code) { return code.getSystem(); } @@ -1206,7 +1212,9 @@ public class TestScript extends CanonicalResource { throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); } public String toCode(AssertionResponseTypes code) { - if (code == AssertionResponseTypes.CONTINUE) + if (code == AssertionResponseTypes.NULL) + return null; + if (code == AssertionResponseTypes.CONTINUE) return "continue"; if (code == AssertionResponseTypes.SWITCHINGPROTOCOLS) return "switchingProtocols"; @@ -1295,7 +1303,7 @@ public class TestScript extends CanonicalResource { if (code == AssertionResponseTypes.HTTPVERSIONNOTSUPPORTED) return "httpVersionNotSupported"; return "?"; - } + } public String toSystem(AssertionResponseTypes code) { return code.getSystem(); } @@ -1456,7 +1464,9 @@ public class TestScript extends CanonicalResource { throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); } public String toCode(TestScriptRequestMethodCode code) { - if (code == TestScriptRequestMethodCode.DELETE) + if (code == TestScriptRequestMethodCode.NULL) + return null; + if (code == TestScriptRequestMethodCode.DELETE) return "delete"; if (code == TestScriptRequestMethodCode.GET) return "get"; @@ -1471,7 +1481,7 @@ public class TestScript extends CanonicalResource { if (code == TestScriptRequestMethodCode.HEAD) return "head"; return "?"; - } + } public String toSystem(TestScriptRequestMethodCode code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Timing.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Timing.java index 16be0e236..a5c3ef12d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Timing.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Timing.java @@ -487,7 +487,9 @@ public class Timing extends BackboneType implements ICompositeType { throw new FHIRException("Unknown EventTiming code '"+codeString+"'"); } public String toCode(EventTiming code) { - if (code == EventTiming.MORN) + if (code == EventTiming.NULL) + return null; + if (code == EventTiming.MORN) return "MORN"; if (code == EventTiming.MORN_EARLY) return "MORN.early"; @@ -542,7 +544,7 @@ public class Timing extends BackboneType implements ICompositeType { if (code == EventTiming.PCV) return "PCV"; return "?"; - } + } public String toSystem(EventTiming code) { return code.getSystem(); } @@ -703,7 +705,9 @@ public class Timing extends BackboneType implements ICompositeType { throw new FHIRException("Unknown UnitsOfTime code '"+codeString+"'"); } public String toCode(UnitsOfTime code) { - if (code == UnitsOfTime.S) + if (code == UnitsOfTime.NULL) + return null; + if (code == UnitsOfTime.S) return "s"; if (code == UnitsOfTime.MIN) return "min"; @@ -718,7 +722,7 @@ public class Timing extends BackboneType implements ICompositeType { if (code == UnitsOfTime.A) return "a"; return "?"; - } + } public String toSystem(UnitsOfTime code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Transport.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Transport.java index 77f3cbb99..080697ffb 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Transport.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Transport.java @@ -236,7 +236,9 @@ public class Transport extends DomainResource { throw new FHIRException("Unknown TransportIntent code '"+codeString+"'"); } public String toCode(TransportIntent code) { - if (code == TransportIntent.UNKNOWN) + if (code == TransportIntent.NULL) + return null; + if (code == TransportIntent.UNKNOWN) return "unknown"; if (code == TransportIntent.PROPOSAL) return "proposal"; @@ -255,7 +257,7 @@ public class Transport extends DomainResource { if (code == TransportIntent.OPTION) return "option"; return "?"; - } + } public String toSystem(TransportIntent code) { return code.getSystem(); } @@ -402,7 +404,9 @@ public class Transport extends DomainResource { throw new FHIRException("Unknown TransportStatus code '"+codeString+"'"); } public String toCode(TransportStatus code) { - if (code == TransportStatus.INPROGRESS) + if (code == TransportStatus.NULL) + return null; + if (code == TransportStatus.INPROGRESS) return "in-progress"; if (code == TransportStatus.COMPLETED) return "completed"; @@ -415,7 +419,7 @@ public class Transport extends DomainResource { if (code == TransportStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(TransportStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TriggerDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TriggerDefinition.java index eb44c0009..28a27dfe0 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TriggerDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/TriggerDefinition.java @@ -220,7 +220,9 @@ public class TriggerDefinition extends DataType implements ICompositeType { throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); } public String toCode(TriggerType code) { - if (code == TriggerType.NAMEDEVENT) + if (code == TriggerType.NULL) + return null; + if (code == TriggerType.NAMEDEVENT) return "named-event"; if (code == TriggerType.PERIODIC) return "periodic"; @@ -237,7 +239,7 @@ public class TriggerDefinition extends DataType implements ICompositeType { if (code == TriggerType.DATAACCESSENDED) return "data-access-ended"; return "?"; - } + } public String toSystem(TriggerType code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VerificationResult.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VerificationResult.java index 448b846e1..ffaf35c11 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VerificationResult.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VerificationResult.java @@ -208,7 +208,9 @@ public class VerificationResult extends DomainResource { throw new FHIRException("Unknown VerificationResultStatus code '"+codeString+"'"); } public String toCode(VerificationResultStatus code) { - if (code == VerificationResultStatus.ATTESTED) + if (code == VerificationResultStatus.NULL) + return null; + if (code == VerificationResultStatus.ATTESTED) return "attested"; if (code == VerificationResultStatus.VALIDATED) return "validated"; @@ -223,7 +225,7 @@ public class VerificationResult extends DomainResource { if (code == VerificationResultStatus.ENTEREDINERROR) return "entered-in-error"; return "?"; - } + } public String toSystem(VerificationResultStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VisionPrescription.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VisionPrescription.java index 014776bf3..ad8d949b6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VisionPrescription.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/VisionPrescription.java @@ -167,7 +167,9 @@ public class VisionPrescription extends DomainResource { throw new FHIRException("Unknown VisionBase code '"+codeString+"'"); } public String toCode(VisionBase code) { - if (code == VisionBase.UP) + if (code == VisionBase.NULL) + return null; + if (code == VisionBase.UP) return "up"; if (code == VisionBase.DOWN) return "down"; @@ -176,7 +178,7 @@ public class VisionPrescription extends DomainResource { if (code == VisionBase.OUT) return "out"; return "?"; - } + } public String toSystem(VisionBase code) { return code.getSystem(); } @@ -267,12 +269,14 @@ public class VisionPrescription extends DomainResource { throw new FHIRException("Unknown VisionEyes code '"+codeString+"'"); } public String toCode(VisionEyes code) { - if (code == VisionEyes.RIGHT) + if (code == VisionEyes.NULL) + return null; + if (code == VisionEyes.RIGHT) return "right"; if (code == VisionEyes.LEFT) return "left"; return "?"; - } + } public String toSystem(VisionEyes code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Event.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Event.java index 1ad1c01f6..0ea5d77b3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Event.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Event.java @@ -228,7 +228,9 @@ public interface Event extends PatternBase { throw new FHIRException("Unknown EventStatus code '"+codeString+"'"); } public String toCode(EventStatus code) { - if (code == EventStatus.PREPARATION) + if (code == EventStatus.NULL) + return null; + if (code == EventStatus.PREPARATION) return "preparation"; if (code == EventStatus.INPROGRESS) return "in-progress"; @@ -245,7 +247,7 @@ public interface Event extends PatternBase { if (code == EventStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(EventStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Fivews.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Fivews.java index 8b8e1c129..a563741d7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Fivews.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Fivews.java @@ -548,7 +548,9 @@ public interface Fivews extends PatternBase { throw new FHIRException("Unknown CanonicalStatus code '"+codeString+"'"); } public String toCode(CanonicalStatus code) { - if (code == CanonicalStatus.ERROR) + if (code == CanonicalStatus.NULL) + return null; + if (code == CanonicalStatus.ERROR) return "error"; if (code == CanonicalStatus.PROPOSED) return "proposed"; @@ -611,7 +613,7 @@ public interface Fivews extends PatternBase { if (code == CanonicalStatus.HWDISCON) return "hw-discon"; return "?"; - } + } public String toSystem(CanonicalStatus code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Request.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Request.java index 6388ffd9e..4bb61e785 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Request.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/patterns/Request.java @@ -214,7 +214,9 @@ public interface Request extends PatternBase { throw new FHIRException("Unknown RequestStatus code '"+codeString+"'"); } public String toCode(RequestStatus code) { - if (code == RequestStatus.DRAFT) + if (code == RequestStatus.NULL) + return null; + if (code == RequestStatus.DRAFT) return "draft"; if (code == RequestStatus.ACTIVE) return "active"; @@ -229,7 +231,7 @@ public interface Request extends PatternBase { if (code == RequestStatus.UNKNOWN) return "unknown"; return "?"; - } + } public String toSystem(RequestStatus code) { return code.getSystem(); } @@ -418,7 +420,9 @@ public interface Request extends PatternBase { throw new FHIRException("Unknown RequestIntent code '"+codeString+"'"); } public String toCode(RequestIntent code) { - if (code == RequestIntent.PROPOSAL) + if (code == RequestIntent.NULL) + return null; + if (code == RequestIntent.PROPOSAL) return "proposal"; if (code == RequestIntent.PLAN) return "plan"; @@ -437,7 +441,7 @@ public interface Request extends PatternBase { if (code == RequestIntent.OPTION) return "option"; return "?"; - } + } public String toSystem(RequestIntent code) { return code.getSystem(); } @@ -556,7 +560,9 @@ public interface Request extends PatternBase { throw new FHIRException("Unknown RequestPriority code '"+codeString+"'"); } public String toCode(RequestPriority code) { - if (code == RequestPriority.ROUTINE) + if (code == RequestPriority.NULL) + return null; + if (code == RequestPriority.ROUTINE) return "routine"; if (code == RequestPriority.URGENT) return "urgent"; @@ -565,7 +571,7 @@ public interface Request extends PatternBase { if (code == RequestPriority.STAT) return "stat"; return "?"; - } + } public String toSystem(RequestPriority code) { return code.getSystem(); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GuideParameterCode.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GuideParameterCode.java index fb4e6b407..e1e17dbac 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GuideParameterCode.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GuideParameterCode.java @@ -201,7 +201,9 @@ public enum GuideParameterCode { throw new FHIRException("Unknown GuideParameterCode code '"+codeString+"'"); } public String toCode(GuideParameterCode code) { - if (code == GuideParameterCode.APPLY) + if (code == GuideParameterCode.NULL) + return null; + if (code == GuideParameterCode.APPLY) return "apply"; if (code == GuideParameterCode.PATHRESOURCE) return "path-resource"; @@ -222,7 +224,7 @@ public enum GuideParameterCode { if (code == GuideParameterCode.HTMLTEMPLATE) return "html-template"; return "?"; - } + } public String toSystem(GuideParameterCode code) { return code.getSystem(); }