diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java index bc9ba133544..4d4ece1d58d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ElementUtil.java @@ -90,40 +90,39 @@ public class ElementUtil { } /** - * @param theType Can be null + * Note that this method does not work on HL7.org structures */ - @SuppressWarnings("unused") - public static List allPopulatedChildElements(Class theType, Object... theElements) { - throw new UnsupportedOperationException(); -// ArrayList retVal = new ArrayList(); -// for (Object next : theElements) { -// if (next == null) { -// continue; -// }else if (next instanceof IBase) { -// addElement(retVal, (IBase) next, theType); -// } else if (next instanceof List) { -// for (Object nextElement : ((List)next)) { -// if (!(nextElement instanceof IBase)) { -// throw new IllegalArgumentException("Found element of "+nextElement.getClass()); -// } -// addElement(retVal, (IBase) nextElement, theType); -// } -// } else { -// throw new IllegalArgumentException("Found element of "+next.getClass()); -// } -// -// } -// return retVal; + public static List allPopulatedChildElements(Class theType, Object... theElements) { + ArrayList retVal = new ArrayList(); + for (Object next : theElements) { + if (next == null) { + continue; + }else if (next instanceof IElement) { + addElement(retVal, (IElement) next, theType); + } else if (next instanceof List) { + for (Object nextElement : ((List)next)) { + if (!(nextElement instanceof IBase)) { + throw new IllegalArgumentException("Found element of "+nextElement.getClass()); + } + addElement(retVal, (IElement) nextElement, theType); + } + } else { + throw new IllegalArgumentException("Found element of "+next.getClass()); + } + + } + return retVal; } -// @SuppressWarnings("unchecked") -// private static void addElement(ArrayList retVal, IBase next, Class theType) { -// if (theType == null|| theType.isAssignableFrom(next.getClass())) { -// retVal.add((T) next); -// } -// if (next instanceof ICompositeElement) { -// retVal.addAll(((ICompositeElement) next).getAllPopulatedChildElementsOfType(theType)); -// } -// } + @SuppressWarnings("unchecked") + private static void addElement(ArrayList retVal, IElement next, Class theType) { + if (theType == null|| theType.isAssignableFrom(next.getClass())) { + retVal.add((T) next); + } + if (next instanceof ICompositeElement) { + ICompositeElement iCompositeElement = (ICompositeElement) next; + retVal.addAll(iCompositeElement.getAllPopulatedChildElementsOfType(theType)); + } + } } diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumeration.java.orig b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumeration.java.orig deleted file mode 100644 index db267a980bc..00000000000 --- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumeration.java.orig +++ /dev/null @@ -1,43 +0,0 @@ -package org.hl7.fhir.instance.model.api; - -import org.hl7.fhir.instance.model.IPrimitiveType; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -<<<<<<< HEAD:hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IBaseResource.java -/** - * For now, this is a simple marker interface indicating that a class is a resource type. - * There are two concrete types of implementations of this interrface. The first are - * HL7.org's Resource structures (e.g. - * org.hl7.fhir.instance.model.Patient) and - * the second are HAPI's Resource structures, e.g. - * ca.uhn.fhir.model.dstu.resource.Patient) - */ -public interface IBaseResource extends IBase { - - IIdType -======= -public interface IBaseEnumeration> extends IPrimitiveType { - - // Marker interface ->>>>>>> 2edc7eadab64d171ddc1b7c971ff36b9eb55ce67:hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumeration.java - -} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FhirEnum.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IFhirEnum.java similarity index 97% rename from hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FhirEnum.java rename to hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IFhirEnum.java index b3c66a722a8..ecaf4aa8cd4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FhirEnum.java +++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IFhirEnum.java @@ -1,4 +1,4 @@ -package org.hl7.fhir.instance.model; +package org.hl7.fhir.instance.model.api; /* * #%L @@ -55,7 +55,7 @@ POSSIBILITY OF SUCH DAMAGE. * Interface to be implemented by all built-in FHIR enumerations (i.e. the * actual FHIR-defined Java Enum will implement this interface) */ -public interface FhirEnum { +public interface IFhirEnum { /** * Get the XML/JSON representation for an enumerated value diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2Test.java index f7c0300a6cb..460c789d096 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoDstu2Test.java @@ -86,6 +86,7 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +@SuppressWarnings("unchecked") public class FhirResourceDaoDstu2Test { private static ClassPathXmlApplicationContext ourCtx; @@ -2307,9 +2308,9 @@ public class FhirResourceDaoDstu2Test { } } - @SuppressWarnings("unchecked") - private List toList(IBundleProvider theSearch) { - return (List) theSearch.getResources(0, theSearch.size()); + @SuppressWarnings({ "rawtypes" }) + private List toList(IBundleProvider theSearch) { + return theSearch.getResources(0, theSearch.size()); } private List toUnqualifiedVersionlessIds(IBundleProvider theFound) { @@ -2325,7 +2326,6 @@ public class FhirResourceDaoDstu2Test { ourCtx.close(); } - @SuppressWarnings("unchecked") @BeforeClass public static void beforeClass() { ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml"); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java index 1af70280804..95b7d7860f2 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java @@ -119,7 +119,7 @@ public class ResourceProviderDstu2Test { @Test public void testCreateResourceWithNumericId() throws IOException { - String resource = ""; + String resource = ""; HttpPost post = new HttpPost(ourServerBase + "/Patient"); post.setEntity(new StringEntity(resource, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"))); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java index fb7f4dbf7a4..4dddd20bd26 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java @@ -110,7 +110,7 @@ public class JsonParserDstu2Test { ourLog.info(bundleText); ca.uhn.fhir.model.dstu2.resource.Bundle reincarnatedBundle = jsonParser.parseResource (ca.uhn.fhir.model.dstu2.resource.Bundle.class, bundleText); - Patient reincarnatedPatient = reincarnatedBundle.getAllPopulatedChildElementsOfType(Patient.class).get(0); + Patient reincarnatedPatient = (Patient) reincarnatedBundle.getEntry().get(0).getResource(); assertEquals("Patient", patient.getId().getResourceType()); assertEquals("Patient", reincarnatedPatient.getId().getResourceType()); diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2Test.java index 98a296fa12f..fc1298b031c 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserDstu2Test.java @@ -470,7 +470,7 @@ public class XmlParserDstu2Test { //@formatter:on Patient p = ourCtx.newXmlParser().parseResource(Patient.class, res); - assertEquals(htmlNoNs, p.getText().getDiv().getValueAsString()); + assertEquals(htmlNs, p.getText().getDiv().getValueAsString()); } @@ -498,7 +498,7 @@ public class XmlParserDstu2Test { ourLog.info(bundleText); ca.uhn.fhir.model.dstu2.resource.Bundle reincarnatedBundle = xmlParser.parseResource (ca.uhn.fhir.model.dstu2.resource.Bundle.class, bundleText); - Patient reincarnatedPatient = reincarnatedBundle.getAllPopulatedChildElementsOfType(Patient.class).get(0); + Patient reincarnatedPatient = (Patient) reincarnatedBundle.getEntry().get(0).getResource(); assertEquals("Patient", patient.getId().getResourceType()); assertEquals("Patient", reincarnatedPatient.getId().getResourceType()); diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index d531858443a..39256d2b78d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -20,30 +20,27 @@ hapi-fhir-base 1.0-SNAPSHOT - + javax.servlet javax.servlet-api ${servlet_api_version} provided - + + + + + xpp3 + xpp3_min + 1.1.4c + net.sf.saxon - saxon - 8.7 + Saxon-HE + 9.6.0-4 - - - xpp3 - xpp3_min - 1.1.4c - - - net.sf.saxon - Saxon-HE - 9.6.0-4 - @@ -94,13 +91,13 @@ ${jetty_version} test - - org.eclipse.jetty - jetty-http + + org.eclipse.jetty + jetty-http ${jetty_version} - test - - + test + + ch.qos.logback logback-classic ${logback_version} @@ -120,18 +117,18 @@ test - com.phloc - phloc-schematron - ${phloc_schematron_version} + com.phloc + phloc-schematron + ${phloc_schematron_version} test - com.phloc - phloc-commons - ${phloc_commons_version} + com.phloc + phloc-commons + ${phloc_commons_version} test - + @@ -184,27 +181,13 @@ ${guava_version} test - - + + diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java index ddf941441c7..b12c08b87f0 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/FhirDstu2Hl7Org.java @@ -26,8 +26,8 @@ import java.util.ArrayList; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.conf.ServerConformanceProvider; import org.hl7.fhir.instance.conf.ServerProfileProvider; -import org.hl7.fhir.instance.model.Profile; import org.hl7.fhir.instance.model.Reference; +import org.hl7.fhir.instance.model.StructureDefinition; import ca.uhn.fhir.context.ConfigurationException; import ca.uhn.fhir.context.FhirContext; @@ -50,8 +50,8 @@ public class FhirDstu2Hl7Org implements IFhirVersion { } @Override - public Profile generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { - Profile retVal = new Profile(); + public StructureDefinition generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase) { + StructureDefinition retVal = new StructureDefinition(); RuntimeResourceDefinition def = theRuntimeResourceDefinition; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/conf/ServerProfileProvider.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/conf/ServerProfileProvider.java index a510d8872f5..52ab3e8dc0e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/conf/ServerProfileProvider.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/conf/ServerProfileProvider.java @@ -28,7 +28,7 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import org.hl7.fhir.instance.model.IBaseResource; -import org.hl7.fhir.instance.model.Profile; +import org.hl7.fhir.instance.model.StructureDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; @@ -51,21 +51,21 @@ public class ServerProfileProvider implements IResourceProvider { @Override public Class getResourceType() { - return Profile.class; + return StructureDefinition.class; } @Read() - public Profile getProfileById(HttpServletRequest theRequest, @IdParam IdDt theId) { + public StructureDefinition getProfileById(HttpServletRequest theRequest, @IdParam IdDt theId) { RuntimeResourceDefinition retVal = myContext.getResourceDefinitionById(theId.getValue()); if (retVal==null) { return null; } String serverBase = getServerBase(theRequest); - return (Profile) retVal.toProfile(serverBase); + return (StructureDefinition) retVal.toProfile(serverBase); } @Search() - public List getAllProfiles(HttpServletRequest theRequest) { + public List getAllProfiles(HttpServletRequest theRequest) { final String serverBase = getServerBase(theRequest); List defs = new ArrayList(myContext.getResourceDefinitions()); Collections.sort(defs, new Comparator() { @@ -77,9 +77,9 @@ public class ServerProfileProvider implements IResourceProvider { } return cmp; }}); - ArrayList retVal = new ArrayList(); + ArrayList retVal = new ArrayList(); for (RuntimeResourceDefinition next : defs) { - retVal.add((Profile) next.toProfile(serverBase)); + retVal.add((StructureDefinition) next.toProfile(serverBase)); } return retVal; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java deleted file mode 100644 index 52ce1c943fc..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java +++ /dev/null @@ -1,474 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * Prospective warnings of potential issues when providing care to the patient. - */ -@ResourceDef(name="Alert", profile="http://hl7.org/fhir/Profile/Alert") -public class Alert extends DomainResource { - - public enum AlertStatus { - /** - * A current alert that should be displayed to a user. A system may use the category to determine which roles should view the alert. - */ - ACTIVE, - /** - * The alert does not need to be displayed any more. - */ - INACTIVE, - /** - * The alert was added in error, and should no longer be displayed. - */ - ENTEREDINERROR, - /** - * added to help the parsers - */ - NULL; - public static AlertStatus fromCode(String codeString) throws Exception { - 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; - throw new Exception("Unknown AlertStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACTIVE: return "active"; - case INACTIVE: return "inactive"; - case ENTEREDINERROR: return "entered-in-error"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ACTIVE: return ""; - case INACTIVE: return ""; - case ENTEREDINERROR: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ACTIVE: return "A current alert that should be displayed to a user. A system may use the category to determine which roles should view the alert."; - case INACTIVE: return "The alert does not need to be displayed any more."; - case ENTEREDINERROR: return "The alert was added in error, and should no longer be displayed."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACTIVE: return "active"; - case INACTIVE: return "inactive"; - case ENTEREDINERROR: return "entered-in-error"; - default: return "?"; - } - } - } - - public static class AlertStatusEnumFactory implements EnumFactory { - public AlertStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("active".equals(codeString)) - return AlertStatus.ACTIVE; - if ("inactive".equals(codeString)) - return AlertStatus.INACTIVE; - if ("entered-in-error".equals(codeString)) - return AlertStatus.ENTEREDINERROR; - throw new IllegalArgumentException("Unknown AlertStatus code '"+codeString+"'"); - } - public String toCode(AlertStatus code) { - if (code == AlertStatus.ACTIVE) - return "active"; - if (code == AlertStatus.INACTIVE) - return "inactive"; - if (code == AlertStatus.ENTEREDINERROR) - return "entered-in-error"; - return "?"; - } - } - - /** - * Identifier assigned to the alert for external use (outside the FHIR environment). - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the alert for external use (outside the FHIR environment)." ) - protected List identifier; - - /** - * Allows an alert to be divided into different categories like clinical, administrative etc. - */ - @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an alert to be divided into different categories like clinical, administrative etc." ) - protected CodeableConcept category; - - /** - * Supports basic workflow. - */ - @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) - @Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="Supports basic workflow." ) - protected Enumeration status; - - /** - * The person who this alert concerns. - */ - @Child(name = "subject", type = {Patient.class}, order = 3, min = 1, max = 1) - @Description(shortDefinition="Who is alert about?", formalDefinition="The person who this alert concerns." ) - protected Reference subject; - - /** - * The actual object that is the target of the reference (The person who this alert concerns.) - */ - protected Patient subjectTarget; - - /** - * The person or device that created the alert. - */ - @Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Alert creator", formalDefinition="The person or device that created the alert." ) - protected Reference author; - - /** - * The actual object that is the target of the reference (The person or device that created the alert.) - */ - protected Resource authorTarget; - - /** - * The coded value or textual component of the alert to display to the user. - */ - @Child(name = "note", type = {CodeableConcept.class}, order = 5, min = 1, max = 1) - @Description(shortDefinition = "Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition = "The coded value or textual component of the alert to display to the user.") - protected CodeableConcept note; - - private static final long serialVersionUID = -1519932996L; - - public Alert() { - super(); - } - - public Alert(Enumeration status, Reference subject, CodeableConcept note) { - super(); - this.status = status; - this.subject = subject; - this.note = note; - } - - /** - * @return {@link #identifier} (Identifier assigned to the alert for external use (outside the FHIR environment).) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (Identifier assigned to the alert for external use (outside the FHIR environment).) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #category} (Allows an alert to be divided into different categories like clinical, administrative etc.) - */ - public CodeableConcept getCategory() { - if (this.category == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Alert.category"); - else if (Configuration.doAutoCreate()) - this.category = new CodeableConcept(); // cc - return this.category; - } - - public boolean hasCategory() { - return this.category != null && !this.category.isEmpty(); - } - - /** - * @param value {@link #category} (Allows an alert to be divided into different categories like clinical, administrative etc.) - */ - public Alert setCategory(CodeableConcept value) { - this.category = value; - return this; - } - - /** - * @return {@link #status} (Supports basic workflow.). 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 Alert.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new AlertStatusEnumFactory()); // 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} (Supports basic workflow.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Alert setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return Supports basic workflow. - */ - public AlertStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value Supports basic workflow. - */ - public Alert setStatus(AlertStatus value) { - if (this.status == null) - this.status = new Enumeration(new AlertStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #subject} (The person who this alert concerns.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Alert.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 who this alert concerns.) - */ - public Alert setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who this alert concerns.) - */ - public Patient getSubjectTarget() { - if (this.subjectTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Alert.subject"); - else if (Configuration.doAutoCreate()) - this.subjectTarget = new Patient(); // aa - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who this alert concerns.) - */ - public Alert setSubjectTarget(Patient value) { - this.subjectTarget = value; - return this; - } - - /** - * @return {@link #author} (The person or device that created the alert.) - */ - public Reference getAuthor() { - if (this.author == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Alert.author"); - else if (Configuration.doAutoCreate()) - this.author = new Reference(); // cc - return this.author; - } - - public boolean hasAuthor() { - return this.author != null && !this.author.isEmpty(); - } - - /** - * @param value {@link #author} (The person or device that created the alert.) - */ - public Alert setAuthor(Reference value) { - this.author = value; - return this; - } - - /** - * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person or device that created the alert.) - */ - public Resource getAuthorTarget() { - return this.authorTarget; - } - - /** - * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person or device that created the alert.) - */ - public Alert setAuthorTarget(Resource value) { - this.authorTarget = value; - return this; - } - - /** - * @return {@link #note} (The coded value or textual component of the alert to display to the user.) - */ - public CodeableConcept getNote() { - if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Alert.note"); - else if (Configuration.doAutoCreate()) - this.note = new CodeableConcept(); // cc - return this.note; - } - - public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); - } - - /** - * @param value {@link #note} (The coded value or textual component of the alert to display to the user.) - */ - public Alert setNote(CodeableConcept value) { - this.note = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the alert for external use (outside the FHIR environment).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("category", "CodeableConcept", "Allows an alert to be divided into different categories like clinical, administrative etc.", 0, java.lang.Integer.MAX_VALUE, category)); - childrenList.add(new Property("status", "code", "Supports basic workflow.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("subject", "Reference(Patient)", "The person who this alert concerns.", 0, java.lang.Integer.MAX_VALUE, subject)); - childrenList.add(new Property("author", "Reference(Practitioner|Patient|Device)", "The person or device that created the alert.", 0, java.lang.Integer.MAX_VALUE, author)); - childrenList.add(new Property("note", "CodeableConcept", "The coded value or textual component of the alert to display to the user.", 0, java.lang.Integer.MAX_VALUE, note)); - } - - public Alert copy() { - Alert dst = new Alert(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.category = category == null ? null : category.copy(); - dst.status = status == null ? null : status.copy(); - dst.subject = subject == null ? null : subject.copy(); - dst.author = author == null ? null : author.copy(); - dst.note = note == null ? null : note.copy(); - return dst; - } - - protected Alert typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Alert)) - return false; - Alert o = (Alert) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(category, o.category, true) && compareDeep(status, o.status, true) - && compareDeep(subject, o.subject, true) && compareDeep(author, o.author, true) && compareDeep(note, o.note, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Alert)) - return false; - Alert o = (Alert) other; - return compareValues(status, o.status, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) - && (status == null || status.isEmpty()) && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) - && (note == null || note.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Alert; - } - - @SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name = "patient", path = "Alert.subject", description = "The identity of a subject to list alerts for", type = "reference") - public static final String SP_PATIENT = "patient"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java deleted file mode 100644 index 7addcd6ea0f..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java +++ /dev/null @@ -1,884 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * Describes the intention of how one or more practitioners intend to deliver care for a particular patient for a period of time, possibly limited to care for a specific condition or set of conditions. - */ -@ResourceDef(name="CarePlan2", profile="http://hl7.org/fhir/Profile/CarePlan2") -public class CarePlan2 extends DomainResource { - - public enum CarePlan2Status { - /** - * The plan is in development or awaiting use but is not yet intended to be acted upon. - */ - PLANNED, - /** - * The plan is intended to be followed and used as part of patient care. - */ - ACTIVE, - /** - * The plan is no longer in use and is not expected to be followed or used in patient care. - */ - COMPLETED, - /** - * added to help the parsers - */ - NULL; - public static CarePlan2Status fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("planned".equals(codeString)) - return PLANNED; - if ("active".equals(codeString)) - return ACTIVE; - if ("completed".equals(codeString)) - return COMPLETED; - throw new Exception("Unknown CarePlan2Status code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PLANNED: return "planned"; - case ACTIVE: return "active"; - case COMPLETED: return "completed"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PLANNED: return ""; - case ACTIVE: return ""; - case COMPLETED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PLANNED: return "The plan is in development or awaiting use but is not yet intended to be acted upon."; - case ACTIVE: return "The plan is intended to be followed and used as part of patient care."; - case COMPLETED: return "The plan is no longer in use and is not expected to be followed or used in patient care."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PLANNED: return "planned"; - case ACTIVE: return "active"; - case COMPLETED: return "completed"; - default: return "?"; - } - } - } - - public static class CarePlan2StatusEnumFactory implements EnumFactory { - public CarePlan2Status fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("planned".equals(codeString)) - return CarePlan2Status.PLANNED; - if ("active".equals(codeString)) - return CarePlan2Status.ACTIVE; - if ("completed".equals(codeString)) - return CarePlan2Status.COMPLETED; - throw new IllegalArgumentException("Unknown CarePlan2Status code '"+codeString+"'"); - } - public String toCode(CarePlan2Status code) { - if (code == CarePlan2Status.PLANNED) - return "planned"; - if (code == CarePlan2Status.ACTIVE) - return "active"; - if (code == CarePlan2Status.COMPLETED) - return "completed"; - return "?"; - } - } - - @Block() - public static class CarePlan2ParticipantComponent extends BackboneElement { - /** - * Indicates specific responsibility of an individual within the care plan. E.g. "Primary physician", "Team coordinator", "Caregiver", etc. - */ - @Child(name="role", type={CodeableConcept.class}, order=1, min=0, max=1) - @Description(shortDefinition="Type of involvement", formalDefinition="Indicates specific responsibility of an individual within the care plan. E.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc." ) - protected CodeableConcept role; - - /** - * The specific person or organization who is participating/expected to participate in the care plan. - */ - @Child(name="member", type={Practitioner.class, RelatedPerson.class, Patient.class, Organization.class}, order=2, min=1, max=1) - @Description(shortDefinition="Who is involved", formalDefinition="The specific person or organization who is participating/expected to participate in the care plan." ) - protected Reference member; - - /** - * The actual object that is the target of the reference (The specific person or organization who is participating/expected to participate in the care plan.) - */ - protected Resource memberTarget; - - private static final long serialVersionUID = -466811117L; - - public CarePlan2ParticipantComponent() { - super(); - } - - public CarePlan2ParticipantComponent(Reference member) { - super(); - this.member = member; - } - - /** - * @return {@link #role} (Indicates specific responsibility of an individual within the care plan. E.g. "Primary physician", "Team coordinator", "Caregiver", etc.) - */ - public CodeableConcept getRole() { - if (this.role == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2ParticipantComponent.role"); - else if (Configuration.doAutoCreate()) - this.role = new CodeableConcept(); // cc - return this.role; - } - - public boolean hasRole() { - return this.role != null && !this.role.isEmpty(); - } - - /** - * @param value {@link #role} (Indicates specific responsibility of an individual within the care plan. E.g. "Primary physician", "Team coordinator", "Caregiver", etc.) - */ - public CarePlan2ParticipantComponent setRole(CodeableConcept value) { - this.role = value; - return this; - } - - /** - * @return {@link #member} (The specific person or organization who is participating/expected to participate in the care plan.) - */ - public Reference getMember() { - if (this.member == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2ParticipantComponent.member"); - else if (Configuration.doAutoCreate()) - this.member = new Reference(); // cc - return this.member; - } - - public boolean hasMember() { - return this.member != null && !this.member.isEmpty(); - } - - /** - * @param value {@link #member} (The specific person or organization who is participating/expected to participate in the care plan.) - */ - public CarePlan2ParticipantComponent setMember(Reference value) { - this.member = value; - return this; - } - - /** - * @return {@link #member} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care plan.) - */ - public Resource getMemberTarget() { - return this.memberTarget; - } - - /** - * @param value {@link #member} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care plan.) - */ - public CarePlan2ParticipantComponent setMemberTarget(Resource value) { - this.memberTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("role", "CodeableConcept", "Indicates specific responsibility of an individual within the care plan. E.g. 'Primary physician', 'Team coordinator', 'Caregiver', etc.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("member", "Reference(Practitioner|RelatedPerson|Patient|Organization)", "The specific person or organization who is participating/expected to participate in the care plan.", 0, java.lang.Integer.MAX_VALUE, member)); - } - - public CarePlan2ParticipantComponent copy() { - CarePlan2ParticipantComponent dst = new CarePlan2ParticipantComponent(); - copyValues(dst); - dst.role = role == null ? null : role.copy(); - dst.member = member == null ? null : member.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CarePlan2ParticipantComponent)) - return false; - CarePlan2ParticipantComponent o = (CarePlan2ParticipantComponent) other; - return compareDeep(role, o.role, true) && compareDeep(member, o.member, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CarePlan2ParticipantComponent)) - return false; - CarePlan2ParticipantComponent o = (CarePlan2ParticipantComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty()) - ; - } - - } - - /** - * This records identifiers associated with this care plan that are defined by business processed 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) - @Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed 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; - - /** - * Identifies the patient/subject whose intended care is described by the plan. - */ - @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Identifies the patient/subject whose intended care is described by the plan.) - */ - protected Patient patientTarget; - - /** - * Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. - */ - @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1) - @Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." ) - protected Enumeration status; - - /** - * Indicates when the plan did (or is intended to) come into effect and end. - */ - @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." ) - protected Period period; - - /** - * Identifies the most recent date on which the plan has been revised. - */ - @Child(name = "modified", type = {DateTimeType.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." ) - protected DateTimeType modified; - - /** - * Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan. - */ - @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." ) - protected List concern; - /** - * The actual objects that are the target of the reference (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) - */ - protected List concernTarget; - - - /** - * Identifies all people and organizations who are expected to be involved in the care envisioned by this plan. - */ - @Child(name = "participant", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." ) - protected List participant; - - /** - * General notes about the care plan not covered elsewhere. - */ - @Child(name = "notes", type = {StringType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." ) - protected StringType notes; - - /** - * Describes the intended objective(s) of carrying out the Care Plan. - */ - @Child(name = "goal", type = {Goal.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="CarePlan Goal", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." ) - protected List goal; - /** - * The actual objects that are the target of the reference (Describes the intended objective(s) of carrying out the Care Plan.) - */ - protected List goalTarget; - - - /** - * Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc. - */ - @Child(name = "activity", type = {ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="CarePlan Activity", formalDefinition="Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." ) - protected List activity; - /** - * The actual objects that are the target of the reference (Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) - */ - protected List activityTarget; - - - private static final long serialVersionUID = 2070266071L; - - public CarePlan2() { - super(); - } - - public CarePlan2(Enumeration status) { - super(); - this.status = status; - } - - /** - * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processed 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; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (This records identifiers associated with this care plan that are defined by business processed 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).) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #patient} (Identifies the patient/subject whose intended care is described by the plan.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Identifies the patient/subject whose intended care is described by the plan.) - */ - public CarePlan2 setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient/subject whose intended care is described by the plan.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient/subject whose intended care is described by the plan.) - */ - public CarePlan2 setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #status} (Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Enumeration getStatusElement() { - if (this.status == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new CarePlan2StatusEnumFactory()); // 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 plan is currently being acted upon, represents future intentions or is now just historical record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public CarePlan2 setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. - */ - public CarePlan2Status getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record. - */ - public CarePlan2 setStatus(CarePlan2Status value) { - if (this.status == null) - this.status = new Enumeration(new CarePlan2StatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.period"); - else if (Configuration.doAutoCreate()) - this.period = new Period(); // cc - return this.period; - } - - public boolean hasPeriod() { - return this.period != null && !this.period.isEmpty(); - } - - /** - * @param value {@link #period} (Indicates when the plan did (or is intended to) come into effect and end.) - */ - public CarePlan2 setPeriod(Period value) { - this.period = value; - return this; - } - - /** - * @return {@link #modified} (Identifies the most recent date on which the plan has been revised.). This is the underlying object with id, value and extensions. The accessor "getModified" gives direct access to the value - */ - public DateTimeType getModifiedElement() { - if (this.modified == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.modified"); - else if (Configuration.doAutoCreate()) - this.modified = new DateTimeType(); // bb - return this.modified; - } - - public boolean hasModifiedElement() { - return this.modified != null && !this.modified.isEmpty(); - } - - public boolean hasModified() { - return this.modified != null && !this.modified.isEmpty(); - } - - /** - * @param value {@link #modified} (Identifies the most recent date on which the plan has been revised.). This is the underlying object with id, value and extensions. The accessor "getModified" gives direct access to the value - */ - public CarePlan2 setModifiedElement(DateTimeType value) { - this.modified = value; - return this; - } - - /** - * @return Identifies the most recent date on which the plan has been revised. - */ - public Date getModified() { - return this.modified == null ? null : this.modified.getValue(); - } - - /** - * @param value Identifies the most recent date on which the plan has been revised. - */ - public CarePlan2 setModified(Date value) { - if (value == null) - this.modified = null; - else { - if (this.modified == null) - this.modified = new DateTimeType(); - this.modified.setValue(value); - } - return this; - } - - /** - * @return {@link #concern} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) - */ - public List getConcern() { - if (this.concern == null) - this.concern = new ArrayList(); - return this.concern; - } - - public boolean hasConcern() { - if (this.concern == null) - return false; - for (Reference item : this.concern) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concern} (Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) - */ - // syntactic sugar - public Reference addConcern() { //3 - Reference t = new Reference(); - if (this.concern == null) - this.concern = new ArrayList(); - this.concern.add(t); - return t; - } - - /** - * @return {@link #concern} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) - */ - public List getConcernTarget() { - if (this.concernTarget == null) - this.concernTarget = new ArrayList(); - return this.concernTarget; - } - - // syntactic sugar - /** - * @return {@link #concern} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.) - */ - public Condition addConcernTarget() { - Condition r = new Condition(); - if (this.concernTarget == null) - this.concernTarget = new ArrayList(); - this.concernTarget.add(r); - return r; - } - - /** - * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.) - */ - public List getParticipant() { - if (this.participant == null) - this.participant = new ArrayList(); - return this.participant; - } - - public boolean hasParticipant() { - if (this.participant == null) - return false; - for (CarePlan2ParticipantComponent item : this.participant) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.) - */ - // syntactic sugar - public CarePlan2ParticipantComponent addParticipant() { //3 - CarePlan2ParticipantComponent t = new CarePlan2ParticipantComponent(); - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return t; - } - - /** - * @return {@link #notes} (General notes about the care plan not covered elsewhere.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value - */ - public StringType getNotesElement() { - if (this.notes == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CarePlan2.notes"); - else if (Configuration.doAutoCreate()) - this.notes = new StringType(); // bb - return this.notes; - } - - public boolean hasNotesElement() { - return this.notes != null && !this.notes.isEmpty(); - } - - public boolean hasNotes() { - return this.notes != null && !this.notes.isEmpty(); - } - - /** - * @param value {@link #notes} (General notes about the care plan not covered elsewhere.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value - */ - public CarePlan2 setNotesElement(StringType value) { - this.notes = value; - return this; - } - - /** - * @return General notes about the care plan not covered elsewhere. - */ - public String getNotes() { - return this.notes == null ? null : this.notes.getValue(); - } - - /** - * @param value General notes about the care plan not covered elsewhere. - */ - public CarePlan2 setNotes(String value) { - if (Utilities.noString(value)) - this.notes = null; - else { - if (this.notes == null) - this.notes = new StringType(); - this.notes.setValue(value); - } - return this; - } - - /** - * @return {@link #goal} (Describes the intended objective(s) of carrying out the Care Plan.) - */ - public List getGoal() { - if (this.goal == null) - this.goal = new ArrayList(); - return this.goal; - } - - public boolean hasGoal() { - if (this.goal == null) - return false; - for (Reference item : this.goal) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #goal} (Describes the intended objective(s) of carrying out the Care Plan.) - */ - // syntactic sugar - public Reference addGoal() { //3 - Reference t = new Reference(); - if (this.goal == null) - this.goal = new ArrayList(); - this.goal.add(t); - return t; - } - - /** - * @return {@link #goal} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Describes the intended objective(s) of carrying out the Care Plan.) - */ - public List getGoalTarget() { - if (this.goalTarget == null) - this.goalTarget = new ArrayList(); - return this.goalTarget; - } - - // syntactic sugar - /** - * @return {@link #goal} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Describes the intended objective(s) of carrying out the Care Plan.) - */ - public Goal addGoalTarget() { - Goal r = new Goal(); - if (this.goalTarget == null) - this.goalTarget = new ArrayList(); - this.goalTarget.add(r); - return r; - } - - /** - * @return {@link #activity} (Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) - */ - public List getActivity() { - if (this.activity == null) - this.activity = new ArrayList(); - return this.activity; - } - - public boolean hasActivity() { - if (this.activity == null) - return false; - for (Reference item : this.activity) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #activity} (Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) - */ - // syntactic sugar - public Reference addActivity() { //3 - Reference t = new Reference(); - if (this.activity == null) - this.activity = new ArrayList(); - this.activity.add(t); - return t; - } - - /** - * @return {@link #activity} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.) - */ - public List getActivityTarget() { - if (this.activityTarget == null) - this.activityTarget = new ArrayList(); - return this.activityTarget; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("patient", "Reference(Patient)", "Identifies the patient/subject whose intended care is described by the plan.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("status", "code", "Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("period", "Period", "Indicates when the plan did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period)); - childrenList.add(new Property("modified", "dateTime", "Identifies the most recent date on which the plan has been revised.", 0, java.lang.Integer.MAX_VALUE, modified)); - childrenList.add(new Property("concern", "Reference(Condition)", "Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.", 0, java.lang.Integer.MAX_VALUE, concern)); - childrenList.add(new Property("participant", "", "Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.", 0, java.lang.Integer.MAX_VALUE, participant)); - childrenList.add(new Property("notes", "string", "General notes about the care plan not covered elsewhere.", 0, java.lang.Integer.MAX_VALUE, notes)); - childrenList.add(new Property("goal", "Reference(Goal)", "Describes the intended objective(s) of carrying out the Care Plan.", 0, java.lang.Integer.MAX_VALUE, goal)); - childrenList.add(new Property("activity", "Reference(ProcedureRequest|MedicationPrescription|DiagnosticOrder|ReferralRequest|CommunicationRequest|NutritionOrder)", "Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.", 0, java.lang.Integer.MAX_VALUE, activity)); - } - - public CarePlan2 copy() { - CarePlan2 dst = new CarePlan2(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - dst.status = status == null ? null : status.copy(); - dst.period = period == null ? null : period.copy(); - dst.modified = modified == null ? null : modified.copy(); - if (concern != null) { - dst.concern = new ArrayList(); - for (Reference i : concern) - dst.concern.add(i.copy()); - }; - if (participant != null) { - dst.participant = new ArrayList(); - for (CarePlan2ParticipantComponent i : participant) - dst.participant.add(i.copy()); - }; - dst.notes = notes == null ? null : notes.copy(); - if (goal != null) { - dst.goal = new ArrayList(); - for (Reference i : goal) - dst.goal.add(i.copy()); - }; - if (activity != null) { - dst.activity = new ArrayList(); - for (Reference i : activity) - dst.activity.add(i.copy()); - }; - return dst; - } - - protected CarePlan2 typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CarePlan2)) - return false; - CarePlan2 o = (CarePlan2) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(status, o.status, true) - && compareDeep(period, o.period, true) && compareDeep(modified, o.modified, true) && compareDeep(concern, o.concern, true) - && compareDeep(participant, o.participant, true) && compareDeep(notes, o.notes, true) && compareDeep(goal, o.goal, true) - && compareDeep(activity, o.activity, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CarePlan2)) - return false; - CarePlan2 o = (CarePlan2) other; - return compareValues(status, o.status, true) && compareValues(modified, o.modified, true) && compareValues(notes, o.notes, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) && (modified == null || modified.isEmpty()) - && (concern == null || concern.isEmpty()) && (participant == null || participant.isEmpty()) - && (notes == null || notes.isEmpty()) && (goal == null || goal.isEmpty()) && (activity == null || activity.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.CarePlan2; - } - - @SearchParamDefinition(name = "date", path = "CarePlan2.period", description = "Time period plan covers", type = "date") - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="condition", path="CarePlan2.concern", description="Health issues this plan addresses", type="reference" ) - public static final String SP_CONDITION = "condition"; - @SearchParamDefinition(name = "patient", path = "CarePlan2.patient", description = "Who care plan is for", type = "reference") - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="participant", path="CarePlan2.participant.member", description="Who is involved", type="reference" ) - public static final String SP_PARTICIPANT = "participant"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Claim.java similarity index 80% rename from hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java rename to hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Claim.java index caec65bdc53..84dc2ecce2d 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OralHealthClaim.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Claim.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; @@ -43,8 +43,122 @@ import org.hl7.fhir.instance.model.annotations.Description; /** * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. */ -@ResourceDef(name="OralHealthClaim", profile="http://hl7.org/fhir/Profile/OralHealthClaim") -public class OralHealthClaim extends DomainResource { +@ResourceDef(name="Claim", profile="http://hl7.org/fhir/Profile/Claim") +public class Claim extends DomainResource { + + public enum TypeLink { + /** + * A claim for Institution based, typically in-patient, goods and services. + */ + INSTITUTIONAL, + /** + * A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services. + */ + ORAL, + /** + * A claim for Pharmacy based goods and services. + */ + PHARMACY, + /** + * A claim for Professional, typically out-patient, goods and services. + */ + PROFESSIONAL, + /** + * A claim for Vision (Opthamologist, Optometrist and Optician) goods and services. + */ + VISION, + /** + * added to help the parsers + */ + NULL; + public static TypeLink fromCode(String codeString) throws Exception { + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return INSTITUTIONAL; + if ("oral".equals(codeString)) + return ORAL; + if ("pharmacy".equals(codeString)) + return PHARMACY; + if ("professional".equals(codeString)) + return PROFESSIONAL; + if ("vision".equals(codeString)) + return VISION; + throw new Exception("Unknown TypeLink code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INSTITUTIONAL: return "institutional"; + case ORAL: return "oral"; + case PHARMACY: return "pharmacy"; + case PROFESSIONAL: return "professional"; + case VISION: return "vision"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INSTITUTIONAL: return ""; + case ORAL: return ""; + case PHARMACY: return ""; + case PROFESSIONAL: return ""; + case VISION: return ""; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INSTITUTIONAL: return "A claim for Institution based, typically in-patient, goods and services."; + case ORAL: return "A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services."; + case PHARMACY: return "A claim for Pharmacy based goods and services."; + case PROFESSIONAL: return "A claim for Professional, typically out-patient, goods and services."; + case VISION: return "A claim for Vision (Opthamologist, Optometrist and Optician) goods and services."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INSTITUTIONAL: return "Institutional"; + case ORAL: return "Oral Health"; + case PHARMACY: return "Pharmacy"; + case PROFESSIONAL: return "Professional"; + case VISION: return "Vision"; + default: return "?"; + } + } + } + + public static class TypeLinkEnumFactory implements EnumFactory { + public TypeLink fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("institutional".equals(codeString)) + return TypeLink.INSTITUTIONAL; + if ("oral".equals(codeString)) + return TypeLink.ORAL; + if ("pharmacy".equals(codeString)) + return TypeLink.PHARMACY; + if ("professional".equals(codeString)) + return TypeLink.PROFESSIONAL; + if ("vision".equals(codeString)) + return TypeLink.VISION; + throw new IllegalArgumentException("Unknown TypeLink code '"+codeString+"'"); + } + public String toCode(TypeLink code) { + if (code == TypeLink.INSTITUTIONAL) + return "institutional"; + if (code == TypeLink.ORAL) + return "oral"; + if (code == TypeLink.PHARMACY) + return "pharmacy"; + if (code == TypeLink.PROFESSIONAL) + return "professional"; + if (code == TypeLink.VISION) + return "vision"; + return "?"; + } + } public enum UseLink { /** @@ -109,10 +223,10 @@ public class OralHealthClaim extends DomainResource { } public String getDisplay() { switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; + case COMPLETE: return "Complete"; + case PROPOSED: return "Proposed"; + case EXPLORATORY: return "Exploratory"; + case OTHER: return "Other"; default: return "?"; } } @@ -151,14 +265,14 @@ public class OralHealthClaim extends DomainResource { /** * Party to be reimbursed: Subscriber, provider, other. */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) + @Child(name ="type", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) protected Coding type; /** * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) + @Child(name ="provider", type={Practitioner.class}, order=2, min=0, max=1) @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) protected Reference provider; @@ -170,7 +284,7 @@ public class OralHealthClaim extends DomainResource { /** * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) + @Child(name ="organization", type={Organization.class}, order=3, min=0, max=1) @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) protected Reference organization; @@ -182,7 +296,7 @@ public class OralHealthClaim extends DomainResource { /** * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) + @Child(name ="person", type={Patient.class}, order=4, min=0, max=1) @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) protected Reference person; @@ -403,40 +517,40 @@ public class OralHealthClaim extends DomainResource { @Block() public static class DiagnosisComponent extends BackboneElement { /** - * Sequence of diagnosis. + * Sequence of diagnosis which serves to order and provide a link. */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis." ) - protected IntegerType sequence; + @Child(name ="sequence", type={PositiveIntType.class}, order=1, min=1, max=1) + @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) + protected PositiveIntType sequence; /** * The diagnosis. */ - @Child(name="diagnosis", type={Coding.class}, order=2, min=1, max=1) + @Child(name ="diagnosis", type={Coding.class}, order=2, min=1, max=1) @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) protected Coding diagnosis; - private static final long serialVersionUID = -935927954L; + private static final long serialVersionUID = -795010186L; public DiagnosisComponent() { super(); } - public DiagnosisComponent(IntegerType sequence, Coding diagnosis) { + public DiagnosisComponent(PositiveIntType sequence, Coding diagnosis) { super(); this.sequence = sequence; this.diagnosis = diagnosis; } /** - * @return {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + * @return {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public IntegerType getSequenceElement() { + public PositiveIntType getSequenceElement() { if (this.sequence == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb + this.sequence = new PositiveIntType(); // bb return this.sequence; } @@ -449,26 +563,26 @@ public class OralHealthClaim extends DomainResource { } /** - * @param value {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + * @param value {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public DiagnosisComponent setSequenceElement(IntegerType value) { + public DiagnosisComponent setSequenceElement(PositiveIntType value) { this.sequence = value; return this; } /** - * @return Sequence of diagnosis. + * @return Sequence of diagnosis which serves to order and provide a link. */ public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); } /** - * @param value Sequence of diagnosis. + * @param value Sequence of diagnosis which serves to order and provide a link. */ public DiagnosisComponent setSequence(int value) { if (this.sequence == null) - this.sequence = new IntegerType(); + this.sequence = new PositiveIntType(); this.sequence.setValue(value); return this; } @@ -499,7 +613,7 @@ public class OralHealthClaim extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "Sequence of diagnosis.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("sequence", "positiveInt", "Sequence of diagnosis which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); } @@ -543,21 +657,21 @@ public class OralHealthClaim extends DomainResource { /** * A service line item. */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) + @Child(name ="sequence", type={PositiveIntType.class}, order=1, min=1, max=1) @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) - protected IntegerType sequence; + protected PositiveIntType sequence; /** * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) + @Child(name ="focal", type={BooleanType.class}, order=2, min=1, max=1) @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) protected BooleanType focal; /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) + @Child(name ="coverage", type={Coverage.class}, order=3, min=1, max=1) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) protected Reference coverage; @@ -569,28 +683,28 @@ public class OralHealthClaim extends DomainResource { /** * The contract number of a business agreement which describes the terms and conditions. */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) + @Child(name ="businessArrangement", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) protected StringType businessArrangement; /** * The relationship of the patient to the subscriber. */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) + @Child(name ="relationship", type={Coding.class}, order=5, min=1, max=1) @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) protected Coding relationship; /** * A list of references from the Insurer to which these services pertain. */ - @Child(name="preauthref", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="preAuthRef", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) - protected List preauthref; + protected List preAuthRef; /** * The Coverages adjudication details. */ - @Child(name="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) + @Child(name ="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) protected Reference claimResponse; @@ -602,17 +716,17 @@ public class OralHealthClaim extends DomainResource { /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name="originalRuleset", type={Coding.class}, order=8, min=0, max=1) + @Child(name ="originalRuleset", type={Coding.class}, order=8, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; - private static final long serialVersionUID = 450222500L; + private static final long serialVersionUID = 621250924L; public CoverageComponent() { super(); } - public CoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { + public CoverageComponent(PositiveIntType sequence, BooleanType focal, Reference coverage, Coding relationship) { super(); this.sequence = sequence; this.focal = focal; @@ -623,12 +737,12 @@ public class OralHealthClaim extends DomainResource { /** * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public IntegerType getSequenceElement() { + public PositiveIntType getSequenceElement() { if (this.sequence == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create CoverageComponent.sequence"); else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb + this.sequence = new PositiveIntType(); // bb return this.sequence; } @@ -643,7 +757,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public CoverageComponent setSequenceElement(IntegerType value) { + public CoverageComponent setSequenceElement(PositiveIntType value) { this.sequence = value; return this; } @@ -652,7 +766,7 @@ public class OralHealthClaim extends DomainResource { * @return A service line item. */ public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); } /** @@ -660,7 +774,7 @@ public class OralHealthClaim extends DomainResource { */ public CoverageComponent setSequence(int value) { if (this.sequence == null) - this.sequence = new IntegerType(); + this.sequence = new PositiveIntType(); this.sequence.setValue(value); return this; } @@ -697,7 +811,7 @@ public class OralHealthClaim extends DomainResource { * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. */ public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); + return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); } /** @@ -828,54 +942,54 @@ public class OralHealthClaim extends DomainResource { } /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ - public List getPreauthref() { - if (this.preauthref == null) - this.preauthref = new ArrayList(); - return this.preauthref; + public List getPreAuthRef() { + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + return this.preAuthRef; } - public boolean hasPreauthref() { - if (this.preauthref == null) + public boolean hasPreAuthRef() { + if (this.preAuthRef == null) return false; - for (StringType item : this.preauthref) + for (StringType item : this.preAuthRef) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) + * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ // syntactic sugar - public StringType addPreauthrefElement() {//2 + public StringType addPreAuthRefElement() {//2 StringType t = new StringType(); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); return t; } /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ - public CoverageComponent addPreauthref(String value) { //1 + public CoverageComponent addPreAuthRef(String value) { //1 StringType t = new StringType(); t.setValue(value); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); + if (this.preAuthRef == null) + this.preAuthRef = new ArrayList(); + this.preAuthRef.add(t); return this; } /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) + * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ - public boolean hasPreauthref(String value) { - if (this.preauthref == null) + public boolean hasPreAuthRef(String value) { + if (this.preAuthRef == null) return false; - for (StringType v : this.preauthref) + for (StringType v : this.preAuthRef) if (v.equals(value)) // string return true; return false; @@ -951,12 +1065,12 @@ public class OralHealthClaim extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("preauthref", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preauthref)); + childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); } @@ -969,10 +1083,10 @@ public class OralHealthClaim extends DomainResource { dst.coverage = coverage == null ? null : coverage.copy(); dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); dst.relationship = relationship == null ? null : relationship.copy(); - if (preauthref != null) { - dst.preauthref = new ArrayList(); - for (StringType i : preauthref) - dst.preauthref.add(i.copy()); + if (preAuthRef != null) { + dst.preAuthRef = new ArrayList(); + for (StringType i : preAuthRef) + dst.preAuthRef.add(i.copy()); }; dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); @@ -988,7 +1102,7 @@ public class OralHealthClaim extends DomainResource { CoverageComponent o = (CoverageComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preauthref, o.preauthref, true) && compareDeep(claimResponse, o.claimResponse, true) + && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) && compareDeep(originalRuleset, o.originalRuleset, true); } @@ -1000,541 +1114,17 @@ public class OralHealthClaim extends DomainResource { return false; CoverageComponent o = (CoverageComponent) other; return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - && compareValues(preauthref, o.preauthref, true); + && compareValues(preAuthRef, o.preAuthRef, true); } public boolean isEmpty() { return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preauthref == null || preauthref.isEmpty()) + && (relationship == null || relationship.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty()) && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) ; } - } - - @Block() - public static class MissingTeethComponent extends BackboneElement { - /** - * The code identifying which tooth is missing. - */ - @Child(name="tooth", type={Coding.class}, order=1, min=1, max=1) - @Description(shortDefinition="Tooth Code", formalDefinition="The code identifying which tooth is missing." ) - protected Coding tooth; - - /** - * Missing reason may be: E-extraction, O-other. - */ - @Child(name="reason", type={Coding.class}, order=2, min=0, max=1) - @Description(shortDefinition="Reason for missing", formalDefinition="Missing reason may be: E-extraction, O-other." ) - protected Coding reason; - - /** - * The date of the extraction either known from records or patient reported estimate. - */ - @Child(name="extractiondate", type={DateType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Date of Extraction", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) - protected DateType extractiondate; - - private static final long serialVersionUID = -1311739967L; - - public MissingTeethComponent() { - super(); - } - - public MissingTeethComponent(Coding tooth) { - super(); - this.tooth = tooth; - } - - /** - * @return {@link #tooth} (The code identifying which tooth is missing.) - */ - public Coding getTooth() { - if (this.tooth == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MissingTeethComponent.tooth"); - else if (Configuration.doAutoCreate()) - this.tooth = new Coding(); // cc - return this.tooth; - } - - public boolean hasTooth() { - return this.tooth != null && !this.tooth.isEmpty(); - } - - /** - * @param value {@link #tooth} (The code identifying which tooth is missing.) - */ - public MissingTeethComponent setTooth(Coding value) { - this.tooth = value; - return this; - } - - /** - * @return {@link #reason} (Missing reason may be: E-extraction, O-other.) - */ - public Coding getReason() { - if (this.reason == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MissingTeethComponent.reason"); - else if (Configuration.doAutoCreate()) - this.reason = new Coding(); // cc - return this.reason; - } - - public boolean hasReason() { - return this.reason != null && !this.reason.isEmpty(); - } - - /** - * @param value {@link #reason} (Missing reason may be: E-extraction, O-other.) - */ - public MissingTeethComponent setReason(Coding value) { - this.reason = value; - return this; - } - - /** - * @return {@link #extractiondate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractiondate" gives direct access to the value - */ - public DateType getExtractiondateElement() { - if (this.extractiondate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MissingTeethComponent.extractiondate"); - else if (Configuration.doAutoCreate()) - this.extractiondate = new DateType(); // bb - return this.extractiondate; - } - - public boolean hasExtractiondateElement() { - return this.extractiondate != null && !this.extractiondate.isEmpty(); - } - - public boolean hasExtractiondate() { - return this.extractiondate != null && !this.extractiondate.isEmpty(); - } - - /** - * @param value {@link #extractiondate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractiondate" gives direct access to the value - */ - public MissingTeethComponent setExtractiondateElement(DateType value) { - this.extractiondate = value; - return this; - } - - /** - * @return The date of the extraction either known from records or patient reported estimate. - */ - public Date getExtractiondate() { - return this.extractiondate == null ? null : this.extractiondate.getValue(); - } - - /** - * @param value The date of the extraction either known from records or patient reported estimate. - */ - public MissingTeethComponent setExtractiondate(Date value) { - if (value == null) - this.extractiondate = null; - else { - if (this.extractiondate == null) - this.extractiondate = new DateType(); - this.extractiondate.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("tooth", "Coding", "The code identifying which tooth is missing.", 0, java.lang.Integer.MAX_VALUE, tooth)); - childrenList.add(new Property("reason", "Coding", "Missing reason may be: E-extraction, O-other.", 0, java.lang.Integer.MAX_VALUE, reason)); - childrenList.add(new Property("extractiondate", "date", "The date of the extraction either known from records or patient reported estimate.", 0, java.lang.Integer.MAX_VALUE, extractiondate)); - } - - public MissingTeethComponent copy() { - MissingTeethComponent dst = new MissingTeethComponent(); - copyValues(dst); - dst.tooth = tooth == null ? null : tooth.copy(); - dst.reason = reason == null ? null : reason.copy(); - dst.extractiondate = extractiondate == null ? null : extractiondate.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof MissingTeethComponent)) - return false; - MissingTeethComponent o = (MissingTeethComponent) other; - return compareDeep(tooth, o.tooth, true) && compareDeep(reason, o.reason, true) && compareDeep(extractiondate, o.extractiondate, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof MissingTeethComponent)) - return false; - MissingTeethComponent o = (MissingTeethComponent) other; - return compareValues(extractiondate, o.extractiondate, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) - && (extractiondate == null || extractiondate.isEmpty()); - } - - } - - @Block() - public static class OrthodonticPlanComponent extends BackboneElement { - /** - * The intended start date for service. - */ - @Child(name="start", type={DateType.class}, order=1, min=0, max=1) - @Description(shortDefinition="Start date", formalDefinition="The intended start date for service." ) - protected DateType start; - - /** - * The estimated first examination fee. - */ - @Child(name="examFee", type={Money.class}, order=2, min=0, max=1) - @Description(shortDefinition="First exam fee", formalDefinition="The estimated first examination fee." ) - protected Money examFee; - - /** - * The estimated diagnostic fee. - */ - @Child(name="diagnosticFee", type={Money.class}, order=3, min=0, max=1) - @Description(shortDefinition="Diagnostic phase fee", formalDefinition="The estimated diagnostic fee." ) - protected Money diagnosticFee; - - /** - * The estimated initial payment. - */ - @Child(name="initialPayment", type={Money.class}, order=4, min=0, max=1) - @Description(shortDefinition="Initial payment", formalDefinition="The estimated initial payment." ) - protected Money initialPayment; - - /** - * The estimated treatment duration in months. - */ - @Child(name="durationMonths", type={IntegerType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Duration in months", formalDefinition="The estimated treatment duration in months." ) - protected IntegerType durationMonths; - - /** - * The anticipated number of payments. - */ - @Child(name="paymentCount", type={IntegerType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Anticipated number of payments", formalDefinition="The anticipated number of payments." ) - protected IntegerType paymentCount; - - /** - * The anticipated payment amount. - */ - @Child(name="periodicPayment", type={Money.class}, order=7, min=0, max=1) - @Description(shortDefinition="Anticipated payment", formalDefinition="The anticipated payment amount." ) - protected Money periodicPayment; - - private static final long serialVersionUID = 1892827159L; - - public OrthodonticPlanComponent() { - super(); - } - - /** - * @return {@link #start} (The intended start date for service.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public DateType getStartElement() { - if (this.start == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.start"); - else if (Configuration.doAutoCreate()) - this.start = new DateType(); // 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} (The intended start date for service.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public OrthodonticPlanComponent setStartElement(DateType value) { - this.start = value; - return this; - } - - /** - * @return The intended start date for service. - */ - public Date getStart() { - return this.start == null ? null : this.start.getValue(); - } - - /** - * @param value The intended start date for service. - */ - public OrthodonticPlanComponent setStart(Date value) { - if (value == null) - this.start = null; - else { - if (this.start == null) - this.start = new DateType(); - this.start.setValue(value); - } - return this; - } - - /** - * @return {@link #examFee} (The estimated first examination fee.) - */ - public Money getExamFee() { - if (this.examFee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.examFee"); - else if (Configuration.doAutoCreate()) - this.examFee = new Money(); // cc - return this.examFee; - } - - public boolean hasExamFee() { - return this.examFee != null && !this.examFee.isEmpty(); - } - - /** - * @param value {@link #examFee} (The estimated first examination fee.) - */ - public OrthodonticPlanComponent setExamFee(Money value) { - this.examFee = value; - return this; - } - - /** - * @return {@link #diagnosticFee} (The estimated diagnostic fee.) - */ - public Money getDiagnosticFee() { - if (this.diagnosticFee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.diagnosticFee"); - else if (Configuration.doAutoCreate()) - this.diagnosticFee = new Money(); // cc - return this.diagnosticFee; - } - - public boolean hasDiagnosticFee() { - return this.diagnosticFee != null && !this.diagnosticFee.isEmpty(); - } - - /** - * @param value {@link #diagnosticFee} (The estimated diagnostic fee.) - */ - public OrthodonticPlanComponent setDiagnosticFee(Money value) { - this.diagnosticFee = value; - return this; - } - - /** - * @return {@link #initialPayment} (The estimated initial payment.) - */ - public Money getInitialPayment() { - if (this.initialPayment == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.initialPayment"); - else if (Configuration.doAutoCreate()) - this.initialPayment = new Money(); // cc - return this.initialPayment; - } - - public boolean hasInitialPayment() { - return this.initialPayment != null && !this.initialPayment.isEmpty(); - } - - /** - * @param value {@link #initialPayment} (The estimated initial payment.) - */ - public OrthodonticPlanComponent setInitialPayment(Money value) { - this.initialPayment = value; - return this; - } - - /** - * @return {@link #durationMonths} (The estimated treatment duration in months.). This is the underlying object with id, value and extensions. The accessor "getDurationMonths" gives direct access to the value - */ - public IntegerType getDurationMonthsElement() { - if (this.durationMonths == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.durationMonths"); - else if (Configuration.doAutoCreate()) - this.durationMonths = new IntegerType(); // bb - return this.durationMonths; - } - - public boolean hasDurationMonthsElement() { - return this.durationMonths != null && !this.durationMonths.isEmpty(); - } - - public boolean hasDurationMonths() { - return this.durationMonths != null && !this.durationMonths.isEmpty(); - } - - /** - * @param value {@link #durationMonths} (The estimated treatment duration in months.). This is the underlying object with id, value and extensions. The accessor "getDurationMonths" gives direct access to the value - */ - public OrthodonticPlanComponent setDurationMonthsElement(IntegerType value) { - this.durationMonths = value; - return this; - } - - /** - * @return The estimated treatment duration in months. - */ - public int getDurationMonths() { - return this.durationMonths == null ? 0 : this.durationMonths.getValue(); - } - - /** - * @param value The estimated treatment duration in months. - */ - public OrthodonticPlanComponent setDurationMonths(int value) { - if (this.durationMonths == null) - this.durationMonths = new IntegerType(); - this.durationMonths.setValue(value); - return this; - } - - /** - * @return {@link #paymentCount} (The anticipated number of payments.). This is the underlying object with id, value and extensions. The accessor "getPaymentCount" gives direct access to the value - */ - public IntegerType getPaymentCountElement() { - if (this.paymentCount == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.paymentCount"); - else if (Configuration.doAutoCreate()) - this.paymentCount = new IntegerType(); // bb - return this.paymentCount; - } - - public boolean hasPaymentCountElement() { - return this.paymentCount != null && !this.paymentCount.isEmpty(); - } - - public boolean hasPaymentCount() { - return this.paymentCount != null && !this.paymentCount.isEmpty(); - } - - /** - * @param value {@link #paymentCount} (The anticipated number of payments.). This is the underlying object with id, value and extensions. The accessor "getPaymentCount" gives direct access to the value - */ - public OrthodonticPlanComponent setPaymentCountElement(IntegerType value) { - this.paymentCount = value; - return this; - } - - /** - * @return The anticipated number of payments. - */ - public int getPaymentCount() { - return this.paymentCount == null ? 0 : this.paymentCount.getValue(); - } - - /** - * @param value The anticipated number of payments. - */ - public OrthodonticPlanComponent setPaymentCount(int value) { - if (this.paymentCount == null) - this.paymentCount = new IntegerType(); - this.paymentCount.setValue(value); - return this; - } - - /** - * @return {@link #periodicPayment} (The anticipated payment amount.) - */ - public Money getPeriodicPayment() { - if (this.periodicPayment == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrthodonticPlanComponent.periodicPayment"); - else if (Configuration.doAutoCreate()) - this.periodicPayment = new Money(); // cc - return this.periodicPayment; - } - - public boolean hasPeriodicPayment() { - return this.periodicPayment != null && !this.periodicPayment.isEmpty(); - } - - /** - * @param value {@link #periodicPayment} (The anticipated payment amount.) - */ - public OrthodonticPlanComponent setPeriodicPayment(Money value) { - this.periodicPayment = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("start", "date", "The intended start date for service.", 0, java.lang.Integer.MAX_VALUE, start)); - childrenList.add(new Property("examFee", "Money", "The estimated first examination fee.", 0, java.lang.Integer.MAX_VALUE, examFee)); - childrenList.add(new Property("diagnosticFee", "Money", "The estimated diagnostic fee.", 0, java.lang.Integer.MAX_VALUE, diagnosticFee)); - childrenList.add(new Property("initialPayment", "Money", "The estimated initial payment.", 0, java.lang.Integer.MAX_VALUE, initialPayment)); - childrenList.add(new Property("durationMonths", "integer", "The estimated treatment duration in months.", 0, java.lang.Integer.MAX_VALUE, durationMonths)); - childrenList.add(new Property("paymentCount", "integer", "The anticipated number of payments.", 0, java.lang.Integer.MAX_VALUE, paymentCount)); - childrenList.add(new Property("periodicPayment", "Money", "The anticipated payment amount.", 0, java.lang.Integer.MAX_VALUE, periodicPayment)); - } - - public OrthodonticPlanComponent copy() { - OrthodonticPlanComponent dst = new OrthodonticPlanComponent(); - copyValues(dst); - dst.start = start == null ? null : start.copy(); - dst.examFee = examFee == null ? null : examFee.copy(); - dst.diagnosticFee = diagnosticFee == null ? null : diagnosticFee.copy(); - dst.initialPayment = initialPayment == null ? null : initialPayment.copy(); - dst.durationMonths = durationMonths == null ? null : durationMonths.copy(); - dst.paymentCount = paymentCount == null ? null : paymentCount.copy(); - dst.periodicPayment = periodicPayment == null ? null : periodicPayment.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof OrthodonticPlanComponent)) - return false; - OrthodonticPlanComponent o = (OrthodonticPlanComponent) other; - return compareDeep(start, o.start, true) && compareDeep(examFee, o.examFee, true) && compareDeep(diagnosticFee, o.diagnosticFee, true) - && compareDeep(initialPayment, o.initialPayment, true) && compareDeep(durationMonths, o.durationMonths, true) - && compareDeep(paymentCount, o.paymentCount, true) && compareDeep(periodicPayment, o.periodicPayment, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof OrthodonticPlanComponent)) - return false; - OrthodonticPlanComponent o = (OrthodonticPlanComponent) other; - return compareValues(start, o.start, true) && compareValues(durationMonths, o.durationMonths, true) - && compareValues(paymentCount, o.paymentCount, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (start == null || start.isEmpty()) && (examFee == null || examFee.isEmpty()) - && (diagnosticFee == null || diagnosticFee.isEmpty()) && (initialPayment == null || initialPayment.isEmpty()) - && (durationMonths == null || durationMonths.isEmpty()) && (paymentCount == null || paymentCount.isEmpty()) - && (periodicPayment == null || periodicPayment.isEmpty()); - } - } @Block() @@ -1542,21 +1132,21 @@ public class OralHealthClaim extends DomainResource { /** * A service line number. */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) + @Child(name ="sequence", type={PositiveIntType.class}, order=1, min=1, max=1) @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; + protected PositiveIntType sequence; /** * The type of product or service. */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) + @Child(name ="type", type={Coding.class}, order=2, min=1, max=1) @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) protected Coding type; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name="provider", type={Practitioner.class}, order=3, min=0, max=1) + @Child(name ="provider", type={Practitioner.class}, order=3, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference provider; @@ -1568,108 +1158,108 @@ public class OralHealthClaim extends DomainResource { /** * Diagnosis applicable for this service or product line. */ - @Child(name="diagnosisLinkId", type={IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="diagnosisLinkId", type={PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) - protected List diagnosisLinkId; + protected List diagnosisLinkId; /** * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. */ - @Child(name="service", type={Coding.class}, order=5, min=1, max=1) + @Child(name ="service", type={Coding.class}, order=5, min=1, max=1) @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name="serviceDate", type={DateType.class}, order=6, min=0, max=1) + @Child(name ="serviceDate", type={DateType.class}, order=6, min=0, max=1) @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateType serviceDate; /** * The number of repetitions of a service or product. */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) + @Child(name ="quantity", type={Quantity.class}, order=7, min=0, max=1) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected Quantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) + @Child(name ="unitPrice", type={Money.class}, order=8, min=0, max=1) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) + @Child(name ="factor", type={DecimalType.class}, order=9, min=0, max=1) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) + @Child(name ="points", type={DecimalType.class}, order=10, min=0, max=1) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) + @Child(name ="net", type={Money.class}, order=11, min=0, max=1) @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name="udi", type={Coding.class}, order=12, min=0, max=1) + @Child(name ="udi", type={Coding.class}, order=12, min=0, max=1) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) protected Coding udi; /** * Physical service site on the patient (limb, tooth, etc). */ - @Child(name="bodySite", type={Coding.class}, order=13, min=0, max=1) + @Child(name ="bodySite", type={Coding.class}, order=13, min=0, max=1) @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) protected Coding bodySite; /** * A region or surface of the site, eg. limb region or tooth surface(s). */ - @Child(name="subsite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="subSite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) - protected List subsite; + protected List subSite; /** * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. */ - @Child(name="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) protected List modifier; /** * Second tier of goods and services. */ - @Child(name="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) protected List detail; /** * The materials and placement date of prior fixed prosthesis. */ - @Child(name="prosthesis", type={}, order=17, min=0, max=1) + @Child(name ="prosthesis", type={}, order=17, min=0, max=1) @Description(shortDefinition="Prosthetic details", formalDefinition="The materials and placement date of prior fixed prosthesis." ) protected ProsthesisComponent prosthesis; - private static final long serialVersionUID = 1518140870L; + private static final long serialVersionUID = -311028698L; public ItemsComponent() { super(); } - public ItemsComponent(IntegerType sequence, Coding type, Coding service) { + public ItemsComponent(PositiveIntType sequence, Coding type, Coding service) { super(); this.sequence = sequence; this.type = type; @@ -1679,12 +1269,12 @@ public class OralHealthClaim extends DomainResource { /** * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public IntegerType getSequenceElement() { + public PositiveIntType getSequenceElement() { if (this.sequence == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ItemsComponent.sequence"); else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb + this.sequence = new PositiveIntType(); // bb return this.sequence; } @@ -1699,7 +1289,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public ItemsComponent setSequenceElement(IntegerType value) { + public ItemsComponent setSequenceElement(PositiveIntType value) { this.sequence = value; return this; } @@ -1708,7 +1298,7 @@ public class OralHealthClaim extends DomainResource { * @return A service line number. */ public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); } /** @@ -1716,7 +1306,7 @@ public class OralHealthClaim extends DomainResource { */ public ItemsComponent setSequence(int value) { if (this.sequence == null) - this.sequence = new IntegerType(); + this.sequence = new PositiveIntType(); this.sequence.setValue(value); return this; } @@ -1792,16 +1382,16 @@ public class OralHealthClaim extends DomainResource { /** * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) */ - public List getDiagnosisLinkId() { + public List getDiagnosisLinkId() { if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); + this.diagnosisLinkId = new ArrayList(); return this.diagnosisLinkId; } public boolean hasDiagnosisLinkId() { if (this.diagnosisLinkId == null) return false; - for (IntegerType item : this.diagnosisLinkId) + for (PositiveIntType item : this.diagnosisLinkId) if (!item.isEmpty()) return true; return false; @@ -1811,10 +1401,10 @@ public class OralHealthClaim extends DomainResource { * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) */ // syntactic sugar - public IntegerType addDiagnosisLinkIdElement() {//2 - IntegerType t = new IntegerType(); + public PositiveIntType addDiagnosisLinkIdElement() {//2 + PositiveIntType t = new PositiveIntType(); if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); + this.diagnosisLinkId = new ArrayList(); this.diagnosisLinkId.add(t); return t; } @@ -1823,10 +1413,10 @@ public class OralHealthClaim extends DomainResource { * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) */ public ItemsComponent addDiagnosisLinkId(int value) { //1 - IntegerType t = new IntegerType(); + PositiveIntType t = new PositiveIntType(); t.setValue(value); if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); + this.diagnosisLinkId = new ArrayList(); this.diagnosisLinkId.add(t); return this; } @@ -1837,8 +1427,8 @@ public class OralHealthClaim extends DomainResource { public boolean hasDiagnosisLinkId(int value) { if (this.diagnosisLinkId == null) return false; - for (IntegerType v : this.diagnosisLinkId) - if (v.equals(value)) // integer + for (PositiveIntType v : this.diagnosisLinkId) + if (v.equals(value)) // positiveInt return true; return false; } @@ -2135,35 +1725,45 @@ public class OralHealthClaim extends DomainResource { } /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) + * @return {@link #subSite} (A region or surface of the site, eg. limb region or tooth surface(s).) */ - public List getSubsite() { - if (this.subsite == null) - this.subsite = new ArrayList(); - return this.subsite; + public List getSubSite() { + if (this.subSite == null) + this.subSite = new ArrayList(); + return this.subSite; } - public boolean hasSubsite() { - if (this.subsite == null) + public boolean hasSubSite() { + if (this.subSite == null) return false; - for (Coding item : this.subsite) + for (Coding item : this.subSite) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) + * @return {@link #subSite} (A region or surface of the site, eg. limb region or tooth surface(s).) */ // syntactic sugar - public Coding addSubsite() { //3 + public Coding addSubSite() { //3 Coding t = new Coding(); - if (this.subsite == null) - this.subsite = new ArrayList(); - this.subsite.add(t); + if (this.subSite == null) + this.subSite = new ArrayList(); + this.subSite.add(t); return t; } + // syntactic sugar + public ItemsComponent addSubSite(Coding t) { //3 + if (t == null) + return this; + if (this.subSite == null) + this.subSite = new ArrayList(); + this.subSite.add(t); + return this; + } + /** * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) */ @@ -2194,6 +1794,16 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public ItemsComponent addModifier(Coding t) { //3 + if (t == null) + return this; + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return this; + } + /** * @return {@link #detail} (Second tier of goods and services.) */ @@ -2224,6 +1834,16 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public ItemsComponent addDetail(DetailComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + /** * @return {@link #prosthesis} (The materials and placement date of prior fixed prosthesis.) */ @@ -2250,10 +1870,10 @@ public class OralHealthClaim extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("diagnosisLinkId", "integer", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); + childrenList.add(new Property("diagnosisLinkId", "positiveInt", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); @@ -2263,7 +1883,7 @@ public class OralHealthClaim extends DomainResource { childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); - childrenList.add(new Property("subsite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subsite)); + childrenList.add(new Property("subSite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("prosthesis", "", "The materials and placement date of prior fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, prosthesis)); @@ -2276,8 +1896,8 @@ public class OralHealthClaim extends DomainResource { dst.type = type == null ? null : type.copy(); dst.provider = provider == null ? null : provider.copy(); if (diagnosisLinkId != null) { - dst.diagnosisLinkId = new ArrayList(); - for (IntegerType i : diagnosisLinkId) + dst.diagnosisLinkId = new ArrayList(); + for (PositiveIntType i : diagnosisLinkId) dst.diagnosisLinkId.add(i.copy()); }; dst.service = service == null ? null : service.copy(); @@ -2289,10 +1909,10 @@ public class OralHealthClaim extends DomainResource { dst.net = net == null ? null : net.copy(); dst.udi = udi == null ? null : udi.copy(); dst.bodySite = bodySite == null ? null : bodySite.copy(); - if (subsite != null) { - dst.subsite = new ArrayList(); - for (Coding i : subsite) - dst.subsite.add(i.copy()); + if (subSite != null) { + dst.subSite = new ArrayList(); + for (Coding i : subSite) + dst.subSite.add(i.copy()); }; if (modifier != null) { dst.modifier = new ArrayList(); @@ -2319,7 +1939,7 @@ public class OralHealthClaim extends DomainResource { && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) - && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subsite, o.subsite, true) + && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subSite, o.subSite, true) && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true) && compareDeep(prosthesis, o.prosthesis, true) ; } @@ -2342,7 +1962,7 @@ public class OralHealthClaim extends DomainResource { && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subsite == null || subsite.isEmpty()) + && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subSite == null || subSite.isEmpty()) && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()) && (prosthesis == null || prosthesis.isEmpty()) ; } @@ -2354,80 +1974,80 @@ public class OralHealthClaim extends DomainResource { /** * A service line number. */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) + @Child(name ="sequence", type={PositiveIntType.class}, order=1, min=1, max=1) @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; + protected PositiveIntType sequence; /** * The type of product or service. */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) + @Child(name ="type", type={Coding.class}, order=2, min=1, max=1) @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) protected Coding type; /** * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) + @Child(name ="service", type={Coding.class}, order=3, min=1, max=1) @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; /** * The number of repetitions of a service or product. */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) + @Child(name ="quantity", type={Quantity.class}, order=4, min=0, max=1) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected Quantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) + @Child(name ="unitPrice", type={Money.class}, order=5, min=0, max=1) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) + @Child(name ="factor", type={DecimalType.class}, order=6, min=0, max=1) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) + @Child(name ="points", type={DecimalType.class}, order=7, min=0, max=1) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) + @Child(name ="net", type={Money.class}, order=8, min=0, max=1) @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) + @Child(name ="udi", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) protected Coding udi; /** * Third tier of goods and services. */ - @Child(name="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) protected List subDetail; - private static final long serialVersionUID = -342502025L; + private static final long serialVersionUID = -1641314433L; public DetailComponent() { super(); } - public DetailComponent(IntegerType sequence, Coding type, Coding service) { + public DetailComponent(PositiveIntType sequence, Coding type, Coding service) { super(); this.sequence = sequence; this.type = type; @@ -2437,12 +2057,12 @@ public class OralHealthClaim extends DomainResource { /** * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public IntegerType getSequenceElement() { + public PositiveIntType getSequenceElement() { if (this.sequence == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DetailComponent.sequence"); else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb + this.sequence = new PositiveIntType(); // bb return this.sequence; } @@ -2457,7 +2077,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public DetailComponent setSequenceElement(IntegerType value) { + public DetailComponent setSequenceElement(PositiveIntType value) { this.sequence = value; return this; } @@ -2466,7 +2086,7 @@ public class OralHealthClaim extends DomainResource { * @return A service line number. */ public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); } /** @@ -2474,7 +2094,7 @@ public class OralHealthClaim extends DomainResource { */ public DetailComponent setSequence(int value) { if (this.sequence == null) - this.sequence = new IntegerType(); + this.sequence = new PositiveIntType(); this.sequence.setValue(value); return this; } @@ -2751,9 +2371,19 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public DetailComponent addSubDetail(SubDetailComponent t) { //3 + if (t == null) + return this; + if (this.subDetail == null) + this.subDetail = new ArrayList(); + this.subDetail.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); @@ -2823,73 +2453,73 @@ public class OralHealthClaim extends DomainResource { /** * A service line number. */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) + @Child(name ="sequence", type={PositiveIntType.class}, order=1, min=1, max=1) @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; + protected PositiveIntType sequence; /** * The type of product or service. */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) + @Child(name ="type", type={Coding.class}, order=2, min=1, max=1) @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) protected Coding type; /** * The fee for an addittional service or product or charge. */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) + @Child(name ="service", type={Coding.class}, order=3, min=1, max=1) @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an addittional service or product or charge." ) protected Coding service; /** * The number of repetitions of a service or product. */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) + @Child(name ="quantity", type={Quantity.class}, order=4, min=0, max=1) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected Quantity quantity; /** * The fee for an addittional service or product or charge. */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) + @Child(name ="unitPrice", type={Money.class}, order=5, min=0, max=1) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an addittional service or product or charge." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) + @Child(name ="factor", type={DecimalType.class}, order=6, min=0, max=1) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) + @Child(name ="points", type={DecimalType.class}, order=7, min=0, max=1) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) + @Child(name ="net", type={Money.class}, order=8, min=0, max=1) @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) + @Child(name ="udi", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) protected Coding udi; - private static final long serialVersionUID = 122809194L; + private static final long serialVersionUID = -947666334L; public SubDetailComponent() { super(); } - public SubDetailComponent(IntegerType sequence, Coding type, Coding service) { + public SubDetailComponent(PositiveIntType sequence, Coding type, Coding service) { super(); this.sequence = sequence; this.type = type; @@ -2899,12 +2529,12 @@ public class OralHealthClaim extends DomainResource { /** * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public IntegerType getSequenceElement() { + public PositiveIntType getSequenceElement() { if (this.sequence == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SubDetailComponent.sequence"); else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb + this.sequence = new PositiveIntType(); // bb return this.sequence; } @@ -2919,7 +2549,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value */ - public SubDetailComponent setSequenceElement(IntegerType value) { + public SubDetailComponent setSequenceElement(PositiveIntType value) { this.sequence = value; return this; } @@ -2928,7 +2558,7 @@ public class OralHealthClaim extends DomainResource { * @return A service line number. */ public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); } /** @@ -2936,7 +2566,7 @@ public class OralHealthClaim extends DomainResource { */ public SubDetailComponent setSequence(int value) { if (this.sequence == null) - this.sequence = new IntegerType(); + this.sequence = new PositiveIntType(); this.sequence.setValue(value); return this; } @@ -3185,7 +2815,7 @@ public class OralHealthClaim extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); @@ -3249,21 +2879,21 @@ public class OralHealthClaim extends DomainResource { /** * Indicates whether this is the initial placement of a fixed prosthesis. */ - @Child(name="initial", type={BooleanType.class}, order=1, min=0, max=1) + @Child(name ="initial", type={BooleanType.class}, order=1, min=0, max=1) @Description(shortDefinition="Is this the initial service", formalDefinition="Indicates whether this is the initial placement of a fixed prosthesis." ) protected BooleanType initial; /** * Date of the initial placement. */ - @Child(name="priorDate", type={DateType.class}, order=2, min=0, max=1) + @Child(name ="priorDate", type={DateType.class}, order=2, min=0, max=1) @Description(shortDefinition="Initial service Date", formalDefinition="Date of the initial placement." ) protected DateType priorDate; /** * Material of the prior denture or bridge prosthesis. (Oral). */ - @Child(name="priorMaterial", type={Coding.class}, order=3, min=0, max=1) + @Child(name ="priorMaterial", type={Coding.class}, order=3, min=0, max=1) @Description(shortDefinition="Prosthetic Material", formalDefinition="Material of the prior denture or bridge prosthesis. (Oral)." ) protected Coding priorMaterial; @@ -3305,7 +2935,7 @@ public class OralHealthClaim extends DomainResource { * @return Indicates whether this is the initial placement of a fixed prosthesis. */ public boolean getInitial() { - return this.initial == null ? false : this.initial.getValue(); + return this.initial == null || this.initial.isEmpty() ? false : this.initial.getValue(); } /** @@ -3435,38 +3065,220 @@ public class OralHealthClaim extends DomainResource { } + @Block() + public static class MissingTeethComponent extends BackboneElement { + /** + * The code identifying which tooth is missing. + */ + @Child(name ="tooth", type={Coding.class}, order=1, min=1, max=1) + @Description(shortDefinition="Tooth Code", formalDefinition="The code identifying which tooth is missing." ) + protected Coding tooth; + + /** + * Missing reason may be: E-extraction, O-other. + */ + @Child(name ="reason", type={Coding.class}, order=2, min=0, max=1) + @Description(shortDefinition="Reason for missing", formalDefinition="Missing reason may be: E-extraction, O-other." ) + protected Coding reason; + + /** + * The date of the extraction either known from records or patient reported estimate. + */ + @Child(name ="extractionDate", type={DateType.class}, order=3, min=0, max=1) + @Description(shortDefinition="Date of Extraction", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) + protected DateType extractionDate; + + private static final long serialVersionUID = 352913313L; + + public MissingTeethComponent() { + super(); + } + + public MissingTeethComponent(Coding tooth) { + super(); + this.tooth = tooth; + } + + /** + * @return {@link #tooth} (The code identifying which tooth is missing.) + */ + public Coding getTooth() { + if (this.tooth == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.tooth"); + else if (Configuration.doAutoCreate()) + this.tooth = new Coding(); // cc + return this.tooth; + } + + public boolean hasTooth() { + return this.tooth != null && !this.tooth.isEmpty(); + } + + /** + * @param value {@link #tooth} (The code identifying which tooth is missing.) + */ + public MissingTeethComponent setTooth(Coding value) { + this.tooth = value; + return this; + } + + /** + * @return {@link #reason} (Missing reason may be: E-extraction, O-other.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Missing reason may be: E-extraction, O-other.) + */ + public MissingTeethComponent setReason(Coding value) { + this.reason = value; + return this; + } + + /** + * @return {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value + */ + public DateType getExtractionDateElement() { + if (this.extractionDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MissingTeethComponent.extractionDate"); + else if (Configuration.doAutoCreate()) + this.extractionDate = new DateType(); // bb + return this.extractionDate; + } + + public boolean hasExtractionDateElement() { + return this.extractionDate != null && !this.extractionDate.isEmpty(); + } + + public boolean hasExtractionDate() { + return this.extractionDate != null && !this.extractionDate.isEmpty(); + } + + /** + * @param value {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value + */ + public MissingTeethComponent setExtractionDateElement(DateType value) { + this.extractionDate = value; + return this; + } + + /** + * @return The date of the extraction either known from records or patient reported estimate. + */ + public Date getExtractionDate() { + return this.extractionDate == null ? null : this.extractionDate.getValue(); + } + + /** + * @param value The date of the extraction either known from records or patient reported estimate. + */ + public MissingTeethComponent setExtractionDate(Date value) { + if (value == null) + this.extractionDate = null; + else { + if (this.extractionDate == null) + this.extractionDate = new DateType(); + this.extractionDate.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("tooth", "Coding", "The code identifying which tooth is missing.", 0, java.lang.Integer.MAX_VALUE, tooth)); + childrenList.add(new Property("reason", "Coding", "Missing reason may be: E-extraction, O-other.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("extractionDate", "date", "The date of the extraction either known from records or patient reported estimate.", 0, java.lang.Integer.MAX_VALUE, extractionDate)); + } + + public MissingTeethComponent copy() { + MissingTeethComponent dst = new MissingTeethComponent(); + copyValues(dst); + dst.tooth = tooth == null ? null : tooth.copy(); + dst.reason = reason == null ? null : reason.copy(); + dst.extractionDate = extractionDate == null ? null : extractionDate.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MissingTeethComponent)) + return false; + MissingTeethComponent o = (MissingTeethComponent) other; + return compareDeep(tooth, o.tooth, true) && compareDeep(reason, o.reason, true) && compareDeep(extractionDate, o.extractionDate, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MissingTeethComponent)) + return false; + MissingTeethComponent o = (MissingTeethComponent) other; + return compareValues(extractionDate, o.extractionDate, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) + && (extractionDate == null || extractionDate.isEmpty()); + } + + } + + /** + * The category of claim this is. + */ + @Child(name ="type", type={CodeType.class}, order=0, min=1, max=1) + @Description(shortDefinition="institutional | oral | pharmacy | professional | vision", formalDefinition="The category of claim this is." ) + protected Enumeration type; + /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) + @Child(name ="ruleset", type={Coding.class}, order=2, min=0, max=1) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) + @Child(name ="originalRuleset", type={Coding.class}, order=3, min=0, max=1) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) + @Child(name ="created", type={DateTimeType.class}, order=4, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) + @Child(name ="target", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) protected Reference target; @@ -3478,7 +3290,7 @@ public class OralHealthClaim extends DomainResource { /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) + @Child(name ="provider", type={Practitioner.class}, order=6, min=0, max=1) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference provider; @@ -3490,7 +3302,7 @@ public class OralHealthClaim extends DomainResource { /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) + @Child(name ="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) protected Reference organization; @@ -3502,28 +3314,28 @@ public class OralHealthClaim extends DomainResource { /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) + @Child(name ="use", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) + @Child(name ="priority", type={Coding.class}, order=9, min=0, max=1) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) + @Child(name ="fundsReserve", type={Coding.class}, order=10, min=0, max=1) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) + @Child(name ="enterer", type={Practitioner.class}, order=11, min=0, max=1) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) protected Reference enterer; @@ -3535,7 +3347,7 @@ public class OralHealthClaim extends DomainResource { /** * Facility where the services were provided. */ - @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) + @Child(name ="facility", type={Location.class}, order=12, min=0, max=1) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) protected Reference facility; @@ -3544,17 +3356,41 @@ public class OralHealthClaim extends DomainResource { */ protected Location facilityTarget; + /** + * Prescription to support the dispensing of Pharmacy or Vision products. + */ + @Child(name ="prescription", type={MedicationPrescription.class, VisionPrescription.class}, order=13, min=0, max=1) + @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of Pharmacy or Vision products." ) + protected Reference prescription; + + /** + * The actual object that is the target of the reference (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + protected Resource prescriptionTarget; + + /** + * Original prescription to support the dispensing of pharmacy services, medications or products. + */ + @Child(name ="originalPrescription", type={MedicationPrescription.class}, order=14, min=0, max=1) + @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription to support the dispensing of pharmacy services, medications or products." ) + protected Reference originalPrescription; + + /** + * The actual object that is the target of the reference (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + protected MedicationPrescription originalPrescriptionTarget; + /** * The party to be reimbursed for the services. */ - @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) + @Child(name ="payee", type={}, order=15, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) + @Child(name ="referral", type={ReferralRequest.class}, order=16, min=0, max=1) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) protected Reference referral; @@ -3566,21 +3402,21 @@ public class OralHealthClaim extends DomainResource { /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="diagnosis", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; /** * List of patient conditions for which care is sought. */ - @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="condition", type={Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) protected List condition; /** * Patient Resource. */ - @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) + @Child(name ="patient", type={Patient.class}, order=19, min=1, max=1) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) protected Reference patient; @@ -3592,84 +3428,123 @@ public class OralHealthClaim extends DomainResource { /** * Financial instrument by which payment information for health care. */ - @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="coverage", type={}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; /** * Factors which may influence the applicability of coverage. */ - @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="exception", type={Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) protected List exception; /** * Name of school for over-aged dependants. */ - @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) + @Child(name ="school", type={StringType.class}, order=22, min=0, max=1) @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) protected StringType school; /** * Date of an accident which these services are addressing. */ - @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) + @Child(name ="accident", type={DateType.class}, order=23, min=0, max=1) @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accident; /** * Type of accident: work, auto, etc. */ - @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) + @Child(name ="accidentType", type={Coding.class}, order=24, min=0, max=1) @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="interventionException", type={Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; - /** - * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. - */ - @Child(name = "missingteeth", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Missing Teeth", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) - protected List missingteeth; - - /** - * The high-level details of an Orthodontic Treatment Plan. - */ - @Child(name = "orthoPlan", type = {}, order = 24, min = 0, max = 1) - @Description(shortDefinition="Orthodontic Treatment Plan", formalDefinition="The high-level details of an Orthodontic Treatment Plan." ) - protected OrthodonticPlanComponent orthoPlan; - /** * First tier of goods and services. */ - @Child(name = "item", type = {}, order = 25, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="item", type={}, order=26, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name = "additionalMaterials", type = {Coding.class}, order = 26, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="additionalMaterials", type={Coding.class}, order=27, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) protected List additionalMaterials; - private static final long serialVersionUID = -748490719L; + /** + * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. + */ + @Child(name ="missingTeeth", type={}, order=28, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Only if type = oral", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) + protected List missingTeeth; - public OralHealthClaim() { + private static final long serialVersionUID = 764017933L; + + public Claim() { super(); } - public OralHealthClaim(Reference patient) { + public Claim(Enumeration type, Reference patient) { super(); + this.type = type; this.patient = patient; } + /** + * @return {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new TypeLinkEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Claim setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The category of claim this is. + */ + public TypeLink getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The category of claim this is. + */ + public Claim setType(TypeLink value) { + if (this.type == null) + this.type = new Enumeration(new TypeLinkEnumFactory()); + this.type.setValue(value); + return this; + } + /** * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) */ @@ -3700,13 +3575,23 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + /** * @return {@link #ruleset} (The version of the specification on which this instance relies.) */ public Coding getRuleset() { if (this.ruleset == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.ruleset"); + throw new Error("Attempt to auto-create Claim.ruleset"); else if (Configuration.doAutoCreate()) this.ruleset = new Coding(); // cc return this.ruleset; @@ -3719,7 +3604,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #ruleset} (The version of the specification on which this instance relies.) */ - public OralHealthClaim setRuleset(Coding value) { + public Claim setRuleset(Coding value) { this.ruleset = value; return this; } @@ -3730,7 +3615,7 @@ public class OralHealthClaim extends DomainResource { public Coding getOriginalRuleset() { if (this.originalRuleset == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.originalRuleset"); + throw new Error("Attempt to auto-create Claim.originalRuleset"); else if (Configuration.doAutoCreate()) this.originalRuleset = new Coding(); // cc return this.originalRuleset; @@ -3743,7 +3628,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) */ - public OralHealthClaim setOriginalRuleset(Coding value) { + public Claim setOriginalRuleset(Coding value) { this.originalRuleset = value; return this; } @@ -3754,7 +3639,7 @@ public class OralHealthClaim extends DomainResource { public DateTimeType getCreatedElement() { if (this.created == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.created"); + throw new Error("Attempt to auto-create Claim.created"); else if (Configuration.doAutoCreate()) this.created = new DateTimeType(); // bb return this.created; @@ -3771,7 +3656,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value */ - public OralHealthClaim setCreatedElement(DateTimeType value) { + public Claim setCreatedElement(DateTimeType value) { this.created = value; return this; } @@ -3786,7 +3671,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value The date when the enclosed suite of services were performed or completed. */ - public OralHealthClaim setCreated(Date value) { + public Claim setCreated(Date value) { if (value == null) this.created = null; else { @@ -3803,7 +3688,7 @@ public class OralHealthClaim extends DomainResource { public Reference getTarget() { if (this.target == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.target"); + throw new Error("Attempt to auto-create Claim.target"); else if (Configuration.doAutoCreate()) this.target = new Reference(); // cc return this.target; @@ -3816,7 +3701,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) */ - public OralHealthClaim setTarget(Reference value) { + public Claim setTarget(Reference value) { this.target = value; return this; } @@ -3827,7 +3712,7 @@ public class OralHealthClaim extends DomainResource { public Organization getTargetTarget() { if (this.targetTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.target"); + throw new Error("Attempt to auto-create Claim.target"); else if (Configuration.doAutoCreate()) this.targetTarget = new Organization(); // aa return this.targetTarget; @@ -3836,7 +3721,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) */ - public OralHealthClaim setTargetTarget(Organization value) { + public Claim setTargetTarget(Organization value) { this.targetTarget = value; return this; } @@ -3847,7 +3732,7 @@ public class OralHealthClaim extends DomainResource { public Reference getProvider() { if (this.provider == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.provider"); + throw new Error("Attempt to auto-create Claim.provider"); else if (Configuration.doAutoCreate()) this.provider = new Reference(); // cc return this.provider; @@ -3860,7 +3745,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public OralHealthClaim setProvider(Reference value) { + public Claim setProvider(Reference value) { this.provider = value; return this; } @@ -3871,7 +3756,7 @@ public class OralHealthClaim extends DomainResource { public Practitioner getProviderTarget() { if (this.providerTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.provider"); + throw new Error("Attempt to auto-create Claim.provider"); else if (Configuration.doAutoCreate()) this.providerTarget = new Practitioner(); // aa return this.providerTarget; @@ -3880,7 +3765,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public OralHealthClaim setProviderTarget(Practitioner value) { + public Claim setProviderTarget(Practitioner value) { this.providerTarget = value; return this; } @@ -3891,7 +3776,7 @@ public class OralHealthClaim extends DomainResource { public Reference getOrganization() { if (this.organization == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.organization"); + throw new Error("Attempt to auto-create Claim.organization"); else if (Configuration.doAutoCreate()) this.organization = new Reference(); // cc return this.organization; @@ -3904,7 +3789,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public OralHealthClaim setOrganization(Reference value) { + public Claim setOrganization(Reference value) { this.organization = value; return this; } @@ -3915,7 +3800,7 @@ public class OralHealthClaim extends DomainResource { public Organization getOrganizationTarget() { if (this.organizationTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.organization"); + throw new Error("Attempt to auto-create Claim.organization"); else if (Configuration.doAutoCreate()) this.organizationTarget = new Organization(); // aa return this.organizationTarget; @@ -3924,7 +3809,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public OralHealthClaim setOrganizationTarget(Organization value) { + public Claim setOrganizationTarget(Organization value) { this.organizationTarget = value; return this; } @@ -3935,7 +3820,7 @@ public class OralHealthClaim extends DomainResource { public Enumeration getUseElement() { if (this.use == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.use"); + throw new Error("Attempt to auto-create Claim.use"); else if (Configuration.doAutoCreate()) this.use = new Enumeration(new UseLinkEnumFactory()); // bb return this.use; @@ -3952,7 +3837,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value */ - public OralHealthClaim setUseElement(Enumeration value) { + public Claim setUseElement(Enumeration value) { this.use = value; return this; } @@ -3967,7 +3852,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - public OralHealthClaim setUse(UseLink value) { + public Claim setUse(UseLink value) { if (value == null) this.use = null; else { @@ -3984,7 +3869,7 @@ public class OralHealthClaim extends DomainResource { public Coding getPriority() { if (this.priority == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.priority"); + throw new Error("Attempt to auto-create Claim.priority"); else if (Configuration.doAutoCreate()) this.priority = new Coding(); // cc return this.priority; @@ -3997,7 +3882,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) */ - public OralHealthClaim setPriority(Coding value) { + public Claim setPriority(Coding value) { this.priority = value; return this; } @@ -4008,7 +3893,7 @@ public class OralHealthClaim extends DomainResource { public Coding getFundsReserve() { if (this.fundsReserve == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.fundsReserve"); + throw new Error("Attempt to auto-create Claim.fundsReserve"); else if (Configuration.doAutoCreate()) this.fundsReserve = new Coding(); // cc return this.fundsReserve; @@ -4021,7 +3906,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) */ - public OralHealthClaim setFundsReserve(Coding value) { + public Claim setFundsReserve(Coding value) { this.fundsReserve = value; return this; } @@ -4032,7 +3917,7 @@ public class OralHealthClaim extends DomainResource { public Reference getEnterer() { if (this.enterer == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.enterer"); + throw new Error("Attempt to auto-create Claim.enterer"); else if (Configuration.doAutoCreate()) this.enterer = new Reference(); // cc return this.enterer; @@ -4045,7 +3930,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public OralHealthClaim setEnterer(Reference value) { + public Claim setEnterer(Reference value) { this.enterer = value; return this; } @@ -4056,7 +3941,7 @@ public class OralHealthClaim extends DomainResource { public Practitioner getEntererTarget() { if (this.entererTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.enterer"); + throw new Error("Attempt to auto-create Claim.enterer"); else if (Configuration.doAutoCreate()) this.entererTarget = new Practitioner(); // aa return this.entererTarget; @@ -4065,7 +3950,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public OralHealthClaim setEntererTarget(Practitioner value) { + public Claim setEntererTarget(Practitioner value) { this.entererTarget = value; return this; } @@ -4076,7 +3961,7 @@ public class OralHealthClaim extends DomainResource { public Reference getFacility() { if (this.facility == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.facility"); + throw new Error("Attempt to auto-create Claim.facility"); else if (Configuration.doAutoCreate()) this.facility = new Reference(); // cc return this.facility; @@ -4089,7 +3974,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #facility} (Facility where the services were provided.) */ - public OralHealthClaim setFacility(Reference value) { + public Claim setFacility(Reference value) { this.facility = value; return this; } @@ -4100,7 +3985,7 @@ public class OralHealthClaim extends DomainResource { public Location getFacilityTarget() { if (this.facilityTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.facility"); + throw new Error("Attempt to auto-create Claim.facility"); else if (Configuration.doAutoCreate()) this.facilityTarget = new Location(); // aa return this.facilityTarget; @@ -4109,18 +3994,101 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) */ - public OralHealthClaim setFacilityTarget(Location value) { + public Claim setFacilityTarget(Location value) { this.facilityTarget = value; return this; } + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Reference getPrescription() { + if (this.prescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.prescription"); + else if (Configuration.doAutoCreate()) + this.prescription = new Reference(); // cc + return this.prescription; + } + + public boolean hasPrescription() { + return this.prescription != null && !this.prescription.isEmpty(); + } + + /** + * @param value {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Claim setPrescription(Reference value) { + this.prescription = value; + return this; + } + + /** + * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Resource getPrescriptionTarget() { + return this.prescriptionTarget; + } + + /** + * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Claim setPrescriptionTarget(Resource value) { + this.prescriptionTarget = value; + return this; + } + + /** + * @return {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Reference getOriginalPrescription() { + if (this.originalPrescription == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.originalPrescription"); + else if (Configuration.doAutoCreate()) + this.originalPrescription = new Reference(); // cc + return this.originalPrescription; + } + + public boolean hasOriginalPrescription() { + return this.originalPrescription != null && !this.originalPrescription.isEmpty(); + } + + /** + * @param value {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Claim setOriginalPrescription(Reference value) { + this.originalPrescription = value; + return this; + } + + /** + * @return {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public MedicationPrescription getOriginalPrescriptionTarget() { + if (this.originalPrescriptionTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Claim.originalPrescription"); + else if (Configuration.doAutoCreate()) + this.originalPrescriptionTarget = new MedicationPrescription(); // aa + return this.originalPrescriptionTarget; + } + + /** + * @param value {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Claim setOriginalPrescriptionTarget(MedicationPrescription value) { + this.originalPrescriptionTarget = value; + return this; + } + /** * @return {@link #payee} (The party to be reimbursed for the services.) */ public PayeeComponent getPayee() { if (this.payee == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.payee"); + throw new Error("Attempt to auto-create Claim.payee"); else if (Configuration.doAutoCreate()) this.payee = new PayeeComponent(); // cc return this.payee; @@ -4133,7 +4101,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #payee} (The party to be reimbursed for the services.) */ - public OralHealthClaim setPayee(PayeeComponent value) { + public Claim setPayee(PayeeComponent value) { this.payee = value; return this; } @@ -4144,7 +4112,7 @@ public class OralHealthClaim extends DomainResource { public Reference getReferral() { if (this.referral == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.referral"); + throw new Error("Attempt to auto-create Claim.referral"); else if (Configuration.doAutoCreate()) this.referral = new Reference(); // cc return this.referral; @@ -4157,7 +4125,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public OralHealthClaim setReferral(Reference value) { + public Claim setReferral(Reference value) { this.referral = value; return this; } @@ -4168,7 +4136,7 @@ public class OralHealthClaim extends DomainResource { public ReferralRequest getReferralTarget() { if (this.referralTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.referral"); + throw new Error("Attempt to auto-create Claim.referral"); else if (Configuration.doAutoCreate()) this.referralTarget = new ReferralRequest(); // aa return this.referralTarget; @@ -4177,7 +4145,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public OralHealthClaim setReferralTarget(ReferralRequest value) { + public Claim setReferralTarget(ReferralRequest value) { this.referralTarget = value; return this; } @@ -4212,6 +4180,16 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addDiagnosis(DiagnosisComponent t) { //3 + if (t == null) + return this; + if (this.diagnosis == null) + this.diagnosis = new ArrayList(); + this.diagnosis.add(t); + return this; + } + /** * @return {@link #condition} (List of patient conditions for which care is sought.) */ @@ -4242,13 +4220,23 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addCondition(Coding t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + /** * @return {@link #patient} (Patient Resource.) */ public Reference getPatient() { if (this.patient == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.patient"); + throw new Error("Attempt to auto-create Claim.patient"); else if (Configuration.doAutoCreate()) this.patient = new Reference(); // cc return this.patient; @@ -4261,7 +4249,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #patient} (Patient Resource.) */ - public OralHealthClaim setPatient(Reference value) { + public Claim setPatient(Reference value) { this.patient = value; return this; } @@ -4272,7 +4260,7 @@ public class OralHealthClaim extends DomainResource { public Patient getPatientTarget() { if (this.patientTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.patient"); + throw new Error("Attempt to auto-create Claim.patient"); else if (Configuration.doAutoCreate()) this.patientTarget = new Patient(); // aa return this.patientTarget; @@ -4281,7 +4269,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) */ - public OralHealthClaim setPatientTarget(Patient value) { + public Claim setPatientTarget(Patient value) { this.patientTarget = value; return this; } @@ -4316,6 +4304,16 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addCoverage(CoverageComponent t) { //3 + if (t == null) + return this; + if (this.coverage == null) + this.coverage = new ArrayList(); + this.coverage.add(t); + return this; + } + /** * @return {@link #exception} (Factors which may influence the applicability of coverage.) */ @@ -4346,13 +4344,23 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addException(Coding t) { //3 + if (t == null) + return this; + if (this.exception == null) + this.exception = new ArrayList(); + this.exception.add(t); + return this; + } + /** * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value */ public StringType getSchoolElement() { if (this.school == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.school"); + throw new Error("Attempt to auto-create Claim.school"); else if (Configuration.doAutoCreate()) this.school = new StringType(); // bb return this.school; @@ -4369,7 +4377,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value */ - public OralHealthClaim setSchoolElement(StringType value) { + public Claim setSchoolElement(StringType value) { this.school = value; return this; } @@ -4384,7 +4392,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value Name of school for over-aged dependants. */ - public OralHealthClaim setSchool(String value) { + public Claim setSchool(String value) { if (Utilities.noString(value)) this.school = null; else { @@ -4401,7 +4409,7 @@ public class OralHealthClaim extends DomainResource { public DateType getAccidentElement() { if (this.accident == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.accident"); + throw new Error("Attempt to auto-create Claim.accident"); else if (Configuration.doAutoCreate()) this.accident = new DateType(); // bb return this.accident; @@ -4418,7 +4426,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value */ - public OralHealthClaim setAccidentElement(DateType value) { + public Claim setAccidentElement(DateType value) { this.accident = value; return this; } @@ -4433,7 +4441,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value Date of an accident which these services are addressing. */ - public OralHealthClaim setAccident(Date value) { + public Claim setAccident(Date value) { if (value == null) this.accident = null; else { @@ -4450,7 +4458,7 @@ public class OralHealthClaim extends DomainResource { public Coding getAccidentType() { if (this.accidentType == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.accidentType"); + throw new Error("Attempt to auto-create Claim.accidentType"); else if (Configuration.doAutoCreate()) this.accidentType = new Coding(); // cc return this.accidentType; @@ -4463,7 +4471,7 @@ public class OralHealthClaim extends DomainResource { /** * @param value {@link #accidentType} (Type of accident: work, auto, etc.) */ - public OralHealthClaim setAccidentType(Coding value) { + public Claim setAccidentType(Coding value) { this.accidentType = value; return this; } @@ -4498,57 +4506,13 @@ public class OralHealthClaim extends DomainResource { return t; } - /** - * @return {@link #missingteeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) - */ - public List getMissingteeth() { - if (this.missingteeth == null) - this.missingteeth = new ArrayList(); - return this.missingteeth; - } - - public boolean hasMissingteeth() { - if (this.missingteeth == null) - return false; - for (MissingTeethComponent item : this.missingteeth) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #missingteeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) - */ // syntactic sugar - public MissingTeethComponent addMissingteeth() { //3 - MissingTeethComponent t = new MissingTeethComponent(); - if (this.missingteeth == null) - this.missingteeth = new ArrayList(); - this.missingteeth.add(t); - return t; - } - - /** - * @return {@link #orthoPlan} (The high-level details of an Orthodontic Treatment Plan.) - */ - public OrthodonticPlanComponent getOrthoPlan() { - if (this.orthoPlan == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OralHealthClaim.orthoPlan"); - else if (Configuration.doAutoCreate()) - this.orthoPlan = new OrthodonticPlanComponent(); // cc - return this.orthoPlan; - } - - public boolean hasOrthoPlan() { - return this.orthoPlan != null && !this.orthoPlan.isEmpty(); - } - - /** - * @param value {@link #orthoPlan} (The high-level details of an Orthodontic Treatment Plan.) - */ - public OralHealthClaim setOrthoPlan(OrthodonticPlanComponent value) { - this.orthoPlan = value; + public Claim addInterventionException(Coding t) { //3 + if (t == null) + return this; + if (this.interventionException == null) + this.interventionException = new ArrayList(); + this.interventionException.add(t); return this; } @@ -4582,6 +4546,16 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addItem(ItemsComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + /** * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) */ @@ -4612,8 +4586,59 @@ public class OralHealthClaim extends DomainResource { return t; } + // syntactic sugar + public Claim addAdditionalMaterials(Coding t) { //3 + if (t == null) + return this; + if (this.additionalMaterials == null) + this.additionalMaterials = new ArrayList(); + this.additionalMaterials.add(t); + return this; + } + + /** + * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) + */ + public List getMissingTeeth() { + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + return this.missingTeeth; + } + + public boolean hasMissingTeeth() { + if (this.missingTeeth == null) + return false; + for (MissingTeethComponent item : this.missingTeeth) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) + */ + // syntactic sugar + public MissingTeethComponent addMissingTeeth() { //3 + MissingTeethComponent t = new MissingTeethComponent(); + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + this.missingTeeth.add(t); + return t; + } + + // syntactic sugar + public Claim addMissingTeeth(MissingTeethComponent t) { //3 + if (t == null) + return this; + if (this.missingTeeth == null) + this.missingTeeth = new ArrayList(); + this.missingTeeth.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The category of claim this is.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); @@ -4626,6 +4651,8 @@ public class OralHealthClaim extends DomainResource { childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); + childrenList.add(new Property("prescription", "Reference(MedicationPrescription|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); + childrenList.add(new Property("originalPrescription", "Reference(MedicationPrescription)", "Original prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); @@ -4637,15 +4664,15 @@ public class OralHealthClaim extends DomainResource { childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("missingteeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingteeth)); - childrenList.add(new Property("orthoPlan", "", "The high-level details of an Orthodontic Treatment Plan.", 0, java.lang.Integer.MAX_VALUE, orthoPlan)); childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); + childrenList.add(new Property("missingTeeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingTeeth)); } - public OralHealthClaim copy() { - OralHealthClaim dst = new OralHealthClaim(); + public Claim copy() { + Claim dst = new Claim(); copyValues(dst); + dst.type = type == null ? null : type.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) @@ -4662,6 +4689,8 @@ public class OralHealthClaim extends DomainResource { dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); dst.enterer = enterer == null ? null : enterer.copy(); dst.facility = facility == null ? null : facility.copy(); + dst.prescription = prescription == null ? null : prescription.copy(); + dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); dst.payee = payee == null ? null : payee.copy(); dst.referral = referral == null ? null : referral.copy(); if (diagnosis != null) { @@ -4693,12 +4722,6 @@ public class OralHealthClaim extends DomainResource { for (Coding i : interventionException) dst.interventionException.add(i.copy()); }; - if (missingteeth != null) { - dst.missingteeth = new ArrayList(); - for (MissingTeethComponent i : missingteeth) - dst.missingteeth.add(i.copy()); - }; - dst.orthoPlan = orthoPlan == null ? null : orthoPlan.copy(); if (item != null) { dst.item = new ArrayList(); for (ItemsComponent i : item) @@ -4709,10 +4732,15 @@ public class OralHealthClaim extends DomainResource { for (Coding i : additionalMaterials) dst.additionalMaterials.add(i.copy()); }; + if (missingTeeth != null) { + dst.missingTeeth = new ArrayList(); + for (MissingTeethComponent i : missingTeeth) + dst.missingTeeth.add(i.copy()); + }; return dst; } - protected OralHealthClaim typedCopy() { + protected Claim typedCopy() { return copy(); } @@ -4720,19 +4748,20 @@ public class OralHealthClaim extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof OralHealthClaim)) + if (!(other instanceof Claim)) return false; - OralHealthClaim o = (OralHealthClaim) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) - && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) - && compareDeep(accidentType, o.accidentType, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(missingteeth, o.missingteeth, true) && compareDeep(orthoPlan, o.orthoPlan, true) - && compareDeep(item, o.item, true) && compareDeep(additionalMaterials, o.additionalMaterials, true) + Claim o = (Claim) other; + return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) + && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) + && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) && compareDeep(fundsReserve, o.fundsReserve, true) + && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) && compareDeep(prescription, o.prescription, true) + && compareDeep(originalPrescription, o.originalPrescription, true) && compareDeep(payee, o.payee, true) + && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(condition, o.condition, true) + && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) && compareDeep(exception, o.exception, true) + && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) && compareDeep(accidentType, o.accidentType, true) + && compareDeep(interventionException, o.interventionException, true) && compareDeep(item, o.item, true) + && compareDeep(additionalMaterials, o.additionalMaterials, true) && compareDeep(missingTeeth, o.missingTeeth, true) ; } @@ -4740,40 +4769,43 @@ public class OralHealthClaim extends DomainResource { public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof OralHealthClaim)) + if (!(other instanceof Claim)) return false; - OralHealthClaim o = (OralHealthClaim) other; - return compareValues(created, o.created, true) && compareValues(use, o.use, true) && compareValues(school, o.school, true) - && compareValues(accident, o.accident, true); + Claim o = (Claim) other; + return compareValues(type, o.type, true) && compareValues(created, o.created, true) && compareValues(use, o.use, true) + && compareValues(school, o.school, true) && compareValues(accident, o.accident, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (payee == null || payee.isEmpty()) + return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) + && (organization == null || organization.isEmpty()) && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) + && (fundsReserve == null || fundsReserve.isEmpty()) && (enterer == null || enterer.isEmpty()) + && (facility == null || facility.isEmpty()) && (prescription == null || prescription.isEmpty()) + && (originalPrescription == null || originalPrescription.isEmpty()) && (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) - && (missingteeth == null || missingteeth.isEmpty()) && (orthoPlan == null || orthoPlan.isEmpty()) && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - ; + && (missingTeeth == null || missingTeeth.isEmpty()); } @Override public ResourceType getResourceType() { - return ResourceType.OralHealthClaim; + return ResourceType.Claim; } - @SearchParamDefinition(name = "identifier", path = "OralHealthClaim.identifier", description = "The primary identifier of the financial resource", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "use", path = "OralHealthClaim.use", description = "The kind of financial resource", type = "token") - public static final String SP_USE = "use"; - @SearchParamDefinition(name="patient", path="OralHealthClaim.patient", description="Patient", type="reference" ) + @SearchParamDefinition(name="identifier", path="Claim.identifier", description="The primary identifier of the financial resource", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="provider", path="Claim.provider", description="Provider responsible for the claim", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="use", path="Claim.use", description="The kind of financial resource", type="token" ) + public static final String SP_USE = "use"; + @SearchParamDefinition(name="patient", path="Claim.patient", description="Patient", type="reference" ) public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="priority", path="OralHealthClaim.priority", description="Processing priority requested", type="token" ) + @SearchParamDefinition(name="priority", path="Claim.priority", description="Processing priority requested", type="token" ) public static final String SP_PRIORITY = "priority"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java index 28b71852adc..8aadb9d06b1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java @@ -2543,7 +2543,7 @@ public class ClaimResponse extends DomainResource { /** * Original request resource referrence. */ - @Child(name = "request", type = {OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order = 1, min = 0, max = 1) + @Child(name = "request", type = {}, order = 1, min = 0, max = 1) @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) protected Reference request; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java deleted file mode 100644 index de77414476f..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java +++ /dev/null @@ -1,1486 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. - */ -@ResourceDef(name="ClinicalAssessment", profile="http://hl7.org/fhir/Profile/ClinicalAssessment") -public class ClinicalAssessment extends DomainResource { - - @Block() - public static class ClinicalAssessmentInvestigationsComponent extends BackboneElement { - /** - * A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used. - */ - @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1) - @Description(shortDefinition="A name/code for the set", formalDefinition="A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used." ) - protected CodeableConcept code; - - /** - * A record of a specific investigation that was undertaken. - */ - @Child(name="item", type={Observation.class, QuestionnaireAnswers.class, FamilyHistory.class, DiagnosticReport.class}, order=2, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Record of a specific investigation", formalDefinition="A record of a specific investigation that was undertaken." ) - protected List item; - /** - * The actual objects that are the target of the reference (A record of a specific investigation that was undertaken.) - */ - protected List itemTarget; - - - private static final long serialVersionUID = -301363326L; - - public ClinicalAssessmentInvestigationsComponent() { - super(); - } - - public ClinicalAssessmentInvestigationsComponent(CodeableConcept code) { - super(); - this.code = code; - } - - /** - * @return {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.) - */ - public CodeableConcept getCode() { - if (this.code == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessmentInvestigationsComponent.code"); - else if (Configuration.doAutoCreate()) - this.code = new CodeableConcept(); // cc - return this.code; - } - - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); - } - - /** - * @param value {@link #code} (A name/code for the group ("set") of investigations. Typically, this will be something like "signs", "symptoms", "clinical", "diagnostic", but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.) - */ - public ClinicalAssessmentInvestigationsComponent setCode(CodeableConcept value) { - this.code = value; - return this; - } - - /** - * @return {@link #item} (A record of a specific investigation that was undertaken.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (Reference item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (A record of a specific investigation that was undertaken.) - */ - // syntactic sugar - public Reference addItem() { //3 - Reference t = new Reference(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - /** - * @return {@link #item} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A record of a specific investigation that was undertaken.) - */ - public List getItemTarget() { - if (this.itemTarget == null) - this.itemTarget = new ArrayList(); - return this.itemTarget; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("code", "CodeableConcept", "A name/code for the group ('set') of investigations. Typically, this will be something like 'signs', 'symptoms', 'clinical', 'diagnostic', but the list is not constrained, and others such groups such as (exposure|family|travel|nutitirional) history may be used.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("item", "Reference(Observation|QuestionnaireAnswers|FamilyHistory|DiagnosticReport)", "A record of a specific investigation that was undertaken.", 0, java.lang.Integer.MAX_VALUE, item)); - } - - public ClinicalAssessmentInvestigationsComponent copy() { - ClinicalAssessmentInvestigationsComponent dst = new ClinicalAssessmentInvestigationsComponent(); - copyValues(dst); - dst.code = code == null ? null : code.copy(); - if (item != null) { - dst.item = new ArrayList(); - for (Reference i : item) - dst.item.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ClinicalAssessmentInvestigationsComponent)) - return false; - ClinicalAssessmentInvestigationsComponent o = (ClinicalAssessmentInvestigationsComponent) other; - return compareDeep(code, o.code, true) && compareDeep(item, o.item, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ClinicalAssessmentInvestigationsComponent)) - return false; - ClinicalAssessmentInvestigationsComponent o = (ClinicalAssessmentInvestigationsComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (item == null || item.isEmpty()) - ; - } - - } - - @Block() - public static class ClinicalAssessmentDiagnosisComponent extends BackboneElement { - /** - * Specific text of code for diagnosis. - */ - @Child(name="item", type={CodeableConcept.class}, order=1, min=1, max=1) - @Description(shortDefinition="Specific text or code for diagnosis", formalDefinition="Specific text of code for diagnosis." ) - protected CodeableConcept item; - - /** - * Which investigations support diagnosis. - */ - @Child(name="cause", type={StringType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Which investigations support diagnosis", formalDefinition="Which investigations support diagnosis." ) - protected StringType cause; - - private static final long serialVersionUID = -888590978L; - - public ClinicalAssessmentDiagnosisComponent() { - super(); - } - - public ClinicalAssessmentDiagnosisComponent(CodeableConcept item) { - super(); - this.item = item; - } - - /** - * @return {@link #item} (Specific text of code for diagnosis.) - */ - public CodeableConcept getItem() { - if (this.item == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessmentDiagnosisComponent.item"); - else if (Configuration.doAutoCreate()) - this.item = new CodeableConcept(); // cc - return this.item; - } - - public boolean hasItem() { - return this.item != null && !this.item.isEmpty(); - } - - /** - * @param value {@link #item} (Specific text of code for diagnosis.) - */ - public ClinicalAssessmentDiagnosisComponent setItem(CodeableConcept value) { - this.item = value; - return this; - } - - /** - * @return {@link #cause} (Which investigations support diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value - */ - public StringType getCauseElement() { - if (this.cause == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessmentDiagnosisComponent.cause"); - else if (Configuration.doAutoCreate()) - this.cause = new StringType(); // bb - return this.cause; - } - - public boolean hasCauseElement() { - return this.cause != null && !this.cause.isEmpty(); - } - - public boolean hasCause() { - return this.cause != null && !this.cause.isEmpty(); - } - - /** - * @param value {@link #cause} (Which investigations support diagnosis.). This is the underlying object with id, value and extensions. The accessor "getCause" gives direct access to the value - */ - public ClinicalAssessmentDiagnosisComponent setCauseElement(StringType value) { - this.cause = value; - return this; - } - - /** - * @return Which investigations support diagnosis. - */ - public String getCause() { - return this.cause == null ? null : this.cause.getValue(); - } - - /** - * @param value Which investigations support diagnosis. - */ - public ClinicalAssessmentDiagnosisComponent setCause(String value) { - if (Utilities.noString(value)) - this.cause = null; - else { - if (this.cause == null) - this.cause = new StringType(); - this.cause.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for diagnosis.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("cause", "string", "Which investigations support diagnosis.", 0, java.lang.Integer.MAX_VALUE, cause)); - } - - public ClinicalAssessmentDiagnosisComponent copy() { - ClinicalAssessmentDiagnosisComponent dst = new ClinicalAssessmentDiagnosisComponent(); - copyValues(dst); - dst.item = item == null ? null : item.copy(); - dst.cause = cause == null ? null : cause.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ClinicalAssessmentDiagnosisComponent)) - return false; - ClinicalAssessmentDiagnosisComponent o = (ClinicalAssessmentDiagnosisComponent) other; - return compareDeep(item, o.item, true) && compareDeep(cause, o.cause, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ClinicalAssessmentDiagnosisComponent)) - return false; - ClinicalAssessmentDiagnosisComponent o = (ClinicalAssessmentDiagnosisComponent) other; - return compareValues(cause, o.cause, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (cause == null || cause.isEmpty()) - ; - } - - } - - @Block() - public static class ClinicalAssessmentRuledOutComponent extends BackboneElement { - /** - * Specific text of code for diagnosis. - */ - @Child(name="item", type={CodeableConcept.class}, order=1, min=1, max=1) - @Description(shortDefinition="Specific text of code for diagnosis", formalDefinition="Specific text of code for diagnosis." ) - protected CodeableConcept item; - - /** - * Grounds for elimination. - */ - @Child(name="reason", type={StringType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Grounds for elimination", formalDefinition="Grounds for elimination." ) - protected StringType reason; - - private static final long serialVersionUID = -1001661243L; - - public ClinicalAssessmentRuledOutComponent() { - super(); - } - - public ClinicalAssessmentRuledOutComponent(CodeableConcept item) { - super(); - this.item = item; - } - - /** - * @return {@link #item} (Specific text of code for diagnosis.) - */ - public CodeableConcept getItem() { - if (this.item == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessmentRuledOutComponent.item"); - else if (Configuration.doAutoCreate()) - this.item = new CodeableConcept(); // cc - return this.item; - } - - public boolean hasItem() { - return this.item != null && !this.item.isEmpty(); - } - - /** - * @param value {@link #item} (Specific text of code for diagnosis.) - */ - public ClinicalAssessmentRuledOutComponent setItem(CodeableConcept value) { - this.item = value; - return this; - } - - /** - * @return {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value - */ - public StringType getReasonElement() { - if (this.reason == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessmentRuledOutComponent.reason"); - else if (Configuration.doAutoCreate()) - this.reason = new StringType(); // bb - return this.reason; - } - - public boolean hasReasonElement() { - return this.reason != null && !this.reason.isEmpty(); - } - - public boolean hasReason() { - return this.reason != null && !this.reason.isEmpty(); - } - - /** - * @param value {@link #reason} (Grounds for elimination.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value - */ - public ClinicalAssessmentRuledOutComponent setReasonElement(StringType value) { - this.reason = value; - return this; - } - - /** - * @return Grounds for elimination. - */ - public String getReason() { - return this.reason == null ? null : this.reason.getValue(); - } - - /** - * @param value Grounds for elimination. - */ - public ClinicalAssessmentRuledOutComponent setReason(String value) { - if (Utilities.noString(value)) - this.reason = null; - else { - if (this.reason == null) - this.reason = new StringType(); - this.reason.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("item", "CodeableConcept", "Specific text of code for diagnosis.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("reason", "string", "Grounds for elimination.", 0, java.lang.Integer.MAX_VALUE, reason)); - } - - public ClinicalAssessmentRuledOutComponent copy() { - ClinicalAssessmentRuledOutComponent dst = new ClinicalAssessmentRuledOutComponent(); - copyValues(dst); - dst.item = item == null ? null : item.copy(); - dst.reason = reason == null ? null : reason.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ClinicalAssessmentRuledOutComponent)) - return false; - ClinicalAssessmentRuledOutComponent o = (ClinicalAssessmentRuledOutComponent) other; - return compareDeep(item, o.item, true) && compareDeep(reason, o.reason, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ClinicalAssessmentRuledOutComponent)) - return false; - ClinicalAssessmentRuledOutComponent o = (ClinicalAssessmentRuledOutComponent) other; - return compareValues(reason, o.reason, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (reason == null || reason.isEmpty()) - ; - } - - } - - /** - * The patient being asssesed. - */ - @Child(name = "patient", type = {Patient.class}, order = 0, min = 1, max = 1) - @Description(shortDefinition="The patient being asssesed", formalDefinition="The patient being asssesed." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (The patient being asssesed.) - */ - protected Patient patientTarget; - - /** - * The clinicial performing the assessment. - */ - @Child(name = "assessor", type = {Practitioner.class}, order = 1, min = 1, max = 1) - @Description(shortDefinition="The clinicial performing the assessment", formalDefinition="The clinicial performing the assessment." ) - protected Reference assessor; - - /** - * The actual object that is the target of the reference (The clinicial performing the assessment.) - */ - protected Practitioner assessorTarget; - - /** - * The point in time at which the assessment was concluded (not when it was recorded). - */ - @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 1, max = 1) - @Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." ) - protected DateTimeType date; - - /** - * A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. - */ - @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." ) - protected StringType description; - - /** - * A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes. - */ - @Child(name = "previous", type = {ClinicalAssessment.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." ) - protected Reference previous; - - /** - * The actual object that is the target of the reference (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) - */ - protected ClinicalAssessment previousTarget; - - /** - * This a list of the general problems/conditions for a patient. - */ - @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." ) - protected List problem; - /** - * The actual objects that are the target of the reference (This a list of the general problems/conditions for a patient.) - */ - protected List problemTarget; - - - /** - * A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment. - */ - @Child(name = "careplan", type = {CarePlan.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="A specific careplan that prompted this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment." ) - protected Reference careplan; - - /** - * The actual object that is the target of the reference (A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.) - */ - protected CarePlan careplanTarget; - - /** - * A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment. - */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="A specific referral that lead to this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment." ) - protected Reference referral; - - /** - * The actual object that is the target of the reference (A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.) - */ - protected ReferralRequest referralTarget; - - /** - * One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes. - */ - @Child(name = "investigations", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="One or more sets of investigations (signs, symptions, etc)", formalDefinition="One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." ) - protected List investigations; - - /** - * Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. - */ - @Child(name = "protocol", type = {UriType.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." ) - protected UriType protocol; - - /** - * A text summary of the investigations and the diagnosis. - */ - @Child(name = "summary", type = {StringType.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." ) - protected StringType summary; - - /** - * An specific diagnosis that was considered likely or relevant to ongoing treatment. - */ - @Child(name = "diagnosis", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Possible or likely diagnosis", formalDefinition="An specific diagnosis that was considered likely or relevant to ongoing treatment." ) - protected List diagnosis; - - /** - * Diagnoses/conditions resolved since the last assessment. - */ - @Child(name = "resolved", type = {CodeableConcept.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosies/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." ) - protected List resolved; - - /** - * Diagnosis considered not possible. - */ - @Child(name = "ruledOut", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." ) - protected List ruledOut; - - /** - * Estimate of likely outcome. - */ - @Child(name = "prognosis", type = {StringType.class}, order = 14, min = 0, max = 1) - @Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." ) - protected StringType prognosis; - - /** - * Plan of action after assessment. - */ - @Child(name = "plan", type = {CarePlan.class}, order = 15, min = 0, max = 1) - @Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." ) - protected Reference plan; - - /** - * The actual object that is the target of the reference (Plan of action after assessment.) - */ - protected CarePlan planTarget; - - /** - * Actions taken during assessment. - */ - @Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." ) - protected List action; - /** - * The actual objects that are the target of the reference (Actions taken during assessment.) - */ - protected List actionTarget; - - - private static final long serialVersionUID = 1041335013L; - - public ClinicalAssessment() { - super(); - } - - public ClinicalAssessment(Reference patient, Reference assessor, DateTimeType date) { - super(); - this.patient = patient; - this.assessor = assessor; - this.date = date; - } - - /** - * @return {@link #patient} (The patient being asssesed.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (The patient being asssesed.) - */ - public ClinicalAssessment setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient being asssesed.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient being asssesed.) - */ - public ClinicalAssessment setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #assessor} (The clinicial performing the assessment.) - */ - public Reference getAssessor() { - if (this.assessor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.assessor"); - else if (Configuration.doAutoCreate()) - this.assessor = new Reference(); // cc - return this.assessor; - } - - public boolean hasAssessor() { - return this.assessor != null && !this.assessor.isEmpty(); - } - - /** - * @param value {@link #assessor} (The clinicial performing the assessment.) - */ - public ClinicalAssessment setAssessor(Reference value) { - this.assessor = value; - return this; - } - - /** - * @return {@link #assessor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The clinicial performing the assessment.) - */ - public Practitioner getAssessorTarget() { - if (this.assessorTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.assessor"); - else if (Configuration.doAutoCreate()) - this.assessorTarget = new Practitioner(); // aa - return this.assessorTarget; - } - - /** - * @param value {@link #assessor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The clinicial performing the assessment.) - */ - public ClinicalAssessment setAssessorTarget(Practitioner value) { - this.assessorTarget = value; - return this; - } - - /** - * @return {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; - } - - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); - } - - /** - * @param value {@link #date} (The point in time at which the assessment was concluded (not when it was recorded).). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public ClinicalAssessment setDateElement(DateTimeType value) { - this.date = value; - return this; - } - - /** - * @return The point in time at which the assessment was concluded (not when it was recorded). - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The point in time at which the assessment was concluded (not when it was recorded). - */ - public ClinicalAssessment setDate(Date value) { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - return this; - } - - /** - * @return {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). 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 ClinicalAssessment.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public ClinicalAssessment setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it. - */ - public ClinicalAssessment 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 #previous} (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) - */ - public Reference getPrevious() { - if (this.previous == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.previous"); - else if (Configuration.doAutoCreate()) - this.previous = new Reference(); // cc - return this.previous; - } - - public boolean hasPrevious() { - return this.previous != null && !this.previous.isEmpty(); - } - - /** - * @param value {@link #previous} (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) - */ - public ClinicalAssessment setPrevious(Reference value) { - this.previous = value; - return this; - } - - /** - * @return {@link #previous} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) - */ - public ClinicalAssessment getPreviousTarget() { - if (this.previousTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.previous"); - else if (Configuration.doAutoCreate()) - this.previousTarget = new ClinicalAssessment(); // aa - return this.previousTarget; - } - - /** - * @param value {@link #previous} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.) - */ - public ClinicalAssessment setPreviousTarget(ClinicalAssessment value) { - this.previousTarget = value; - return this; - } - - /** - * @return {@link #problem} (This a list of the general problems/conditions for a patient.) - */ - public List getProblem() { - if (this.problem == null) - this.problem = new ArrayList(); - return this.problem; - } - - public boolean hasProblem() { - if (this.problem == null) - return false; - for (Reference item : this.problem) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #problem} (This a list of the general problems/conditions for a patient.) - */ - // syntactic sugar - public Reference addProblem() { //3 - Reference t = new Reference(); - if (this.problem == null) - this.problem = new ArrayList(); - this.problem.add(t); - return t; - } - - /** - * @return {@link #problem} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. This a list of the general problems/conditions for a patient.) - */ - public List getProblemTarget() { - if (this.problemTarget == null) - this.problemTarget = new ArrayList(); - return this.problemTarget; - } - - /** - * @return {@link #careplan} (A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.) - */ - public Reference getCareplan() { - if (this.careplan == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.careplan"); - else if (Configuration.doAutoCreate()) - this.careplan = new Reference(); // cc - return this.careplan; - } - - public boolean hasCareplan() { - return this.careplan != null && !this.careplan.isEmpty(); - } - - /** - * @param value {@link #careplan} (A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.) - */ - public ClinicalAssessment setCareplan(Reference value) { - this.careplan = value; - return this; - } - - /** - * @return {@link #careplan} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.) - */ - public CarePlan getCareplanTarget() { - if (this.careplanTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.careplan"); - else if (Configuration.doAutoCreate()) - this.careplanTarget = new CarePlan(); // aa - return this.careplanTarget; - } - - /** - * @param value {@link #careplan} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.) - */ - public ClinicalAssessment setCareplanTarget(CarePlan value) { - this.careplanTarget = value; - return this; - } - - /** - * @return {@link #referral} (A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.) - */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc - return this.referral; - } - - public boolean hasReferral() { - return this.referral != null && !this.referral.isEmpty(); - } - - /** - * @param value {@link #referral} (A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.) - */ - public ClinicalAssessment setReferral(Reference value) { - this.referral = value; - return this; - } - - /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.) - */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; - } - - /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.) - */ - public ClinicalAssessment setReferralTarget(ReferralRequest value) { - this.referralTarget = value; - return this; - } - - /** - * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.) - */ - public List getInvestigations() { - if (this.investigations == null) - this.investigations = new ArrayList(); - return this.investigations; - } - - public boolean hasInvestigations() { - if (this.investigations == null) - return false; - for (ClinicalAssessmentInvestigationsComponent item : this.investigations) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #investigations} (One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.) - */ - // syntactic sugar - public ClinicalAssessmentInvestigationsComponent addInvestigations() { //3 - ClinicalAssessmentInvestigationsComponent t = new ClinicalAssessmentInvestigationsComponent(); - if (this.investigations == null) - this.investigations = new ArrayList(); - this.investigations.add(t); - return t; - } - - /** - * @return {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value - */ - public UriType getProtocolElement() { - if (this.protocol == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.protocol"); - else if (Configuration.doAutoCreate()) - this.protocol = new UriType(); // bb - return this.protocol; - } - - public boolean hasProtocolElement() { - return this.protocol != null && !this.protocol.isEmpty(); - } - - public boolean hasProtocol() { - return this.protocol != null && !this.protocol.isEmpty(); - } - - /** - * @param value {@link #protocol} (Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getProtocol" gives direct access to the value - */ - public ClinicalAssessment setProtocolElement(UriType value) { - this.protocol = value; - return this; - } - - /** - * @return Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. - */ - public String getProtocol() { - return this.protocol == null ? null : this.protocol.getValue(); - } - - /** - * @param value Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis. - */ - public ClinicalAssessment setProtocol(String value) { - if (Utilities.noString(value)) - this.protocol = null; - else { - if (this.protocol == null) - this.protocol = new UriType(); - this.protocol.setValue(value); - } - return this; - } - - /** - * @return {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value - */ - public StringType getSummaryElement() { - if (this.summary == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.summary"); - else if (Configuration.doAutoCreate()) - this.summary = new StringType(); // bb - return this.summary; - } - - public boolean hasSummaryElement() { - return this.summary != null && !this.summary.isEmpty(); - } - - public boolean hasSummary() { - return this.summary != null && !this.summary.isEmpty(); - } - - /** - * @param value {@link #summary} (A text summary of the investigations and the diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSummary" gives direct access to the value - */ - public ClinicalAssessment setSummaryElement(StringType value) { - this.summary = value; - return this; - } - - /** - * @return A text summary of the investigations and the diagnosis. - */ - public String getSummary() { - return this.summary == null ? null : this.summary.getValue(); - } - - /** - * @param value A text summary of the investigations and the diagnosis. - */ - public ClinicalAssessment setSummary(String value) { - if (Utilities.noString(value)) - this.summary = null; - else { - if (this.summary == null) - this.summary = new StringType(); - this.summary.setValue(value); - } - return this; - } - - /** - * @return {@link #diagnosis} (An specific diagnosis that was considered likely or relevant to ongoing treatment.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (ClinicalAssessmentDiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosis} (An specific diagnosis that was considered likely or relevant to ongoing treatment.) - */ - // syntactic sugar - public ClinicalAssessmentDiagnosisComponent addDiagnosis() { //3 - ClinicalAssessmentDiagnosisComponent t = new ClinicalAssessmentDiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - /** - * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.) - */ - public List getResolved() { - if (this.resolved == null) - this.resolved = new ArrayList(); - return this.resolved; - } - - public boolean hasResolved() { - if (this.resolved == null) - return false; - for (CodeableConcept item : this.resolved) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #resolved} (Diagnoses/conditions resolved since the last assessment.) - */ - // syntactic sugar - public CodeableConcept addResolved() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.resolved == null) - this.resolved = new ArrayList(); - this.resolved.add(t); - return t; - } - - /** - * @return {@link #ruledOut} (Diagnosis considered not possible.) - */ - public List getRuledOut() { - if (this.ruledOut == null) - this.ruledOut = new ArrayList(); - return this.ruledOut; - } - - public boolean hasRuledOut() { - if (this.ruledOut == null) - return false; - for (ClinicalAssessmentRuledOutComponent item : this.ruledOut) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #ruledOut} (Diagnosis considered not possible.) - */ - // syntactic sugar - public ClinicalAssessmentRuledOutComponent addRuledOut() { //3 - ClinicalAssessmentRuledOutComponent t = new ClinicalAssessmentRuledOutComponent(); - if (this.ruledOut == null) - this.ruledOut = new ArrayList(); - this.ruledOut.add(t); - return t; - } - - /** - * @return {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value - */ - public StringType getPrognosisElement() { - if (this.prognosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.prognosis"); - else if (Configuration.doAutoCreate()) - this.prognosis = new StringType(); // bb - return this.prognosis; - } - - public boolean hasPrognosisElement() { - return this.prognosis != null && !this.prognosis.isEmpty(); - } - - public boolean hasPrognosis() { - return this.prognosis != null && !this.prognosis.isEmpty(); - } - - /** - * @param value {@link #prognosis} (Estimate of likely outcome.). This is the underlying object with id, value and extensions. The accessor "getPrognosis" gives direct access to the value - */ - public ClinicalAssessment setPrognosisElement(StringType value) { - this.prognosis = value; - return this; - } - - /** - * @return Estimate of likely outcome. - */ - public String getPrognosis() { - return this.prognosis == null ? null : this.prognosis.getValue(); - } - - /** - * @param value Estimate of likely outcome. - */ - public ClinicalAssessment setPrognosis(String value) { - if (Utilities.noString(value)) - this.prognosis = null; - else { - if (this.prognosis == null) - this.prognosis = new StringType(); - this.prognosis.setValue(value); - } - return this; - } - - /** - * @return {@link #plan} (Plan of action after assessment.) - */ - public Reference getPlan() { - if (this.plan == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.plan"); - else if (Configuration.doAutoCreate()) - this.plan = new Reference(); // cc - return this.plan; - } - - public boolean hasPlan() { - return this.plan != null && !this.plan.isEmpty(); - } - - /** - * @param value {@link #plan} (Plan of action after assessment.) - */ - public ClinicalAssessment setPlan(Reference value) { - this.plan = value; - return this; - } - - /** - * @return {@link #plan} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Plan of action after assessment.) - */ - public CarePlan getPlanTarget() { - if (this.planTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClinicalAssessment.plan"); - else if (Configuration.doAutoCreate()) - this.planTarget = new CarePlan(); // aa - return this.planTarget; - } - - /** - * @param value {@link #plan} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Plan of action after assessment.) - */ - public ClinicalAssessment setPlanTarget(CarePlan value) { - this.planTarget = value; - return this; - } - - /** - * @return {@link #action} (Actions taken during assessment.) - */ - public List getAction() { - if (this.action == null) - this.action = new ArrayList(); - return this.action; - } - - public boolean hasAction() { - if (this.action == null) - return false; - for (Reference item : this.action) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #action} (Actions taken during assessment.) - */ - // syntactic sugar - public Reference addAction() { //3 - Reference t = new Reference(); - if (this.action == null) - this.action = new ArrayList(); - this.action.add(t); - return t; - } - - /** - * @return {@link #action} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Actions taken during assessment.) - */ - public List getActionTarget() { - if (this.actionTarget == null) - this.actionTarget = new ArrayList(); - return this.actionTarget; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("patient", "Reference(Patient)", "The patient being asssesed.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("assessor", "Reference(Practitioner)", "The clinicial performing the assessment.", 0, java.lang.Integer.MAX_VALUE, assessor)); - childrenList.add(new Property("date", "dateTime", "The point in time at which the assessment was concluded (not when it was recorded).", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("description", "string", "A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("previous", "Reference(ClinicalAssessment)", "A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.", 0, java.lang.Integer.MAX_VALUE, previous)); - childrenList.add(new Property("problem", "Reference(Condition|AllergyIntolerance)", "This a list of the general problems/conditions for a patient.", 0, java.lang.Integer.MAX_VALUE, problem)); - childrenList.add(new Property("careplan", "Reference(CarePlan)", "A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.", 0, java.lang.Integer.MAX_VALUE, careplan)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.", 0, java.lang.Integer.MAX_VALUE, referral)); - childrenList.add(new Property("investigations", "", "One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.", 0, java.lang.Integer.MAX_VALUE, investigations)); - childrenList.add(new Property("protocol", "uri", "Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.", 0, java.lang.Integer.MAX_VALUE, protocol)); - childrenList.add(new Property("summary", "string", "A text summary of the investigations and the diagnosis.", 0, java.lang.Integer.MAX_VALUE, summary)); - childrenList.add(new Property("diagnosis", "", "An specific diagnosis that was considered likely or relevant to ongoing treatment.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - childrenList.add(new Property("resolved", "CodeableConcept", "Diagnoses/conditions resolved since the last assessment.", 0, java.lang.Integer.MAX_VALUE, resolved)); - childrenList.add(new Property("ruledOut", "", "Diagnosis considered not possible.", 0, java.lang.Integer.MAX_VALUE, ruledOut)); - childrenList.add(new Property("prognosis", "string", "Estimate of likely outcome.", 0, java.lang.Integer.MAX_VALUE, prognosis)); - childrenList.add(new Property("plan", "Reference(CarePlan)", "Plan of action after assessment.", 0, java.lang.Integer.MAX_VALUE, plan)); - childrenList.add(new Property("action", "Reference(ReferralRequest|ProcedureRequest|Procedure|MedicationPrescription|DiagnosticOrder|NutritionOrder|Supply|Appointment)", "Actions taken during assessment.", 0, java.lang.Integer.MAX_VALUE, action)); - } - - public ClinicalAssessment copy() { - ClinicalAssessment dst = new ClinicalAssessment(); - copyValues(dst); - dst.patient = patient == null ? null : patient.copy(); - dst.assessor = assessor == null ? null : assessor.copy(); - dst.date = date == null ? null : date.copy(); - dst.description = description == null ? null : description.copy(); - dst.previous = previous == null ? null : previous.copy(); - if (problem != null) { - dst.problem = new ArrayList(); - for (Reference i : problem) - dst.problem.add(i.copy()); - }; - dst.careplan = careplan == null ? null : careplan.copy(); - dst.referral = referral == null ? null : referral.copy(); - if (investigations != null) { - dst.investigations = new ArrayList(); - for (ClinicalAssessmentInvestigationsComponent i : investigations) - dst.investigations.add(i.copy()); - }; - dst.protocol = protocol == null ? null : protocol.copy(); - dst.summary = summary == null ? null : summary.copy(); - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (ClinicalAssessmentDiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (resolved != null) { - dst.resolved = new ArrayList(); - for (CodeableConcept i : resolved) - dst.resolved.add(i.copy()); - }; - if (ruledOut != null) { - dst.ruledOut = new ArrayList(); - for (ClinicalAssessmentRuledOutComponent i : ruledOut) - dst.ruledOut.add(i.copy()); - }; - dst.prognosis = prognosis == null ? null : prognosis.copy(); - dst.plan = plan == null ? null : plan.copy(); - if (action != null) { - dst.action = new ArrayList(); - for (Reference i : action) - dst.action.add(i.copy()); - }; - return dst; - } - - protected ClinicalAssessment typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ClinicalAssessment)) - return false; - ClinicalAssessment o = (ClinicalAssessment) other; - return compareDeep(patient, o.patient, true) && compareDeep(assessor, o.assessor, true) && compareDeep(date, o.date, true) - && compareDeep(description, o.description, true) && compareDeep(previous, o.previous, true) && compareDeep(problem, o.problem, true) - && compareDeep(careplan, o.careplan, true) && compareDeep(referral, o.referral, true) && compareDeep(investigations, o.investigations, true) - && compareDeep(protocol, o.protocol, true) && compareDeep(summary, o.summary, true) && compareDeep(diagnosis, o.diagnosis, true) - && compareDeep(resolved, o.resolved, true) && compareDeep(ruledOut, o.ruledOut, true) && compareDeep(prognosis, o.prognosis, true) - && compareDeep(plan, o.plan, true) && compareDeep(action, o.action, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ClinicalAssessment)) - return false; - ClinicalAssessment o = (ClinicalAssessment) other; - return compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(protocol, o.protocol, true) - && compareValues(summary, o.summary, true) && compareValues(prognosis, o.prognosis, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (assessor == null || assessor.isEmpty()) - && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) && (previous == null || previous.isEmpty()) - && (problem == null || problem.isEmpty()) && (careplan == null || careplan.isEmpty()) && (referral == null || referral.isEmpty()) - && (investigations == null || investigations.isEmpty()) && (protocol == null || protocol.isEmpty()) - && (summary == null || summary.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) && (resolved == null || resolved.isEmpty()) - && (ruledOut == null || ruledOut.isEmpty()) && (prognosis == null || prognosis.isEmpty()) - && (plan == null || plan.isEmpty()) && (action == null || action.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.ClinicalAssessment; - } - - @SearchParamDefinition(name="date", path="ClinicalAssessment.date", description="When the assessment occurred", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "previous", path = "ClinicalAssessment.previous", description = "Reference to last assessment", type = "reference") - public static final String SP_PREVIOUS = "previous"; - @SearchParamDefinition(name = "assessor", path = "ClinicalAssessment.assessor", description = "The clinicial performing the assessment", type = "reference") - public static final String SP_ASSESSOR = "assessor"; - @SearchParamDefinition(name="careplan", path="ClinicalAssessment.careplan", description="A specific careplan that prompted this assessment", type="reference" ) - public static final String SP_CAREPLAN = "careplan"; - @SearchParamDefinition(name = "diagnosis", path = "ClinicalAssessment.diagnosis.item", description = "Specific text or code for diagnosis", type = "token") - public static final String SP_DIAGNOSIS = "diagnosis"; - @SearchParamDefinition(name="ruledout", path="ClinicalAssessment.ruledOut.item", description="Specific text of code for diagnosis", type="token" ) - public static final String SP_RULEDOUT = "ruledout"; - @SearchParamDefinition(name = "problem", path = "ClinicalAssessment.problem", description = "General assessment of patient state", type = "reference") - public static final String SP_PROBLEM = "problem"; - @SearchParamDefinition(name = "referral", path = "ClinicalAssessment.referral", description = "A specific referral that lead to this assessment", type = "reference") - public static final String SP_REFERRAL = "referral"; - @SearchParamDefinition(name="patient", path="ClinicalAssessment.patient", description="The patient being asssesed", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="investigation", path="ClinicalAssessment.investigations.item", description="Record of a specific investigation", type="reference" ) - public static final String SP_INVESTIGATION = "investigation"; - @SearchParamDefinition(name = "action", path = "ClinicalAssessment.action", description = "Actions taken during assessment", type = "reference") - public static final String SP_ACTION = "action"; - @SearchParamDefinition(name = "plan", path = "ClinicalAssessment.plan", description = "Plan of action after assessment", type = "reference") - public static final String SP_PLAN = "plan"; - @SearchParamDefinition(name = "resolved", path = "ClinicalAssessment.resolved", description = "Diagnosies/conditions resolved since previous assessment", type = "token") - public static final String SP_RESOLVED = "resolved"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java index e14985dc0f1..2537d895b51 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java @@ -29,11 +29,12 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.Enumerations.*; import org.hl7.fhir.instance.model.annotations.ResourceDef; import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; @@ -45,92 +46,6 @@ import org.hl7.fhir.instance.model.annotations.Description; @ResourceDef(name="ConceptMap", profile="http://hl7.org/fhir/Profile/ConceptMap") public class ConceptMap extends DomainResource { - public enum ValuesetStatus { - /** - * This valueset is still under development. - */ - DRAFT, - /** - * This valueset is ready for normal use. - */ - ACTIVE, - /** - * This valueset has been withdrawn or superceded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static ValuesetStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown ValuesetStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This valueset is still under development."; - case ACTIVE: return "This valueset is ready for normal use."; - case RETIRED: return "This valueset has been withdrawn or superceded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "Draft"; - case ACTIVE: return "Active"; - case RETIRED: return "Retired"; - default: return "?"; - } - } - } - - public static class ValuesetStatusEnumFactory implements EnumFactory { - public ValuesetStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return ValuesetStatus.DRAFT; - if ("active".equals(codeString)) - return ValuesetStatus.ACTIVE; - if ("retired".equals(codeString)) - return ValuesetStatus.RETIRED; - throw new IllegalArgumentException("Unknown ValuesetStatus code '"+codeString+"'"); - } - public String toCode(ValuesetStatus code) { - if (code == ValuesetStatus.DRAFT) - return "draft"; - if (code == ValuesetStatus.ACTIVE) - return "active"; - if (code == ValuesetStatus.RETIRED) - return "retired"; - return "?"; - } - } - public enum ConceptEquivalence { /** * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical). @@ -239,15 +154,15 @@ public class ConceptMap extends DomainResource { } public String getDisplay() { switch (this) { - case EQUIVALENT: return "equivalent"; - case EQUAL: return "equal"; - case WIDER: return "wider"; - case SUBSUMES: return "subsumes"; - case NARROWER: return "narrower"; - case SPECIALISES: return "specialises"; - case INEXACT: return "inexact"; - case UNMATCHED: return "unmatched"; - case DISJOINT: return "disjoint"; + case EQUIVALENT: return "Equivalent"; + case EQUAL: return "Equal"; + case WIDER: return "Wider"; + case SUBSUMES: return "Subsumes"; + case NARROWER: return "Narrower"; + case SPECIALISES: return "Specialises"; + case INEXACT: return "Inexact"; + case UNMATCHED: return "Unmatched"; + case DISJOINT: return "Disjoint"; default: return "?"; } } @@ -301,33 +216,189 @@ public class ConceptMap extends DomainResource { } } + @Block() + public static class ConceptMapContactComponent extends BackboneElement { + /** + * The name of an individual to contact regarding the concept map. + */ + @Child(name ="name", type={StringType.class}, order=1, min=0, max=1) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the concept map." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name ="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + public ConceptMapContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMapContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConceptMapContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the concept map. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the concept map. + */ + public ConceptMapContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ConceptMapContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the concept map.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + public ConceptMapContactComponent copy() { + ConceptMapContactComponent dst = new ConceptMapContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptMapContactComponent)) + return false; + ConceptMapContactComponent o = (ConceptMapContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptMapContactComponent)) + return false; + ConceptMapContactComponent o = (ConceptMapContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + } + @Block() public static class ConceptMapElementComponent extends BackboneElement { /** - * Code System (if the source is a value value set that crosses more than one code system). + * An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system). */ - @Child(name="codeSystem", type={UriType.class}, order=1, min=0, max=1) - @Description(shortDefinition="Code System (if value set crosses code systems)", formalDefinition="Code System (if the source is a value value set that crosses more than one code system)." ) + @Child(name ="codeSystem", type={UriType.class}, order=1, min=0, max=1) + @Description(shortDefinition="Code System (if value set crosses code systems)", formalDefinition="An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system)." ) protected UriType codeSystem; /** * Identity (code or path) or the element/item being mapped. */ - @Child(name="code", type={CodeType.class}, order=2, min=0, max=1) + @Child(name ="code", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="Identifies element being mapped", formalDefinition="Identity (code or path) or the element/item being mapped." ) protected CodeType code; /** * A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value. */ - @Child(name="dependsOn", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="dependsOn", type={}, order=3, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other elements required for this mapping (from context)", formalDefinition="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value." ) protected List dependsOn; /** * A concept from the target value set that this concept maps to. */ - @Child(name="map", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="map", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Target of this map", formalDefinition="A concept from the target value set that this concept maps to." ) protected List map; @@ -338,7 +409,7 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (Code System (if the source is a value value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public UriType getCodeSystemElement() { if (this.codeSystem == null) @@ -358,7 +429,7 @@ public class ConceptMap extends DomainResource { } /** - * @param value {@link #codeSystem} (Code System (if the source is a value value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public ConceptMapElementComponent setCodeSystemElement(UriType value) { this.codeSystem = value; @@ -366,14 +437,14 @@ public class ConceptMap extends DomainResource { } /** - * @return Code System (if the source is a value value set that crosses more than one code system). + * @return An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system). */ public String getCodeSystem() { return this.codeSystem == null ? null : this.codeSystem.getValue(); } /** - * @param value Code System (if the source is a value value set that crosses more than one code system). + * @param value An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system). */ public ConceptMapElementComponent setCodeSystem(String value) { if (Utilities.noString(value)) @@ -465,6 +536,16 @@ public class ConceptMap extends DomainResource { return t; } + // syntactic sugar + public ConceptMapElementComponent addDependsOn(OtherElementComponent t) { //3 + if (t == null) + return this; + if (this.dependsOn == null) + this.dependsOn = new ArrayList(); + this.dependsOn.add(t); + return this; + } + /** * @return {@link #map} (A concept from the target value set that this concept maps to.) */ @@ -495,9 +576,19 @@ public class ConceptMap extends DomainResource { return t; } + // syntactic sugar + public ConceptMapElementComponent addMap(ConceptMapElementMapComponent t) { //3 + if (t == null) + return this; + if (this.map == null) + this.map = new ArrayList(); + this.map.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("codeSystem", "uri", "Code System (if the source is a value value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the Code System (if the source is a value value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn)); childrenList.add(new Property("map", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, map)); @@ -554,21 +645,21 @@ public class ConceptMap extends DomainResource { /** * A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition. */ - @Child(name="element", type={UriType.class}, order=1, min=1, max=1) + @Child(name ="element", type={UriType.class}, order=1, min=1, max=1) @Description(shortDefinition="Reference to element/field/valueset mapping depends on", formalDefinition="A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition." ) protected UriType element; /** - * The code system of the dependency code (if the source/dependency is a value set that cross code systems). + * An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems). */ - @Child(name="codeSystem", type={UriType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Code System (if necessary)", formalDefinition="The code system of the dependency code (if the source/dependency is a value set that cross code systems)." ) + @Child(name ="codeSystem", type={UriType.class}, order=2, min=1, max=1) + @Description(shortDefinition="Code System (if necessary)", formalDefinition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems)." ) protected UriType codeSystem; /** * Identity (code or path) or the element/item that the map depends on / refers to. */ - @Child(name="code", type={StringType.class}, order=3, min=1, max=1) + @Child(name ="code", type={StringType.class}, order=3, min=1, max=1) @Description(shortDefinition="Value of the referenced element", formalDefinition="Identity (code or path) or the element/item that the map depends on / refers to." ) protected StringType code; @@ -631,7 +722,7 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (The code system of the dependency code (if the source/dependency is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public UriType getCodeSystemElement() { if (this.codeSystem == null) @@ -651,7 +742,7 @@ public class ConceptMap extends DomainResource { } /** - * @param value {@link #codeSystem} (The code system of the dependency code (if the source/dependency is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public OtherElementComponent setCodeSystemElement(UriType value) { this.codeSystem = value; @@ -659,14 +750,14 @@ public class ConceptMap extends DomainResource { } /** - * @return The code system of the dependency code (if the source/dependency is a value set that cross code systems). + * @return An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems). */ public String getCodeSystem() { return this.codeSystem == null ? null : this.codeSystem.getValue(); } /** - * @param value The code system of the dependency code (if the source/dependency is a value set that cross code systems). + * @param value An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems). */ public OtherElementComponent setCodeSystem(String value) { if (this.codeSystem == null) @@ -723,7 +814,7 @@ public class ConceptMap extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("element", "uri", "A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.", 0, java.lang.Integer.MAX_VALUE, element)); - childrenList.add(new Property("codeSystem", "uri", "The code system of the dependency code (if the source/dependency is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code)); } @@ -768,37 +859,37 @@ public class ConceptMap extends DomainResource { @Block() public static class ConceptMapElementMapComponent extends BackboneElement { /** - * The code system of the target code (if the target is a value set that cross code systems). + * An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ - @Child(name="codeSystem", type={UriType.class}, order=1, min=0, max=1) - @Description(shortDefinition="System of the target (if necessary)", formalDefinition="The code system of the target code (if the target is a value set that cross code systems)." ) + @Child(name ="codeSystem", type={UriType.class}, order=1, min=0, max=1) + @Description(shortDefinition="System of the target (if necessary)", formalDefinition="An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems)." ) protected UriType codeSystem; /** * Identity (code or path) or the element/item that the map refers to. */ - @Child(name="code", type={CodeType.class}, order=2, min=0, max=1) + @Child(name ="code", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="Code that identifies the target element", formalDefinition="Identity (code or path) or the element/item that the map refers to." ) protected CodeType code; /** * The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from source to target (e.g. the source is 'wider' than the target. */ - @Child(name="equivalence", type={CodeType.class}, order=3, min=1, max=1) + @Child(name ="equivalence", type={CodeType.class}, order=3, min=1, max=1) @Description(shortDefinition="equivalent | equal | wider | subsumes | narrower | specialises | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from source to target (e.g. the source is 'wider' than the target." ) protected Enumeration equivalence; /** * A description of status/issues in mapping that conveys additional information not represented in the structured data. */ - @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) + @Child(name ="comments", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Description of status/issues in mapping", formalDefinition="A description of status/issues in mapping that conveys additional information not represented in the structured data." ) protected StringType comments; /** * A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on. */ - @Child(name="product", type={OtherElementComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="product", type={OtherElementComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." ) protected List product; @@ -814,7 +905,7 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (The code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public UriType getCodeSystemElement() { if (this.codeSystem == null) @@ -834,7 +925,7 @@ public class ConceptMap extends DomainResource { } /** - * @param value {@link #codeSystem} (The code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value */ public ConceptMapElementMapComponent setCodeSystemElement(UriType value) { this.codeSystem = value; @@ -842,14 +933,14 @@ public class ConceptMap extends DomainResource { } /** - * @return The code system of the target code (if the target is a value set that cross code systems). + * @return An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ public String getCodeSystem() { return this.codeSystem == null ? null : this.codeSystem.getValue(); } /** - * @param value The code system of the target code (if the target is a value set that cross code systems). + * @param value An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ public ConceptMapElementMapComponent setCodeSystem(String value) { if (Utilities.noString(value)) @@ -1035,9 +1126,19 @@ public class ConceptMap extends DomainResource { return t; } + // syntactic sugar + public ConceptMapElementMapComponent addProduct(OtherElementComponent t) { //3 + if (t == null) + return this; + if (this.product == null) + this.product = new ArrayList(); + this.product.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("codeSystem", "uri", "The code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from source to target (e.g. the source is 'wider' than the target.", 0, java.lang.Integer.MAX_VALUE, equivalence)); childrenList.add(new Property("comments", "string", "A description of status/issues in mapping that conveys additional information not represented in the structured data.", 0, java.lang.Integer.MAX_VALUE, comments)); @@ -1090,103 +1191,124 @@ public class ConceptMap extends DomainResource { } /** - * The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). */ - @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1) - @Description(shortDefinition="Logical id to reference this concept map", formalDefinition="The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) - protected StringType identifier; + @Child(name ="url", type={UriType.class}, order=0, min=0, max=1) + @Description(shortDefinition="Globally unique logical id for concept map", formalDefinition="An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:)." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance. + */ + @Child(name ="identifier", type={Identifier.class}, order=1, min=0, max=1) + @Description(shortDefinition="Additional identifier for the concept map", formalDefinition="Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance." ) + protected Identifier identifier; /** * The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) + @Child(name ="version", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Logical id for this version of the concept map", formalDefinition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name describing the concept map. */ - @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) + @Child(name ="name", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." ) protected StringType name; + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps. + */ + @Child(name ="useContext", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps." ) + protected List useContext; + /** * The name of the individual or organization that published the concept map. */ - @Child(name = "publisher", type = {StringType.class}, order = 3, min = 0, max = 1) + @Child(name ="publisher", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." ) protected StringType publisher; /** - * Contacts of the publisher to assist a user in finding and communicating with the publisher. + * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." ) - protected List telecom; + @Child(name ="contact", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; /** * A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc. */ - @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) + @Child(name ="description", type={StringType.class}, order=7, min=0, max=1) @Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." ) protected StringType description; + /** + * Explains why this concept map is needed and why it's been constrained as it has. + */ + @Child(name ="requirements", type={StringType.class}, order=8, min=0, max=1) + @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this concept map is needed and why it's been constrained as it has." ) + protected StringType requirements; + /** * A copyright statement relating to the concept map and/or its contents. */ - @Child(name = "copyright", type = {StringType.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="About the concept map or its content", formalDefinition="A copyright statement relating to the concept map and/or its contents." ) + @Child(name ="copyright", type={StringType.class}, order=9, min=0, max=1) + @Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents." ) protected StringType copyright; /** * The status of the concept map. */ - @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) + @Child(name ="status", type={CodeType.class}, order=10, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." ) - protected Enumeration status; + protected Enumeration status; /** * This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name = "experimental", type = {BooleanType.class}, order = 8, min = 0, max = 1) + @Child(name ="experimental", type={BooleanType.class}, order=11, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that the concept map status was last changed. */ - @Child(name = "date", type = {DateTimeType.class}, order = 9, min = 0, max = 1) + @Child(name ="date", type={DateTimeType.class}, order=12, min=0, max=1) @Description(shortDefinition="Date for given status", formalDefinition="The date that the concept map status was last changed." ) protected DateTimeType date; /** * The source value set that specifies the concepts that are being mapped. */ - @Child(name = "source", type = {UriType.class, ValueSet.class, Profile.class}, order = 10, min = 1, max = 1) + @Child(name ="source", type={UriType.class, ValueSet.class, StructureDefinition.class}, order=13, min=1, max=1) @Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." ) protected Type source; /** * The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made. */ - @Child(name = "target", type = {UriType.class, ValueSet.class, Profile.class}, order = 11, min = 1, max = 1) + @Child(name ="target", type={UriType.class, ValueSet.class, StructureDefinition.class}, order=14, min=1, max=1) @Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." ) protected Type target; /** * Mappings for an individual concept in the source to one or more concepts in the target. */ - @Child(name = "element", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="element", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." ) protected List element; - private static final long serialVersionUID = 1130142902L; + private static final long serialVersionUID = 729155675L; public ConceptMap() { super(); } - public ConceptMap(Enumeration status, Type source, Type target) { + public ConceptMap(Enumeration status, Type source, Type target) { super(); this.status = status; this.source = source; @@ -1194,54 +1316,78 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #identifier} (The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @return {@link #url} (An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ - public StringType getIdentifierElement() { + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ConceptMap setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). + */ + public ConceptMap setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.) + */ + public Identifier getIdentifier() { if (this.identifier == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConceptMap.identifier"); else if (Configuration.doAutoCreate()) - this.identifier = new StringType(); // bb + this.identifier = new Identifier(); // cc return this.identifier; } - public boolean hasIdentifierElement() { - return this.identifier != null && !this.identifier.isEmpty(); - } - public boolean hasIdentifier() { return this.identifier != null && !this.identifier.isEmpty(); } /** - * @param value {@link #identifier} (The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @param value {@link #identifier} (Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.) */ - public ConceptMap setIdentifierElement(StringType value) { + public ConceptMap setIdentifier(Identifier value) { this.identifier = value; return this; } - /** - * @return The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). - */ - public String getIdentifier() { - return this.identifier == null ? null : this.identifier.getValue(); - } - - /** - * @param value The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). - */ - public ConceptMap setIdentifier(String value) { - if (Utilities.noString(value)) - this.identifier = null; - else { - if (this.identifier == null) - this.identifier = new StringType(); - this.identifier.setValue(value); - } - return this; - } - /** * @return {@link #version} (The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value */ @@ -1340,6 +1486,46 @@ public class ConceptMap extends DomainResource { return this; } + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public ConceptMap addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + /** * @return {@link #publisher} (The name of the individual or organization that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ @@ -1390,35 +1576,45 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #telecom} (Contacts of the publisher to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; } - public boolean hasTelecom() { - if (this.telecom == null) + public boolean hasContact() { + if (this.contact == null) return false; - for (ContactPoint item : this.telecom) + for (ConceptMapContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #telecom} (Contacts of the publisher to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); + public ConceptMapContactComponent addContact() { //3 + ConceptMapContactComponent t = new ConceptMapContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); return t; } + // syntactic sugar + public ConceptMap addContact(ConceptMapContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** * @return {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ @@ -1468,6 +1664,55 @@ public class ConceptMap extends DomainResource { return this; } + /** + * @return {@link #requirements} (Explains why this concept map is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptMap.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this concept map is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public ConceptMap setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this concept map is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this concept map is needed and why it's been constrained as it has. + */ + public ConceptMap setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + /** * @return {@link #copyright} (A copyright statement relating to the concept map and/or its contents.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value */ @@ -1520,12 +1765,12 @@ public class ConceptMap extends DomainResource { /** * @return {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Enumeration getStatusElement() { + public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConceptMap.status"); else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ValuesetStatusEnumFactory()); // bb + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb return this.status; } @@ -1540,7 +1785,7 @@ public class ConceptMap extends DomainResource { /** * @param value {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public ConceptMap setStatusElement(Enumeration value) { + public ConceptMap setStatusElement(Enumeration value) { this.status = value; return this; } @@ -1548,16 +1793,16 @@ public class ConceptMap extends DomainResource { /** * @return The status of the concept map. */ - public ValuesetStatus getStatus() { + public ConformanceResourceStatus getStatus() { return this.status == null ? null : this.status.getValue(); } /** * @param value The status of the concept map. */ - public ConceptMap setStatus(ValuesetStatus value) { + public ConceptMap setStatus(ConformanceResourceStatus value) { if (this.status == null) - this.status = new Enumeration(new ValuesetStatusEnumFactory()); + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); this.status.setValue(value); return this; } @@ -1594,7 +1839,7 @@ public class ConceptMap extends DomainResource { * @return This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); } /** @@ -1760,36 +2005,56 @@ public class ConceptMap extends DomainResource { return t; } + // syntactic sugar + public ConceptMap addElement(ConceptMapElementComponent t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "string", "The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("url", "uri", "An absolute uri that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("name", "string", "A free text natural language name describing the concept map.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept maps.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the concept map.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contacts of the publisher to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("description", "string", "A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "Explains why this concept map is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the concept map and/or its contents.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("status", "code", "The status of the concept map.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("experimental", "boolean", "This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); childrenList.add(new Property("date", "dateTime", "The date that the concept map status was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("source[x]", "uri|Reference(ValueSet|Profile)", "The source value set that specifies the concepts that are being mapped.", 0, java.lang.Integer.MAX_VALUE, source)); - childrenList.add(new Property("target[x]", "uri|Reference(ValueSet|Profile)", "The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("source[x]", "uri|Reference(ValueSet|StructureDefinition)", "The source value set that specifies the concepts that are being mapped.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("target[x]", "uri|Reference(ValueSet|StructureDefinition)", "The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, java.lang.Integer.MAX_VALUE, target)); childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element)); } public ConceptMap copy() { ConceptMap dst = new ConceptMap(); copyValues(dst); + dst.url = url == null ? null : url.copy(); dst.identifier = identifier == null ? null : identifier.copy(); dst.version = version == null ? null : version.copy(); dst.name = name == null ? null : name.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); + if (contact != null) { + dst.contact = new ArrayList(); + for (ConceptMapContactComponent i : contact) + dst.contact.add(i.copy()); }; dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); dst.copyright = copyright == null ? null : copyright.copy(); dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); @@ -1815,8 +2080,9 @@ public class ConceptMap extends DomainResource { if (!(other instanceof ConceptMap)) return false; ConceptMap o = (ConceptMap) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) - && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) && compareDeep(description, o.description, true) + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(useContext, o.useContext, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(element, o.element, true); @@ -1829,16 +2095,17 @@ public class ConceptMap extends DomainResource { if (!(other instanceof ConceptMap)) return false; ConceptMap o = (ConceptMap) other; - return compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) - && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(copyright, o.copyright, true) - && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) - ; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) + && compareValues(date, o.date, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (name == null || name.isEmpty()) && (publisher == null || publisher.isEmpty()) && (telecom == null || telecom.isEmpty()) - && (description == null || description.isEmpty()) && (copyright == null || copyright.isEmpty()) + return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (description == null || description.isEmpty()) + && (requirements == null || requirements.isEmpty()) && (copyright == null || copyright.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) && (date == null || date.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty()) && (element == null || element.isEmpty()); @@ -1849,30 +2116,34 @@ public class ConceptMap extends DomainResource { return ResourceType.ConceptMap; } - @SearchParamDefinition(name = "date", path = "ConceptMap.date", description = "The concept map publication date", type = "date") - public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "identifier", path = "ConceptMap.identifier", description = "The identifier of the concept map", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="token" ) + @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="Additional identifier for the concept map", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="uri" ) public static final String SP_PRODUCT = "product"; - @SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="token" ) - public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name = "dependson", path = "ConceptMap.element.dependsOn.element", description = "Reference to element/field/valueset mapping depends on", type = "token") - public static final String SP_DEPENDSON = "dependson"; - @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "description", path = "ConceptMap.description", description = "Text search in the description of the concept map", type = "string") - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name = "source", path = "ConceptMap.source[x]", description = "The system for any concepts mapped by this concept map", type = "reference") - public static final String SP_SOURCE = "source"; + @SearchParamDefinition(name="dependson", path="ConceptMap.element.dependsOn.element", description="Reference to element/field/valueset mapping depends on", type="uri" ) + public static final String SP_DEPENDSON = "dependson"; + @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" ) + public static final String SP_SOURCE = "source"; @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name = "status", path = "ConceptMap.status", description = "Status of the concept map", type = "token") - public static final String SP_STATUS = "status"; - @SearchParamDefinition(name = "target", path = "ConceptMap.target[x]", description = "Provides context to the mappings", type = "reference") - public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="url", path="ConceptMap.url", description="The url of the concept map", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" ) + public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="uri" ) + public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java index 86997a8702c..d39a844fb82 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java @@ -29,11 +29,12 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.Enumerations.*; import org.hl7.fhir.instance.model.annotations.ResourceDef; import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; @@ -45,92 +46,6 @@ import org.hl7.fhir.instance.model.annotations.Description; @ResourceDef(name="Conformance", profile="http://hl7.org/fhir/Profile/Conformance") public class Conformance extends DomainResource { - public enum ConformanceStatementStatus { - /** - * This conformance statement is still under development. - */ - DRAFT, - /** - * This conformance statement is ready for use in production systems. - */ - ACTIVE, - /** - * This conformance statement has been withdrawn or superceded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static ConformanceStatementStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown ConformanceStatementStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This conformance statement is still under development."; - case ACTIVE: return "This conformance statement is ready for use in production systems."; - case RETIRED: return "This conformance statement has been withdrawn or superceded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - } - - public static class ConformanceStatementStatusEnumFactory implements EnumFactory { - public ConformanceStatementStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return ConformanceStatementStatus.DRAFT; - if ("active".equals(codeString)) - return ConformanceStatementStatus.ACTIVE; - if ("retired".equals(codeString)) - return ConformanceStatementStatus.RETIRED; - throw new IllegalArgumentException("Unknown ConformanceStatementStatus code '"+codeString+"'"); - } - public String toCode(ConformanceStatementStatus code) { - if (code == ConformanceStatementStatus.DRAFT) - return "draft"; - if (code == ConformanceStatementStatus.ACTIVE) - return "active"; - if (code == ConformanceStatementStatus.RETIRED) - return "retired"; - return "?"; - } - } - public enum RestfulConformanceMode { /** * The application acts as a client for this resource. @@ -169,19 +84,15 @@ public class Conformance extends DomainResource { } public String getDefinition() { switch (this) { - case CLIENT: - return "The application acts as a client for this resource."; - case SERVER: - return "The application acts as a server for this resource."; + case CLIENT: return "The application acts as a client for this resource."; + case SERVER: return "The application acts as a server for this resource."; default: return "?"; } } public String getDisplay() { switch (this) { - case CLIENT: - return "Client"; - case SERVER: - return "Server"; + case CLIENT: return "Client"; + case SERVER: return "Server"; default: return "?"; } } @@ -315,15 +226,15 @@ public class Conformance extends DomainResource { } public String getDisplay() { switch (this) { - case READ: return "read"; - case VREAD: return "vread"; - case UPDATE: return "update"; - case DELETE: return "delete"; - case HISTORYINSTANCE: return "history-instance"; - case VALIDATE: return "validate"; - case HISTORYTYPE: return "history-type"; - case CREATE: return "create"; - case SEARCHTYPE: return "search-type"; + case READ: return "Read"; + case VREAD: return "Vread"; + case UPDATE: return "Update"; + case DELETE: return "Delete"; + case HISTORYINSTANCE: return "History Instance"; + case VALIDATE: return "Validate"; + case HISTORYTYPE: return "History Type"; + case CREATE: return "Create"; + case SEARCHTYPE: return "Search Type"; default: return "?"; } } @@ -492,6 +403,10 @@ public class Conformance extends DomainResource { * A search parameter that searches on a quantity. */ QUANTITY, + /** + * A search parameter that searches on a URI (RFC 3986). + */ + URI, /** * added to help the parsers */ @@ -513,6 +428,8 @@ public class Conformance extends DomainResource { return COMPOSITE; if ("quantity".equals(codeString)) return QUANTITY; + if ("uri".equals(codeString)) + return URI; throw new Exception("Unknown SearchParamType code '"+codeString+"'"); } public String toCode() { @@ -524,6 +441,7 @@ public class Conformance extends DomainResource { case REFERENCE: return "reference"; case COMPOSITE: return "composite"; case QUANTITY: return "quantity"; + case URI: return "uri"; default: return "?"; } } @@ -536,6 +454,7 @@ public class Conformance extends DomainResource { case REFERENCE: return ""; case COMPOSITE: return ""; case QUANTITY: return ""; + case URI: return ""; default: return "?"; } } @@ -548,18 +467,20 @@ public class Conformance extends DomainResource { case REFERENCE: return "A reference to another resource."; case COMPOSITE: return "A composite search parameter that combines a search on two values together."; case QUANTITY: return "A search parameter that searches on a quantity."; + case URI: return "A search parameter that searches on a URI (RFC 3986)."; default: return "?"; } } public String getDisplay() { switch (this) { - case NUMBER: return "number"; - case DATE: return "date"; - case STRING: return "string"; - case TOKEN: return "token"; - case REFERENCE: return "reference"; - case COMPOSITE: return "composite"; - case QUANTITY: return "quantity"; + case NUMBER: return "Number"; + case DATE: return "Date/DateTime"; + case STRING: return "String"; + case TOKEN: return "Token"; + case REFERENCE: return "Reference"; + case COMPOSITE: return "Composite"; + case QUANTITY: return "Quantity"; + case URI: return "URI"; default: return "?"; } } @@ -584,6 +505,8 @@ public class Conformance extends DomainResource { return SearchParamType.COMPOSITE; if ("quantity".equals(codeString)) return SearchParamType.QUANTITY; + if ("uri".equals(codeString)) + return SearchParamType.URI; throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'"); } public String toCode(SearchParamType code) { @@ -601,6 +524,8 @@ public class Conformance extends DomainResource { return "composite"; if (code == SearchParamType.QUANTITY) return "quantity"; + if (code == SearchParamType.URI) + return "uri"; return "?"; } } @@ -659,9 +584,9 @@ public class Conformance extends DomainResource { } public String getDisplay() { switch (this) { - case TRANSACTION: return "transaction"; - case SEARCHSYSTEM: return "search-system"; - case HISTORYSYSTEM: return "history-system"; + case TRANSACTION: return "Transaction"; + case SEARCHSYSTEM: return "Search System"; + case HISTORYSYSTEM: return "History System"; default: return "?"; } } @@ -822,8 +747,8 @@ public class Conformance extends DomainResource { } public String getDisplay() { switch (this) { - case SENDER: return "sender"; - case RECEIVER: return "receiver"; + case SENDER: return "Sender"; + case RECEIVER: return "Receiver"; default: return "?"; } } @@ -894,8 +819,8 @@ public class Conformance extends DomainResource { } public String getDisplay() { switch (this) { - case PRODUCER: return "producer"; - case CONSUMER: return "consumer"; + case PRODUCER: return "Producer"; + case CONSUMER: return "Consumer"; default: return "?"; } } @@ -921,26 +846,182 @@ public class Conformance extends DomainResource { } } + @Block() + public static class ConformanceContactComponent extends BackboneElement { + /** + * The name of an individual to contact regarding the conformance. + */ + @Child(name ="name", type={StringType.class}, order=1, min=0, max=1) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the conformance." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name ="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + public ConformanceContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the conformance.). 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 ConformanceContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the conformance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ConformanceContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the conformance. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the conformance. + */ + public ConformanceContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ConformanceContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the conformance.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + public ConformanceContactComponent copy() { + ConformanceContactComponent dst = new ConformanceContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConformanceContactComponent)) + return false; + ConformanceContactComponent o = (ConformanceContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConformanceContactComponent)) + return false; + ConformanceContactComponent o = (ConformanceContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + } + @Block() public static class ConformanceSoftwareComponent extends BackboneElement { /** * Name software is known by. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name ="name", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="A name the software is known by", formalDefinition="Name software is known by." ) protected StringType name; /** * The version identifier for the software covered by this statement. */ - @Child(name="version", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="version", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Version covered by this statement", formalDefinition="The version identifier for the software covered by this statement." ) protected StringType version; /** * Date this version of the software released. */ - @Child(name="releaseDate", type={DateTimeType.class}, order=3, min=0, max=1) + @Child(name ="releaseDate", type={DateTimeType.class}, order=3, min=0, max=1) @Description(shortDefinition="Date this version released", formalDefinition="Date this version of the software released." ) protected DateTimeType releaseDate; @@ -1148,15 +1229,15 @@ public class Conformance extends DomainResource { /** * Information about the specific installation that this conformance statement relates to. */ - @Child(name="description", type={StringType.class}, order=1, min=1, max=1) + @Child(name ="description", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="Describes this specific instance", formalDefinition="Information about the specific installation that this conformance statement relates to." ) protected StringType description; /** - * A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + * An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. */ - @Child(name="url", type={UriType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Base URL for the installation", formalDefinition="A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." ) + @Child(name ="url", type={UriType.class}, order=2, min=0, max=1) + @Description(shortDefinition="Base URL for the installation", formalDefinition="An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." ) protected UriType url; private static final long serialVersionUID = -289238508L; @@ -1216,7 +1297,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #url} (A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @return {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public UriType getUrlElement() { if (this.url == null) @@ -1236,7 +1317,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #url} (A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @param value {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public ConformanceImplementationComponent setUrlElement(UriType value) { this.url = value; @@ -1244,14 +1325,14 @@ public class Conformance extends DomainResource { } /** - * @return A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + * @return An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. */ public String getUrl() { return this.url == null ? null : this.url.getValue(); } /** - * @param value A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + * @param value An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. */ public ConformanceImplementationComponent setUrl(String value) { if (Utilities.noString(value)) @@ -1267,7 +1348,7 @@ public class Conformance extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("description", "string", "Information about the specific installation that this conformance statement relates to.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("url", "uri", "A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("url", "uri", "An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, java.lang.Integer.MAX_VALUE, url)); } public ConformanceImplementationComponent copy() { @@ -1310,53 +1391,60 @@ public class Conformance extends DomainResource { /** * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. */ - @Child(name="mode", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="mode", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="client | server", formalDefinition="Identifies whether this portion of the statement is describing ability to initiate or receive restful operations." ) protected Enumeration mode; /** * Information about the system's restful capabilities that apply across all applications, such as security. */ - @Child(name="documentation", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="General description of implementation", formalDefinition="Information about the system's restful capabilities that apply across all applications, such as security." ) protected StringType documentation; /** - * Information about security of implementation. + * Information about security implementation from an interface perspective - what a client needs to know. */ - @Child(name="security", type={}, order=3, min=0, max=1) - @Description(shortDefinition="Information about security of implementation", formalDefinition="Information about security of implementation." ) + @Child(name ="security", type={}, order=3, min=0, max=1) + @Description(shortDefinition="Information about security of implementation", formalDefinition="Information about security implementation from an interface perspective - what a client needs to know." ) protected ConformanceRestSecurityComponent security; /** * A specification of the restful capabilities of the solution for a specific resource type. */ - @Child(name="resource", type={}, order=4, min=1, max=Child.MAX_UNLIMITED) + @Child(name ="resource", type={}, order=4, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." ) protected List resource; /** * A specification of restful operations supported by the system. */ - @Child(name="interaction", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="interaction", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="What operations are supported?", formalDefinition="A specification of restful operations supported by the system." ) protected List interaction; /** * Definition of an operation or a named query and with its parameters and their meaning and type. */ - @Child(name="operation", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="operation", type={}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Definition of an operation or a custom query", formalDefinition="Definition of an operation or a named query and with its parameters and their meaning and type." ) protected List operation; /** - * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose. + * A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose. */ - @Child(name="documentMailbox", type={UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="How documents are accepted in /Mailbox", formalDefinition="A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier 'http://hl7.org/fhir/documents/mailbox'. Other specifications can declare their own identifier for this purpose." ) + @Child(name ="documentMailbox", type={UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="How documents are accepted in /Mailbox", formalDefinition="A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier 'http://hl7.org/fhir/documents/mailbox'. Other specifications can declare their own identifier for this purpose." ) protected List documentMailbox; - private static final long serialVersionUID = 777542519L; + /** + * An absolute URI which is a reference to the definition of a compartment hosted by the system. + */ + @Child(name ="compartment", type={UriType.class}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment hosted by the system." ) + protected List compartment; + + private static final long serialVersionUID = -535980615L; public ConformanceRestComponent() { super(); @@ -1462,7 +1550,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #security} (Information about security of implementation.) + * @return {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) */ public ConformanceRestSecurityComponent getSecurity() { if (this.security == null) @@ -1478,7 +1566,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #security} (Information about security of implementation.) + * @param value {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) */ public ConformanceRestComponent setSecurity(ConformanceRestSecurityComponent value) { this.security = value; @@ -1515,6 +1603,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestComponent addResource(ConformanceRestResourceComponent t) { //3 + if (t == null) + return this; + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return this; + } + /** * @return {@link #interaction} (A specification of restful operations supported by the system.) */ @@ -1545,6 +1643,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestComponent addInteraction(SystemInteractionComponent t) { //3 + if (t == null) + return this; + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return this; + } + /** * @return {@link #operation} (Definition of an operation or a named query and with its parameters and their meaning and type.) */ @@ -1575,8 +1683,18 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestComponent addOperation(ConformanceRestOperationComponent t) { //3 + if (t == null) + return this; + if (this.operation == null) + this.operation = new ArrayList(); + this.operation.add(t); + return this; + } + /** - * @return {@link #documentMailbox} (A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) + * @return {@link #documentMailbox} (A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) */ public List getDocumentMailbox() { if (this.documentMailbox == null) @@ -1594,7 +1712,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #documentMailbox} (A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) + * @return {@link #documentMailbox} (A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) */ // syntactic sugar public UriType addDocumentMailboxElement() {//2 @@ -1606,7 +1724,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #documentMailbox} (A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) + * @param value {@link #documentMailbox} (A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) */ public ConformanceRestComponent addDocumentMailbox(String value) { //1 UriType t = new UriType(); @@ -1618,7 +1736,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #documentMailbox} (A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) + * @param value {@link #documentMailbox} (A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier "http://hl7.org/fhir/documents/mailbox". Other specifications can declare their own identifier for this purpose.) */ public boolean hasDocumentMailbox(String value) { if (this.documentMailbox == null) @@ -1629,15 +1747,70 @@ public class Conformance extends DomainResource { return false; } + /** + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public List getCompartment() { + if (this.compartment == null) + this.compartment = new ArrayList(); + return this.compartment; + } + + public boolean hasCompartment() { + if (this.compartment == null) + return false; + for (UriType item : this.compartment) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + // syntactic sugar + public UriType addCompartmentElement() {//2 + UriType t = new UriType(); + if (this.compartment == null) + this.compartment = new ArrayList(); + this.compartment.add(t); + return t; + } + + /** + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public ConformanceRestComponent addCompartment(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.compartment == null) + this.compartment = new ArrayList(); + this.compartment.add(t); + return this; + } + + /** + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + */ + public boolean hasCompartment(String value) { + if (this.compartment == null) + return false; + for (UriType v : this.compartment) + if (v.equals(value)) // uri + return true; + return false; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("mode", "code", "Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.", 0, java.lang.Integer.MAX_VALUE, mode)); childrenList.add(new Property("documentation", "string", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, java.lang.Integer.MAX_VALUE, documentation)); - childrenList.add(new Property("security", "", "Information about security of implementation.", 0, java.lang.Integer.MAX_VALUE, security)); + childrenList.add(new Property("security", "", "Information about security implementation from an interface perspective - what a client needs to know.", 0, java.lang.Integer.MAX_VALUE, security)); childrenList.add(new Property("resource", "", "A specification of the restful capabilities of the solution for a specific resource type.", 0, java.lang.Integer.MAX_VALUE, resource)); childrenList.add(new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction)); childrenList.add(new Property("operation", "", "Definition of an operation or a named query and with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation)); - childrenList.add(new Property("documentMailbox", "uri", "A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier 'http://hl7.org/fhir/documents/mailbox'. Other specifications can declare their own identifier for this purpose.", 0, java.lang.Integer.MAX_VALUE, documentMailbox)); + childrenList.add(new Property("documentMailbox", "uri", "A list of absolute URIs that identify profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier 'http://hl7.org/fhir/documents/mailbox'. Other specifications can declare their own identifier for this purpose.", 0, java.lang.Integer.MAX_VALUE, documentMailbox)); + childrenList.add(new Property("compartment", "uri", "An absolute URI which is a reference to the definition of a compartment hosted by the system.", 0, java.lang.Integer.MAX_VALUE, compartment)); } public ConformanceRestComponent copy() { @@ -1666,6 +1839,11 @@ public class Conformance extends DomainResource { for (UriType i : documentMailbox) dst.documentMailbox.add(i.copy()); }; + if (compartment != null) { + dst.compartment = new ArrayList(); + for (UriType i : compartment) + dst.compartment.add(i.copy()); + }; return dst; } @@ -1678,7 +1856,8 @@ public class Conformance extends DomainResource { ConformanceRestComponent o = (ConformanceRestComponent) other; return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(security, o.security, true) && compareDeep(resource, o.resource, true) && compareDeep(interaction, o.interaction, true) && compareDeep(operation, o.operation, true) - && compareDeep(documentMailbox, o.documentMailbox, true); + && compareDeep(documentMailbox, o.documentMailbox, true) && compareDeep(compartment, o.compartment, true) + ; } @Override @@ -1689,14 +1868,14 @@ public class Conformance extends DomainResource { return false; ConformanceRestComponent o = (ConformanceRestComponent) other; return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) && compareValues(documentMailbox, o.documentMailbox, true) - ; + && compareValues(compartment, o.compartment, true); } public boolean isEmpty() { return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) && (security == null || security.isEmpty()) && (resource == null || resource.isEmpty()) && (interaction == null || interaction.isEmpty()) && (operation == null || operation.isEmpty()) && (documentMailbox == null || documentMailbox.isEmpty()) - ; + && (compartment == null || compartment.isEmpty()); } } @@ -1706,28 +1885,28 @@ public class Conformance extends DomainResource { /** * Server adds CORS headers when responding to requests - this enables javascript applications to use the server. */ - @Child(name="cors", type={BooleanType.class}, order=1, min=0, max=1) + @Child(name ="cors", type={BooleanType.class}, order=1, min=0, max=1) @Description(shortDefinition="Adds CORS Headers (http://enable-cors.org/)", formalDefinition="Server adds CORS headers when responding to requests - this enables javascript applications to use the server." ) protected BooleanType cors; /** * Types of security services are supported/required by the system. */ - @Child(name="service", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="service", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="OAuth | OAuth2 | NTLM | Basic | Kerberos", formalDefinition="Types of security services are supported/required by the system." ) protected List service; /** * General description of how security works. */ - @Child(name="description", type={StringType.class}, order=3, min=0, max=1) + @Child(name ="description", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="General description of how security works", formalDefinition="General description of how security works." ) protected StringType description; /** * Certificates associated with security profiles. */ - @Child(name="certificate", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="certificate", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Certificates associated with security profiles", formalDefinition="Certificates associated with security profiles." ) protected List certificate; @@ -1769,7 +1948,7 @@ public class Conformance extends DomainResource { * @return Server adds CORS headers when responding to requests - this enables javascript applications to use the server. */ public boolean getCors() { - return this.cors == null ? false : this.cors.getValue(); + return this.cors == null || this.cors.isEmpty() ? false : this.cors.getValue(); } /** @@ -1812,6 +1991,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestSecurityComponent addService(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.service == null) + this.service = new ArrayList(); + this.service.add(t); + return this; + } + /** * @return {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ @@ -1891,6 +2080,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestSecurityComponent addCertificate(ConformanceRestSecurityCertificateComponent t) { //3 + if (t == null) + return this; + if (this.certificate == null) + this.certificate = new ArrayList(); + this.certificate.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("cors", "boolean", "Server adds CORS headers when responding to requests - this enables javascript applications to use the server.", 0, java.lang.Integer.MAX_VALUE, cors)); @@ -1951,14 +2150,14 @@ public class Conformance extends DomainResource { /** * Mime type for certificate. */ - @Child(name="type", type={CodeType.class}, order=1, min=0, max=1) + @Child(name ="type", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="Mime type for certificate", formalDefinition="Mime type for certificate." ) protected CodeType type; /** * Actual certificate. */ - @Child(name="blob", type={Base64BinaryType.class}, order=2, min=0, max=1) + @Child(name ="blob", type={Base64BinaryType.class}, order=2, min=0, max=1) @Description(shortDefinition="Actual certificate", formalDefinition="Actual certificate." ) protected Base64BinaryType blob; @@ -2112,86 +2311,86 @@ public class Conformance extends DomainResource { /** * A type of resource exposed via the restful interface. */ - @Child(name="type", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="type", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="A resource type that is supported", formalDefinition="A type of resource exposed via the restful interface." ) protected CodeType type; /** * A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. */ - @Child(name="profile", type={Profile.class}, order=2, min=0, max=1) + @Child(name ="profile", type={StructureDefinition.class}, order=2, min=0, max=1) @Description(shortDefinition="What structural features are supported", formalDefinition="A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations." ) protected Reference profile; /** * The actual object that is the target of the reference (A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations.) */ - protected Profile profileTarget; + protected StructureDefinition profileTarget; /** * Identifies a restful operation supported by the solution. */ - @Child(name="interaction", type={}, order=3, min=1, max=Child.MAX_UNLIMITED) + @Child(name ="interaction", type={}, order=3, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="What operations are supported?", formalDefinition="Identifies a restful operation supported by the solution." ) protected List interaction; /** * Thi field is set to true to specify that the system does not support (server) or use (client) versioning for this resource type. If this is not set to true, the server must at least correctly track and populate the versionId meta-property on resources. */ - @Child(name="versioning", type={CodeType.class}, order=4, min=0, max=1) + @Child(name ="versioning", type={CodeType.class}, order=4, min=0, max=1) @Description(shortDefinition="no-version | versioned | versioned-update", formalDefinition="Thi field is set to true to specify that the system does not support (server) or use (client) versioning for this resource type. If this is not set to true, the server must at least correctly track and populate the versionId meta-property on resources." ) protected Enumeration versioning; /** * A flag for whether the server is able to return past versions as part of the vRead operation. */ - @Child(name="readHistory", type={BooleanType.class}, order=5, min=0, max=1) + @Child(name ="readHistory", type={BooleanType.class}, order=5, min=0, max=1) @Description(shortDefinition="Whether vRead can return past versions", formalDefinition="A flag for whether the server is able to return past versions as part of the vRead operation." ) protected BooleanType readHistory; /** - * A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server. + * A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. */ - @Child(name="updateCreate", type={BooleanType.class}, order=6, min=0, max=1) - @Description(shortDefinition="If allows/uses update to a new location", formalDefinition="A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server." ) + @Child(name ="updateCreate", type={BooleanType.class}, order=6, min=0, max=1) + @Description(shortDefinition="If update can commit to a new identity", formalDefinition="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server." ) protected BooleanType updateCreate; /** * A flag that indicates that the server supports conditional create. */ - @Child(name="conditionalCreate", type={BooleanType.class}, order=7, min=0, max=1) + @Child(name ="conditionalCreate", type={BooleanType.class}, order=7, min=0, max=1) @Description(shortDefinition="If allows/uses conditional create", formalDefinition="A flag that indicates that the server supports conditional create." ) protected BooleanType conditionalCreate; /** * A flag that indicates that the server supports conditional update. */ - @Child(name="conditionalUpdate", type={BooleanType.class}, order=8, min=0, max=1) + @Child(name ="conditionalUpdate", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="If allows/uses conditional update", formalDefinition="A flag that indicates that the server supports conditional update." ) protected BooleanType conditionalUpdate; /** * A flag that indicates that the server supports conditional delete. */ - @Child(name="conditionalDelete", type={BooleanType.class}, order=9, min=0, max=1) + @Child(name ="conditionalDelete", type={BooleanType.class}, order=9, min=0, max=1) @Description(shortDefinition="If allows/uses conditional delete", formalDefinition="A flag that indicates that the server supports conditional delete." ) protected BooleanType conditionalDelete; /** * A list of _include values supported by the server. */ - @Child(name="searchInclude", type={StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="searchInclude", type={StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="_include values supported by the server", formalDefinition="A list of _include values supported by the server." ) protected List searchInclude; /** * Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. */ - @Child(name="searchParam", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="searchParam", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Search params supported by implementation", formalDefinition="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." ) protected List searchParam; - private static final long serialVersionUID = -1665668054L; + private static final long serialVersionUID = 1477462605L; public ConformanceRestResourceComponent() { super(); @@ -2274,19 +2473,19 @@ public class Conformance extends DomainResource { /** * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations.) */ - public Profile getProfileTarget() { + public StructureDefinition getProfileTarget() { if (this.profileTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConformanceRestResourceComponent.profile"); else if (Configuration.doAutoCreate()) - this.profileTarget = new Profile(); // aa + this.profileTarget = new StructureDefinition(); // aa return this.profileTarget; } /** * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations.) */ - public ConformanceRestResourceComponent setProfileTarget(Profile value) { + public ConformanceRestResourceComponent setProfileTarget(StructureDefinition value) { this.profileTarget = value; return this; } @@ -2321,6 +2520,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestResourceComponent addInteraction(ResourceInteractionComponent t) { //3 + if (t == null) + return this; + if (this.interaction == null) + this.interaction = new ArrayList(); + this.interaction.add(t); + return this; + } + /** * @return {@link #versioning} (Thi field is set to true to specify that the system does not support (server) or use (client) versioning for this resource type. If this is not set to true, the server must at least correctly track and populate the versionId meta-property on resources.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value */ @@ -2402,7 +2611,7 @@ public class Conformance extends DomainResource { * @return A flag for whether the server is able to return past versions as part of the vRead operation. */ public boolean getReadHistory() { - return this.readHistory == null ? false : this.readHistory.getValue(); + return this.readHistory == null || this.readHistory.isEmpty() ? false : this.readHistory.getValue(); } /** @@ -2416,7 +2625,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #updateCreate} (A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value + * @return {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value */ public BooleanType getUpdateCreateElement() { if (this.updateCreate == null) @@ -2436,7 +2645,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #updateCreate} (A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value + * @param value {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value */ public ConformanceRestResourceComponent setUpdateCreateElement(BooleanType value) { this.updateCreate = value; @@ -2444,14 +2653,14 @@ public class Conformance extends DomainResource { } /** - * @return A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server. + * @return A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. */ public boolean getUpdateCreate() { - return this.updateCreate == null ? false : this.updateCreate.getValue(); + return this.updateCreate == null || this.updateCreate.isEmpty() ? false : this.updateCreate.getValue(); } /** - * @param value A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server. + * @param value A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. */ public ConformanceRestResourceComponent setUpdateCreate(boolean value) { if (this.updateCreate == null) @@ -2492,7 +2701,7 @@ public class Conformance extends DomainResource { * @return A flag that indicates that the server supports conditional create. */ public boolean getConditionalCreate() { - return this.conditionalCreate == null ? false : this.conditionalCreate.getValue(); + return this.conditionalCreate == null || this.conditionalCreate.isEmpty() ? false : this.conditionalCreate.getValue(); } /** @@ -2537,7 +2746,7 @@ public class Conformance extends DomainResource { * @return A flag that indicates that the server supports conditional update. */ public boolean getConditionalUpdate() { - return this.conditionalUpdate == null ? false : this.conditionalUpdate.getValue(); + return this.conditionalUpdate == null || this.conditionalUpdate.isEmpty() ? false : this.conditionalUpdate.getValue(); } /** @@ -2582,7 +2791,7 @@ public class Conformance extends DomainResource { * @return A flag that indicates that the server supports conditional delete. */ public boolean getConditionalDelete() { - return this.conditionalDelete == null ? false : this.conditionalDelete.getValue(); + return this.conditionalDelete == null || this.conditionalDelete.isEmpty() ? false : this.conditionalDelete.getValue(); } /** @@ -2679,14 +2888,24 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceRestResourceComponent addSearchParam(ConformanceRestResourceSearchParamComponent t) { //3 + if (t == null) + return this; + if (this.searchParam == null) + this.searchParam = new ArrayList(); + this.searchParam.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "A type of resource exposed via the restful interface.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("profile", "Reference(Profile)", "A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction)); childrenList.add(new Property("versioning", "code", "Thi field is set to true to specify that the system does not support (server) or use (client) versioning for this resource type. If this is not set to true, the server must at least correctly track and populate the versionId meta-property on resources.", 0, java.lang.Integer.MAX_VALUE, versioning)); childrenList.add(new Property("readHistory", "boolean", "A flag for whether the server is able to return past versions as part of the vRead operation.", 0, java.lang.Integer.MAX_VALUE, readHistory)); - childrenList.add(new Property("updateCreate", "boolean", "A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server.", 0, java.lang.Integer.MAX_VALUE, updateCreate)); + childrenList.add(new Property("updateCreate", "boolean", "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", 0, java.lang.Integer.MAX_VALUE, updateCreate)); childrenList.add(new Property("conditionalCreate", "boolean", "A flag that indicates that the server supports conditional create.", 0, java.lang.Integer.MAX_VALUE, conditionalCreate)); childrenList.add(new Property("conditionalUpdate", "boolean", "A flag that indicates that the server supports conditional update.", 0, java.lang.Integer.MAX_VALUE, conditionalUpdate)); childrenList.add(new Property("conditionalDelete", "boolean", "A flag that indicates that the server supports conditional delete.", 0, java.lang.Integer.MAX_VALUE, conditionalDelete)); @@ -2767,14 +2986,14 @@ public class Conformance extends DomainResource { /** * Coded identifier of the operation, supported by the system resource. */ - @Child(name="code", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="code", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="read | vread | update | delete | history-instance | validate | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." ) protected Enumeration code; /** * Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. */ - @Child(name="documentation", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'." ) protected StringType documentation; @@ -2929,42 +3148,42 @@ public class Conformance extends DomainResource { /** * The name of the search parameter used in the interface. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name ="name", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the search parameter used in the interface." ) protected StringType name; /** - * A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter. + * An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). */ - @Child(name="definition", type={UriType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Source of definition for parameter", formalDefinition="A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter." ) + @Child(name ="definition", type={UriType.class}, order=2, min=0, max=1) + @Description(shortDefinition="Source of definition for parameter", formalDefinition="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]])." ) protected UriType definition; /** * The type of value a search parameter refers to, and how the content is interpreted. */ - @Child(name="type", type={CodeType.class}, order=3, min=1, max=1) - @Description(shortDefinition="number | date | string | token | reference | composite | quantity", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) + @Child(name ="type", type={CodeType.class}, order=3, min=1, max=1) + @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) protected Enumeration type; /** * This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. */ - @Child(name="documentation", type={StringType.class}, order=4, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Server-specific usage", formalDefinition="This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms." ) protected StringType documentation; /** * Types of resource (if a resource is referenced). */ - @Child(name="target", type={CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="target", type={CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) protected List target; /** * Chained names supported. */ - @Child(name="chain", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="chain", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Chained names supported", formalDefinition="Chained names supported." ) protected List chain; @@ -3026,7 +3245,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #definition} (A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + * @return {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value */ public UriType getDefinitionElement() { if (this.definition == null) @@ -3046,7 +3265,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #definition} (A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + * @param value {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value */ public ConformanceRestResourceSearchParamComponent setDefinitionElement(UriType value) { this.definition = value; @@ -3054,14 +3273,14 @@ public class Conformance extends DomainResource { } /** - * @return A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter. + * @return An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). */ public String getDefinition() { return this.definition == null ? null : this.definition.getValue(); } /** - * @param value A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter. + * @param value An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). */ public ConformanceRestResourceSearchParamComponent setDefinition(String value) { if (Utilities.noString(value)) @@ -3279,7 +3498,7 @@ public class Conformance extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("name", "string", "The name of the search parameter used in the interface.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("definition", "uri", "A formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter.", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("definition", "uri", "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).", 0, java.lang.Integer.MAX_VALUE, definition)); childrenList.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("documentation", "string", "This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); @@ -3343,14 +3562,14 @@ public class Conformance extends DomainResource { /** * A coded identifier of the operation, supported by the system. */ - @Child(name="code", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="code", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="transaction | search-system | history-system", formalDefinition="A coded identifier of the operation, supported by the system." ) protected Enumeration code; /** * Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. */ - @Child(name="documentation", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented." ) protected StringType documentation; @@ -3505,14 +3724,14 @@ public class Conformance extends DomainResource { /** * The name of a query, which is used in the _query parameter when the query is called. */ - @Child(name="name", type={StringType.class}, order=1, min=1, max=1) + @Child(name ="name", type={StringType.class}, order=1, min=1, max=1) @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of a query, which is used in the _query parameter when the query is called." ) protected StringType name; /** * Where the formal definition can be found. */ - @Child(name="definition", type={OperationDefinition.class}, order=2, min=1, max=1) + @Child(name ="definition", type={OperationDefinition.class}, order=2, min=1, max=1) @Description(shortDefinition="The defined operation/query", formalDefinition="Where the formal definition can be found." ) protected Reference definition; @@ -3668,32 +3887,32 @@ public class Conformance extends DomainResource { /** * An address to which messages and/or replies are to be sent. */ - @Child(name="endpoint", type={UriType.class}, order=1, min=0, max=1) + @Child(name ="endpoint", type={UriType.class}, order=1, min=0, max=1) @Description(shortDefinition="Actual endpoint being described", formalDefinition="An address to which messages and/or replies are to be sent." ) protected UriType endpoint; /** * Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). */ - @Child(name="reliableCache", type={IntegerType.class}, order=2, min=0, max=1) + @Child(name ="reliableCache", type={UnsignedIntType.class}, order=2, min=0, max=1) @Description(shortDefinition="Reliable Message Cache Length (min)", formalDefinition="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)." ) - protected IntegerType reliableCache; + protected UnsignedIntType reliableCache; /** * Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. */ - @Child(name="documentation", type={StringType.class}, order=3, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Messaging interface behavior details", formalDefinition="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner." ) protected StringType documentation; /** * A description of the solution's support for an event at this end point. */ - @Child(name="event", type={}, order=4, min=1, max=Child.MAX_UNLIMITED) + @Child(name ="event", type={}, order=4, min=1, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Declare support for this event", formalDefinition="A description of the solution's support for an event at this end point." ) protected List event; - private static final long serialVersionUID = -217151442L; + private static final long serialVersionUID = -1356115534L; public ConformanceMessagingComponent() { super(); @@ -3751,12 +3970,12 @@ public class Conformance extends DomainResource { /** * @return {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value */ - public IntegerType getReliableCacheElement() { + public UnsignedIntType getReliableCacheElement() { if (this.reliableCache == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConformanceMessagingComponent.reliableCache"); else if (Configuration.doAutoCreate()) - this.reliableCache = new IntegerType(); // bb + this.reliableCache = new UnsignedIntType(); // bb return this.reliableCache; } @@ -3771,7 +3990,7 @@ public class Conformance extends DomainResource { /** * @param value {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value */ - public ConformanceMessagingComponent setReliableCacheElement(IntegerType value) { + public ConformanceMessagingComponent setReliableCacheElement(UnsignedIntType value) { this.reliableCache = value; return this; } @@ -3780,7 +3999,7 @@ public class Conformance extends DomainResource { * @return Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). */ public int getReliableCache() { - return this.reliableCache == null ? 0 : this.reliableCache.getValue(); + return this.reliableCache == null || this.reliableCache.isEmpty() ? 0 : this.reliableCache.getValue(); } /** @@ -3788,7 +4007,7 @@ public class Conformance extends DomainResource { */ public ConformanceMessagingComponent setReliableCache(int value) { if (this.reliableCache == null) - this.reliableCache = new IntegerType(); + this.reliableCache = new UnsignedIntType(); this.reliableCache.setValue(value); return this; } @@ -3872,10 +4091,20 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceMessagingComponent addEvent(ConformanceMessagingEventComponent t) { //3 + if (t == null) + return this; + if (this.event == null) + this.event = new ArrayList(); + this.event.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("endpoint", "uri", "An address to which messages and/or replies are to be sent.", 0, java.lang.Integer.MAX_VALUE, endpoint)); - childrenList.add(new Property("reliableCache", "integer", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, java.lang.Integer.MAX_VALUE, reliableCache)); + childrenList.add(new Property("reliableCache", "unsignedInt", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, java.lang.Integer.MAX_VALUE, reliableCache)); childrenList.add(new Property("documentation", "string", "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("event", "", "A description of the solution's support for an event at this end point.", 0, java.lang.Integer.MAX_VALUE, event)); } @@ -3929,70 +4158,70 @@ public class Conformance extends DomainResource { /** * A coded identifier of a supported messaging event. */ - @Child(name="code", type={Coding.class}, order=1, min=1, max=1) + @Child(name ="code", type={Coding.class}, order=1, min=1, max=1) @Description(shortDefinition="Event type", formalDefinition="A coded identifier of a supported messaging event." ) protected Coding code; /** * The impact of the content of the message. */ - @Child(name="category", type={CodeType.class}, order=2, min=0, max=1) + @Child(name ="category", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="Consequence | Currency | Notification", formalDefinition="The impact of the content of the message." ) protected Enumeration category; /** * The mode of this event declaration - whether application is sender or receiver. */ - @Child(name="mode", type={CodeType.class}, order=3, min=1, max=1) + @Child(name ="mode", type={CodeType.class}, order=3, min=1, max=1) @Description(shortDefinition="sender | receiver", formalDefinition="The mode of this event declaration - whether application is sender or receiver." ) protected Enumeration mode; /** * A list of the messaging transport protocol(s) identifiers, supported by this endpoint. */ - @Child(name="protocol", type={Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="protocol", type={Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="http | ftp | mllp +", formalDefinition="A list of the messaging transport protocol(s) identifiers, supported by this endpoint." ) protected List protocol; /** * A resource associated with the event. This is the resource that defines the event. */ - @Child(name="focus", type={CodeType.class}, order=5, min=1, max=1) + @Child(name ="focus", type={CodeType.class}, order=5, min=1, max=1) @Description(shortDefinition="Resource that's focus of message", formalDefinition="A resource associated with the event. This is the resource that defines the event." ) protected CodeType focus; /** * Information about the request for this event. */ - @Child(name="request", type={Profile.class}, order=6, min=1, max=1) + @Child(name ="request", type={StructureDefinition.class}, order=6, min=1, max=1) @Description(shortDefinition="Profile that describes the request", formalDefinition="Information about the request for this event." ) protected Reference request; /** * The actual object that is the target of the reference (Information about the request for this event.) */ - protected Profile requestTarget; + protected StructureDefinition requestTarget; /** * Information about the response for this event. */ - @Child(name="response", type={Profile.class}, order=7, min=1, max=1) + @Child(name ="response", type={StructureDefinition.class}, order=7, min=1, max=1) @Description(shortDefinition="Profile that describes the response", formalDefinition="Information about the response for this event." ) protected Reference response; /** * The actual object that is the target of the reference (Information about the response for this event.) */ - protected Profile responseTarget; + protected StructureDefinition responseTarget; /** * Guidance on how this event is handled, such as internal system trigger points, business rules, etc. */ - @Child(name="documentation", type={StringType.class}, order=8, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=8, min=0, max=1) @Description(shortDefinition="Endpoint-specific event documentation", formalDefinition="Guidance on how this event is handled, such as internal system trigger points, business rules, etc." ) protected StringType documentation; - private static final long serialVersionUID = 758007981L; + private static final long serialVersionUID = 1680159501L; public ConformanceMessagingEventComponent() { super(); @@ -4155,6 +4384,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public ConformanceMessagingEventComponent addProtocol(Coding t) { //3 + if (t == null) + return this; + if (this.protocol == null) + this.protocol = new ArrayList(); + this.protocol.add(t); + return this; + } + /** * @return {@link #focus} (A resource associated with the event. This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value */ @@ -4227,19 +4466,19 @@ public class Conformance extends DomainResource { /** * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) */ - public Profile getRequestTarget() { + public StructureDefinition getRequestTarget() { if (this.requestTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.request"); else if (Configuration.doAutoCreate()) - this.requestTarget = new Profile(); // aa + this.requestTarget = new StructureDefinition(); // aa return this.requestTarget; } /** * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) */ - public ConformanceMessagingEventComponent setRequestTarget(Profile value) { + public ConformanceMessagingEventComponent setRequestTarget(StructureDefinition value) { this.requestTarget = value; return this; } @@ -4271,19 +4510,19 @@ public class Conformance extends DomainResource { /** * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) */ - public Profile getResponseTarget() { + public StructureDefinition getResponseTarget() { if (this.responseTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.response"); else if (Configuration.doAutoCreate()) - this.responseTarget = new Profile(); // aa + this.responseTarget = new StructureDefinition(); // aa return this.responseTarget; } /** * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) */ - public ConformanceMessagingEventComponent setResponseTarget(Profile value) { + public ConformanceMessagingEventComponent setResponseTarget(StructureDefinition value) { this.responseTarget = value; return this; } @@ -4344,8 +4583,8 @@ public class Conformance extends DomainResource { childrenList.add(new Property("mode", "code", "The mode of this event declaration - whether application is sender or receiver.", 0, java.lang.Integer.MAX_VALUE, mode)); childrenList.add(new Property("protocol", "Coding", "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.", 0, java.lang.Integer.MAX_VALUE, protocol)); childrenList.add(new Property("focus", "code", "A resource associated with the event. This is the resource that defines the event.", 0, java.lang.Integer.MAX_VALUE, focus)); - childrenList.add(new Property("request", "Reference(Profile)", "Information about the request for this event.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Profile)", "Information about the response for this event.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("request", "Reference(StructureDefinition)", "Information about the request for this event.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "Reference(StructureDefinition)", "Information about the response for this event.", 0, java.lang.Integer.MAX_VALUE, response)); childrenList.add(new Property("documentation", "string", "Guidance on how this event is handled, such as internal system trigger points, business rules, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); } @@ -4405,30 +4644,30 @@ public class Conformance extends DomainResource { /** * Mode of this document declaration - whether application is producer or consumer. */ - @Child(name="mode", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="mode", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="producer | consumer", formalDefinition="Mode of this document declaration - whether application is producer or consumer." ) protected Enumeration mode; /** * A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. */ - @Child(name="documentation", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Description of document support", formalDefinition="A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc." ) protected StringType documentation; /** * A constraint on a resource used in the document. */ - @Child(name="profile", type={Profile.class}, order=3, min=1, max=1) + @Child(name ="profile", type={StructureDefinition.class}, order=3, min=1, max=1) @Description(shortDefinition="Constraint on a resource used in the document", formalDefinition="A constraint on a resource used in the document." ) protected Reference profile; /** * The actual object that is the target of the reference (A constraint on a resource used in the document.) */ - protected Profile profileTarget; + protected StructureDefinition profileTarget; - private static final long serialVersionUID = 437404016L; + private static final long serialVersionUID = -1059555053L; public ConformanceDocumentComponent() { super(); @@ -4561,19 +4800,19 @@ public class Conformance extends DomainResource { /** * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) */ - public Profile getProfileTarget() { + public StructureDefinition getProfileTarget() { if (this.profileTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ConformanceDocumentComponent.profile"); else if (Configuration.doAutoCreate()) - this.profileTarget = new Profile(); // aa + this.profileTarget = new StructureDefinition(); // aa return this.profileTarget; } /** * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) */ - public ConformanceDocumentComponent setProfileTarget(Profile value) { + public ConformanceDocumentComponent setProfileTarget(StructureDefinition value) { this.profileTarget = value; return this; } @@ -4582,7 +4821,7 @@ public class Conformance extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("mode", "code", "Mode of this document declaration - whether application is producer or consumer.", 0, java.lang.Integer.MAX_VALUE, mode)); childrenList.add(new Property("documentation", "string", "A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); - childrenList.add(new Property("profile", "Reference(Profile)", "A constraint on a resource used in the document.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A constraint on a resource used in the document.", 0, java.lang.Integer.MAX_VALUE, profile)); } public ConformanceDocumentComponent copy() { @@ -4623,195 +4862,208 @@ public class Conformance extends DomainResource { } /** - * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). */ - @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1) - @Description(shortDefinition="Logical id to reference this statement", formalDefinition="The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) - protected StringType identifier; + @Child(name ="url", type={UriType.class}, order=0, min=0, max=1) + @Description(shortDefinition="Logical uri to reference this statement", formalDefinition="An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:)." ) + protected UriType url; /** * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) + @Child(name ="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the conformance statement. */ - @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1) + @Child(name ="name", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." ) protected StringType name; /** - * Name of Organization publishing this conformance statement. + * The name of the individual or organization that published the conformance. */ - @Child(name = "publisher", type = {StringType.class}, order = 3, min = 1, max = 1) - @Description(shortDefinition="Publishing Organization", formalDefinition="Name of Organization publishing this conformance statement." ) + @Child(name ="publisher", type={StringType.class}, order=3, min=0, max=1) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the conformance." ) protected StringType publisher; /** - * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contacts for Organization", formalDefinition="Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc." ) - protected List telecom; + @Child(name ="contact", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; /** - * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + * A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. */ - @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) + @Child(name ="description", type={StringType.class}, order=5, min=0, max=1) + @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) protected StringType description; + /** + * Explains why this conformance statement is needed and why it's been constrained as it has. + */ + @Child(name ="requirements", type={StringType.class}, order=6, min=0, max=1) + @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this conformance statement is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + @Child(name ="copyright", type={StringType.class}, order=7, min=0, max=1) + @Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement." ) + protected StringType copyright; + /** * The status of this conformance statement. */ - @Child(name = "status", type = {CodeType.class}, order = 6, min = 0, max = 1) + @Child(name ="status", type={CodeType.class}, order=8, min=0, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) - protected Enumeration status; + protected Enumeration status; /** * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name = "experimental", type = {BooleanType.class}, order = 7, min = 0, max = 1) + @Child(name ="experimental", type={BooleanType.class}, order=9, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date (and optionally time) when the conformance statement was published. */ - @Child(name = "date", type = {DateTimeType.class}, order = 8, min = 1, max = 1) + @Child(name ="date", type={DateTimeType.class}, order=10, min=1, max=1) @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published." ) protected DateTimeType date; /** - * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. + * Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation. */ - @Child(name = "software", type = {}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation." ) + @Child(name ="software", type={}, order=11, min=0, max=1) + @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation." ) protected ConformanceSoftwareComponent software; /** * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. */ - @Child(name = "implementation", type = {}, order = 10, min = 0, max = 1) + @Child(name ="implementation", type={}, order=12, min=0, max=1) @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) protected ConformanceImplementationComponent implementation; /** * The version of the FHIR specification on which this conformance statement is based. */ - @Child(name = "fhirVersion", type = {IdType.class}, order = 11, min = 1, max = 1) + @Child(name ="fhirVersion", type={IdType.class}, order=13, min=1, max=1) @Description(shortDefinition="FHIR Version", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) protected IdType fhirVersion; /** * A flag that indicates whether the application accepts unknown elements as part of a resource. */ - @Child(name = "acceptUnknown", type = {BooleanType.class}, order = 12, min = 1, max = 1) + @Child(name ="acceptUnknown", type={BooleanType.class}, order=14, min=1, max=1) @Description(shortDefinition="True if application accepts unknown elements", formalDefinition="A flag that indicates whether the application accepts unknown elements as part of a resource." ) protected BooleanType acceptUnknown; /** - * A list of the formats supported by this implementation. + * A list of the formats supported by this implementation using their content types. */ - @Child(name = "format", type = {CodeType.class}, order = 13, min = 1, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation." ) + @Child(name ="format", type={CodeType.class}, order=15, min=1, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." ) protected List format; /** * A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. */ - @Child(name = "profile", type = {Profile.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="profile", type={StructureDefinition.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Profiles supported by the system", formalDefinition="A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile." ) protected List profile; /** * The actual objects that are the target of the reference (A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.) */ - protected List profileTarget; + protected List profileTarget; /** * A definition of the restful capabilities of the solution, if any. */ - @Child(name = "rest", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="rest", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) protected List rest; /** * A description of the messaging capabilities of the solution. */ - @Child(name = "messaging", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="messaging", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) protected List messaging; /** * A document definition. */ - @Child(name = "document", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="document", type={}, order=19, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) protected List document; - private static final long serialVersionUID = 1215207759L; + private static final long serialVersionUID = 1631871430L; public Conformance() { super(); } - public Conformance(StringType publisher, DateTimeType date, IdType fhirVersion, BooleanType acceptUnknown) { + public Conformance(DateTimeType date, IdType fhirVersion, BooleanType acceptUnknown) { super(); - this.publisher = publisher; this.date = date; this.fhirVersion = fhirVersion; this.acceptUnknown = acceptUnknown; } /** - * @return {@link #identifier} (The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @return {@link #url} (An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ - public StringType getIdentifierElement() { - if (this.identifier == null) + public UriType getUrlElement() { + if (this.url == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Conformance.identifier"); + throw new Error("Attempt to auto-create Conformance.url"); else if (Configuration.doAutoCreate()) - this.identifier = new StringType(); // bb - return this.identifier; + this.url = new UriType(); // bb + return this.url; } - public boolean hasIdentifierElement() { - return this.identifier != null && !this.identifier.isEmpty(); + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); } - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); } /** - * @param value {@link #identifier} (The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @param value {@link #url} (An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ - public Conformance setIdentifierElement(StringType value) { - this.identifier = value; + public Conformance setUrlElement(UriType value) { + this.url = value; return this; } /** - * @return The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * @return An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). */ - public String getIdentifier() { - return this.identifier == null ? null : this.identifier.getValue(); + public String getUrl() { + return this.url == null ? null : this.url.getValue(); } /** - * @param value The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * @param value An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:). */ - public Conformance setIdentifier(String value) { + public Conformance setUrl(String value) { if (Utilities.noString(value)) - this.identifier = null; + this.url = null; else { - if (this.identifier == null) - this.identifier = new StringType(); - this.identifier.setValue(value); + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); } return this; } @@ -4915,7 +5167,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #publisher} (Name of Organization publishing this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @return {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public StringType getPublisherElement() { if (this.publisher == null) @@ -4935,7 +5187,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #publisher} (Name of Organization publishing this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @param value {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public Conformance setPublisherElement(StringType value) { this.publisher = value; @@ -4943,54 +5195,68 @@ public class Conformance extends DomainResource { } /** - * @return Name of Organization publishing this conformance statement. + * @return The name of the individual or organization that published the conformance. */ public String getPublisher() { return this.publisher == null ? null : this.publisher.getValue(); } /** - * @param value Name of Organization publishing this conformance statement. + * @param value The name of the individual or organization that published the conformance. */ public Conformance setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { if (this.publisher == null) this.publisher = new StringType(); this.publisher.setValue(value); + } return this; } /** - * @return {@link #telecom} (Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; } - public boolean hasTelecom() { - if (this.telecom == null) + public boolean hasContact() { + if (this.contact == null) return false; - for (ContactPoint item : this.telecom) + for (ConformanceContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #telecom} (Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); + public ConformanceContactComponent addContact() { //3 + ConformanceContactComponent t = new ConformanceContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); return t; } + // syntactic sugar + public Conformance addContact(ConformanceContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** - * @return {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @return {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). 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) @@ -5010,7 +5276,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @param value {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public Conformance setDescriptionElement(StringType value) { this.description = value; @@ -5018,14 +5284,14 @@ public class Conformance extends DomainResource { } /** - * @return A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + * @return A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. */ public String getDescription() { return this.description == null ? null : this.description.getValue(); } /** - * @param value A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. + * @param value A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. */ public Conformance setDescription(String value) { if (Utilities.noString(value)) @@ -5038,15 +5304,113 @@ public class Conformance extends DomainResource { return this; } + /** + * @return {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public Conformance setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this conformance statement is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this conformance statement is needed and why it's been constrained as it has. + */ + public Conformance setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Conformance.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public Conformance setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. + */ + public Conformance setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + /** * @return {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Enumeration getStatusElement() { + public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Conformance.status"); else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ConformanceStatementStatusEnumFactory()); // bb + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb return this.status; } @@ -5061,7 +5425,7 @@ public class Conformance extends DomainResource { /** * @param value {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Conformance setStatusElement(Enumeration value) { + public Conformance setStatusElement(Enumeration value) { this.status = value; return this; } @@ -5069,19 +5433,19 @@ public class Conformance extends DomainResource { /** * @return The status of this conformance statement. */ - public ConformanceStatementStatus getStatus() { + public ConformanceResourceStatus getStatus() { return this.status == null ? null : this.status.getValue(); } /** * @param value The status of this conformance statement. */ - public Conformance setStatus(ConformanceStatementStatus value) { + public Conformance setStatus(ConformanceResourceStatus value) { if (value == null) this.status = null; else { if (this.status == null) - this.status = new Enumeration(new ConformanceStatementStatusEnumFactory()); + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); this.status.setValue(value); } return this; @@ -5119,7 +5483,7 @@ public class Conformance extends DomainResource { * @return A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); } /** @@ -5178,7 +5542,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #software} (Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation.) + * @return {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) */ public ConformanceSoftwareComponent getSoftware() { if (this.software == null) @@ -5194,7 +5558,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #software} (Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation.) + * @param value {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) */ public Conformance setSoftware(ConformanceSoftwareComponent value) { this.software = value; @@ -5302,7 +5666,7 @@ public class Conformance extends DomainResource { * @return A flag that indicates whether the application accepts unknown elements as part of a resource. */ public boolean getAcceptUnknown() { - return this.acceptUnknown == null ? false : this.acceptUnknown.getValue(); + return this.acceptUnknown == null || this.acceptUnknown.isEmpty() ? false : this.acceptUnknown.getValue(); } /** @@ -5316,7 +5680,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #format} (A list of the formats supported by this implementation.) + * @return {@link #format} (A list of the formats supported by this implementation using their content types.) */ public List getFormat() { if (this.format == null) @@ -5334,7 +5698,7 @@ public class Conformance extends DomainResource { } /** - * @return {@link #format} (A list of the formats supported by this implementation.) + * @return {@link #format} (A list of the formats supported by this implementation using their content types.) */ // syntactic sugar public CodeType addFormatElement() {//2 @@ -5346,7 +5710,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #format} (A list of the formats supported by this implementation.) + * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) */ public Conformance addFormat(String value) { //1 CodeType t = new CodeType(); @@ -5358,7 +5722,7 @@ public class Conformance extends DomainResource { } /** - * @param value {@link #format} (A list of the formats supported by this implementation.) + * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) */ public boolean hasFormat(String value) { if (this.format == null) @@ -5399,12 +5763,22 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public Conformance addProfile(Reference t) { //3 + if (t == null) + return this; + if (this.profile == null) + this.profile = new ArrayList(); + this.profile.add(t); + return this; + } + /** * @return {@link #profile} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.) */ - public List getProfileTarget() { + public List getProfileTarget() { if (this.profileTarget == null) - this.profileTarget = new ArrayList(); + this.profileTarget = new ArrayList(); return this.profileTarget; } @@ -5412,10 +5786,10 @@ public class Conformance extends DomainResource { /** * @return {@link #profile} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.) */ - public Profile addProfileTarget() { - Profile r = new Profile(); + public StructureDefinition addProfileTarget() { + StructureDefinition r = new StructureDefinition(); if (this.profileTarget == null) - this.profileTarget = new ArrayList(); + this.profileTarget = new ArrayList(); this.profileTarget.add(r); return r; } @@ -5450,6 +5824,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public Conformance addRest(ConformanceRestComponent t) { //3 + if (t == null) + return this; + if (this.rest == null) + this.rest = new ArrayList(); + this.rest.add(t); + return this; + } + /** * @return {@link #messaging} (A description of the messaging capabilities of the solution.) */ @@ -5480,6 +5864,16 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public Conformance addMessaging(ConformanceMessagingComponent t) { //3 + if (t == null) + return this; + if (this.messaging == null) + this.messaging = new ArrayList(); + this.messaging.add(t); + return this; + } + /** * @return {@link #document} (A document definition.) */ @@ -5510,23 +5904,35 @@ public class Conformance extends DomainResource { return t; } + // syntactic sugar + public Conformance addDocument(ConformanceDocumentComponent t) { //3 + if (t == null) + return this; + if (this.document == null) + this.document = new ArrayList(); + this.document.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "string", "The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("url", "uri", "An absolute uri that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique URI, and an be urn:uuid: or urn:oid:).", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("name", "string", "A free text natural language name identifying the conformance statement.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("publisher", "string", "Name of Organization publishing this conformance statement.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.", 0, java.lang.Integer.MAX_VALUE, telecom)); - childrenList.add(new Property("description", "string", "A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the conformance.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("description", "string", "A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "Explains why this conformance statement is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the conformamce statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("status", "code", "The status of this conformance statement.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the conformance statement was published.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("software", "", "Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation.", 0, java.lang.Integer.MAX_VALUE, software)); + childrenList.add(new Property("software", "", "Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.", 0, java.lang.Integer.MAX_VALUE, software)); childrenList.add(new Property("implementation", "", "Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.", 0, java.lang.Integer.MAX_VALUE, implementation)); childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this conformance statement is based.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); childrenList.add(new Property("acceptUnknown", "boolean", "A flag that indicates whether the application accepts unknown elements as part of a resource.", 0, java.lang.Integer.MAX_VALUE, acceptUnknown)); - childrenList.add(new Property("format", "code", "A list of the formats supported by this implementation.", 0, java.lang.Integer.MAX_VALUE, format)); - childrenList.add(new Property("profile", "Reference(Profile)", "A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("format", "code", "A list of the formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, format)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest)); childrenList.add(new Property("messaging", "", "A description of the messaging capabilities of the solution.", 0, java.lang.Integer.MAX_VALUE, messaging)); childrenList.add(new Property("document", "", "A document definition.", 0, java.lang.Integer.MAX_VALUE, document)); @@ -5535,16 +5941,18 @@ public class Conformance extends DomainResource { public Conformance copy() { Conformance dst = new Conformance(); copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); + dst.url = url == null ? null : url.copy(); dst.version = version == null ? null : version.copy(); dst.name = name == null ? null : name.copy(); dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); + if (contact != null) { + dst.contact = new ArrayList(); + for (ConformanceContactComponent i : contact) + dst.contact.add(i.copy()); }; dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); dst.date = date == null ? null : date.copy(); @@ -5591,8 +5999,9 @@ public class Conformance extends DomainResource { if (!(other instanceof Conformance)) return false; Conformance o = (Conformance) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) - && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) && compareDeep(description, o.description, true) + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true) && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(acceptUnknown, o.acceptUnknown, true) @@ -5607,21 +6016,23 @@ public class Conformance extends DomainResource { if (!(other instanceof Conformance)) return false; Conformance o = (Conformance) other; - return compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) - && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(status, o.status, true) - && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(fhirVersion, o.fhirVersion, true) - && compareValues(acceptUnknown, o.acceptUnknown, true) && compareValues(format, o.format, true); + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) + && compareValues(date, o.date, true) && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(acceptUnknown, o.acceptUnknown, true) + && compareValues(format, o.format, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (name == null || name.isEmpty()) && (publisher == null || publisher.isEmpty()) && (telecom == null || telecom.isEmpty()) - && (description == null || description.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (date == null || date.isEmpty()) && (software == null || software.isEmpty()) - && (implementation == null || implementation.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) - && (acceptUnknown == null || acceptUnknown.isEmpty()) && (format == null || format.isEmpty()) - && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty()) && (messaging == null || messaging.isEmpty()) - && (document == null || document.isEmpty()); + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) + && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (date == null || date.isEmpty()) && (software == null || software.isEmpty()) && (implementation == null || implementation.isEmpty()) + && (fhirVersion == null || fhirVersion.isEmpty()) && (acceptUnknown == null || acceptUnknown.isEmpty()) + && (format == null || format.isEmpty()) && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty()) + && (messaging == null || messaging.isEmpty()) && (document == null || document.isEmpty()) + ; } @Override @@ -5629,38 +6040,38 @@ public class Conformance extends DomainResource { return ResourceType.Conformance; } - @SearchParamDefinition(name = "date", path = "Conformance.date", description = "The conformance statement publication date", type = "date") - public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "identifier", path = "Conformance.identifier", description = "The identifier of the conformance statement", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "software", path = "Conformance.software.name", description = "Part of a the name of a software application", type = "string") - public static final String SP_SOFTWARE = "software"; + @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) + public static final String SP_SOFTWARE = "software"; @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) public static final String SP_RESOURCE = "resource"; - @SearchParamDefinition(name = "profile", path = "Conformance.rest.resource.profile", description = "A profile id invoked in a conformance statement", type = "reference") - public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" ) + public static final String SP_PROFILE = "profile"; @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) public static final String SP_FORMAT = "format"; - @SearchParamDefinition(name = "description", path = "Conformance.description", description = "Text search in the description of the conformance statement", type = "string") - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name = "fhirversion", path = "Conformance.version", description = "The version of FHIR", type = "token") - public static final String SP_FHIRVERSION = "fhirversion"; + @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) + public static final String SP_FHIRVERSION = "fhirversion"; @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name = "supported-profile", path = "Conformance.profile", description = "Profiles supported by the system", type = "reference") - public static final String SP_SUPPORTEDPROFILE = "supported-profile"; + @SearchParamDefinition(name="url", path="Conformance.url", description="The uri that identifies the conformance statement", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles supported by the system", type="reference" ) + public static final String SP_SUPPORTEDPROFILE = "supported-profile"; @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) public static final String SP_MODE = "mode"; - @SearchParamDefinition(name = "security", path = "Conformance.rest.security", description = "Information about security of implementation", type = "token") - public static final String SP_SECURITY = "security"; + @SearchParamDefinition(name="security", path="Conformance.rest.security", description="Information about security of implementation", type="token" ) + public static final String SP_SECURITY = "security"; @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name = "publisher", path = "Conformance.publisher", description = "Name of the publisher of the conformance statement", type = "string") - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "event", path = "Conformance.messaging.event.code", description = "Event code in a conformance statement", type = "token") - public static final String SP_EVENT = "event"; - @SearchParamDefinition(name = "status", path = "Conformance.status", description = "The current status of the conformance statement", type = "token") - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) + public static final String SP_EVENT = "event"; + @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) + public static final String SP_STATUS = "status"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DateAndTime.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DateAndTime.java deleted file mode 100644 index ba17c393fe6..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DateAndTime.java +++ /dev/null @@ -1,611 +0,0 @@ -package org.hl7.fhir.instance.model; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -import java.text.ParseException; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import org.hl7.fhir.utilities.Utilities; - -// java 1.7 can parse xml date/times, but going java 1.7 is too hard for implementers -// javax.xml.bind.DatatypeConverter can parse xml date/times, but is not available on android. (and it's error message sucks) -// anyway, the underlying date/time concept has variable precision, and timezone, and neither Date nor Calendar real with -// that nicely. So we parse the date directly - -public class DateAndTime { - - private int year; - private int month; - private int day; - private boolean time; - private int hour; - private int minute; - private boolean seconds; - private int second; - private int fractions; - private int fraction; - private java.lang.Boolean timezone; - private boolean positiveOffset; //needed to represent negative offset of less than an hour (for example -00:00 or -00:30) - private int tzHour; - private int tzMin; - - public DateAndTime(String xDate) throws ParseException { - - String s; - String t = null; - if (xDate.endsWith("Z")) { - s = xDate.substring(0, xDate.length()-1); - timezone = false; - } else if (xDate.lastIndexOf("-") > 8) { - s = xDate.substring(0, xDate.lastIndexOf("-")); - t = xDate.substring(xDate.lastIndexOf("-")); - setTzSign(false); - } else if (xDate.lastIndexOf("+") > 8) { - s = xDate.substring(0, xDate.lastIndexOf("+")); - t = xDate.substring(xDate.lastIndexOf("+")); - setTzSign(true); - } else { // no timezone - s = xDate; - t = null; - timezone = null; - } - - int offset = 0; - try { - int yearlength = s.startsWith("-") ? s.substring(1).indexOf("-") + 1 : s.indexOf("-"); - if (yearlength == -1) { - yearlength = 4; - } - setYear(readField(s, 0, yearlength)); - offset = yearlength; - if (s.length() >= yearlength + 3) - setMonth(readField(s, yearlength + 1, 2)); - offset = yearlength + 4; - if (s.length() >= yearlength + 6) - setDay(readField(s, yearlength + 4, 2)); - offset = yearlength + 7; - if (s.length() >= yearlength + 9) - setHour(readField(s, yearlength + 7, 2)); - offset = yearlength + 10; - if (s.length() >= yearlength + 12) - setMinute(readField(s, yearlength + 10, 2)); - offset = yearlength + 13; - if (s.length() >= yearlength + 15) - setSecond(readField(s, yearlength + 13, 2)); - offset = yearlength + 16; - if (s.length() >= yearlength + 17) { - setFractions(s.length() - (yearlength + 16)); - setFraction(readField(s, yearlength + 16, fractions)); - } - if (t != null) { - setTzHour(readField(t, 1, 2)); - setTzMin(readField(t, 4, 2)); - } - } catch (Exception e) { - throw new ParseException("The date '"+xDate+"' is not a valid Date Time Format at character "+java.lang.Integer.toString(offset), offset); - } - } - - private static int readField(String date, int i, int j) { - String s = date.substring(i, i+j); - if (s.startsWith("+")) - s = s.substring(1); - return java.lang.Integer.parseInt(s); - } - - - public DateAndTime(Calendar date) { - setCalendar(date); - } - - private void setCalendar(Calendar date) { - setYear(date.get(Calendar.YEAR)); - setMonth(date.get(Calendar.MONTH)+1); - setDay(date.get(Calendar.DAY_OF_MONTH)); - setHour(date.get(Calendar.HOUR_OF_DAY)); - setMinute(date.get(Calendar.MINUTE)); - setSecond(date.get(Calendar.SECOND)); - if (date.get(Calendar.MILLISECOND) > 0) { - setFractions(3); - try { - setFraction(date.get(Calendar.MILLISECOND)); - } catch (Exception e) { - // can't happen - } - } - if (date.getTimeZone() != null) { - int offset = date.getTimeZone().getOffset(date.getTime().getTime()); - setOffsetMinutes(offset / 1000 / 60); - } - } - - public DateAndTime(java.util.Date date) { - Calendar cal = new GregorianCalendar(); - cal.setTime(date); - setCalendar(cal); - } - - private DateAndTime() { - } - - @Override - public String toString() { - StringBuilder b = new StringBuilder(); - b.append(Utilities.padLeft(java.lang.Integer.toString(year), '0', 4)); - if (month != 0) { - b.append("-"); - b.append(Utilities.padLeft(java.lang.Integer.toString(month), '0', 2)); - if (day != 0) { - b.append("-"); - b.append(Utilities.padLeft(java.lang.Integer.toString(day), '0', 2)); - if (time) { - b.append("T"); - b.append(Utilities.padLeft(java.lang.Integer.toString(hour), '0', 2)); - b.append(":"); - b.append(Utilities.padLeft(java.lang.Integer.toString(minute), '0', 2)); - if (seconds) { - b.append(":"); - b.append(Utilities.padLeft(java.lang.Integer.toString(second), '0', 2)); - if (fractions > 0) { - b.append("."); - b.append(Utilities.padLeft(java.lang.Integer.toString(fraction), '0', fractions)); - } - } - } - if (timezone != null) { - if (!timezone) { - b.append("Z"); - } else { - if (positiveOffset) { - b.append("+"); - } else { - b.append("-"); - } - b.append(Utilities.padLeft(java.lang.Integer.toString(tzHour), '0', 2)); - b.append(":"); - b.append(Utilities.padLeft(java.lang.Integer.toString(tzMin), '0', 2)); - } - } - } - } - return b.toString(); - } - - public Calendar toCalendar() { - Calendar cal = null; - if (timezone == null) { - cal = Calendar.getInstance(); - } else { - TimeZone tz; - if (!timezone) { - tz = TimeZone.getTimeZone("GMT+00:00"); - } else { - tz = TimeZone.getTimeZone("GMT"+(positiveOffset ? "+" : "-")+Utilities.padLeft(java.lang.Integer.toString(tzHour), '0', 2)+":"+Utilities.padLeft(java.lang.Integer.toString(tzMin), '0', 2)); - } - cal = Calendar.getInstance(tz); - } - - //default to 0 if unset - cal.set(Calendar.MONTH, 0); - cal.set(Calendar.DAY_OF_MONTH, 1); - cal.set(Calendar.HOUR_OF_DAY, 0); - cal.set(Calendar.MINUTE, 0); - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MILLISECOND, 0); - - cal.set(Calendar.YEAR, year); - if (month > 0) { - cal.set(Calendar.MONTH, month - 1); - if (day > 0) { - cal.set(Calendar.DAY_OF_MONTH, day); - if (time) { - cal.set(Calendar.HOUR_OF_DAY, hour); - cal.set(Calendar.MINUTE, minute); - if (seconds) { - cal.set(Calendar.SECOND, second); - if (fractions > 0) { - cal.set(Calendar.MILLISECOND, (int)((double) fraction / Math.pow(10, fractions) * 1000.0)); - } - } - } - } - } - return cal; - } - - public DateType toDate() { - return null; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - - public int getMonth() { - return month; - } - - public void setMonth(int month) { - this.month = month; - } - - public int getDay() { - return day; - } - - public void setDay(int day) { - this.day = day; - } - - public boolean isTime() { - return time; - } - - public void setTime(boolean time) { - this.time = time; - if (!time) - setSeconds(false); - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.time = true; - this.hour = hour; - } - - public int getMinute() { - return minute; - } - - public void setMinute(int minute) { - this.time = true; - this.minute = minute; - } - - public boolean isSeconds() { - return seconds; - } - - public void setSeconds(boolean seconds) { - this.seconds = seconds; - if (!seconds) - setFractions(0); - } - - public int getSecond() { - return second; - } - - public void setSecond(int second) { - this.time = true; - this.seconds = true; - this.second = second; - } - - public int getFractions() { - return fractions; - } - - public void setFractions(int fractions) { - this.fractions = fractions; - } - - public int getFraction() { - return fraction; - } - - public void setFraction(int fraction) throws Exception { - if (this.fractions == 0) - throw new Exception("set 'fractions' before setting 'fraction'"); - - this.fraction = fraction; - } - - public java.lang.Boolean getTimezone() { - return timezone; - } - - public void setTimezone(java.lang.Boolean timezone) { - this.timezone = timezone; - } - - public int getTzHour() { - return tzHour; - } - - public void setTzHour(int tzHour) { - this.tzHour = Math.abs(tzHour); - this.timezone = true; - } - - /** - * @param isPositiveOffset - true if the tz offset is positive (i.e. +06:00), false if the tz offset is negative (-06:00) - */ - public void setTzSign(boolean isPositiveOffset) { - positiveOffset = isPositiveOffset; - this.timezone = true; - } - - /** - * @return true if the tz offset is positive (i.e. +06:00), false if the tz offset is negative (-06:00) - */ - public boolean getTzSign() { - return positiveOffset; - } - - /** - * @param offset in minutes - */ - public void setOffsetMinutes(int offset) { - boolean positive = (offset >= 0); - offset = Math.abs(offset); - setTzHour(offset / 60); - setTzMin(offset % 60); - setTzSign(positive); - } - - /** - * @return offset in minutes - */ - public int getOffsetMinutes() { - if(timezone == null || !timezone) { - return 0; - } else { - return (positiveOffset ? 1 : -1) * (tzHour * 60 + tzMin); - } - } - - public int getTzMin() { - return tzMin; - } - - public void setTzMin(int tzMin) { - this.tzMin = Math.abs(tzMin); - this.timezone = true; - } - - public static DateAndTime now() { - return new DateAndTime(Calendar.getInstance()); - } - - public static DateAndTime today() { - DateAndTime dt = new DateAndTime(Calendar.getInstance()); - dt.setTime(false); - return dt; - } - - public static DateAndTime parseV3(String xDate) throws ParseException { - - DateAndTime res = new DateAndTime(); - String s; - String t = null; - if (xDate.endsWith("Z")) { - s = xDate.substring(0, xDate.length()-1); - res.timezone = false; - } else if (xDate.lastIndexOf("-") > 0) { - s = xDate.substring(0, xDate.lastIndexOf("-")); - t = xDate.substring(xDate.lastIndexOf("-")); - res.setTzSign(false); - } else if (xDate.lastIndexOf("+") > 0) { - s = xDate.substring(0, xDate.lastIndexOf("+")); - t = xDate.substring(xDate.lastIndexOf("+")); - res.setTzSign(true); - } else { // no timezone - s = xDate; - t = null; - res.timezone = null; - } - - int offset = 0; - try { - res.setYear(readField(s, 0, 4)); - offset = 4; - if (s.length() >= 6) - res.setMonth(readField(s, 4, 2)); - offset = 6; - if (s.length() >= 8) - res.setDay(readField(s, 6, 2)); - offset = 8; - if (s.length() >= 10) - res.setHour(readField(s, 8, 2)); - offset = 10; - if (s.length() >= 12) - res.setMinute(readField(s, 10, 2)); - offset = 12; - if (s.length() >= 14) - res.setSecond(readField(s, 12, 2)); - offset = 15; - if (s.length() >= 16) { - res.setFractions(s.length() - (15)); - res.setFraction(readField(s, 15, res.fractions)); - } - if (t != null) { - res.setTzHour(readField(t, 1, 2)); - res.setTzMin(readField(t, 3, 2)); - } - } catch (Exception e) { - throw new ParseException("The date '"+xDate+"' is not a valid Date Time Format at character "+java.lang.Integer.toString(offset), offset); - } - return res; - } - - public DateAndTime expandTime() { - time = true; - seconds = true; - timezone = true; - TimeZone tz = TimeZone.getDefault(); - - int offset = tz.getOffset(new java.util.Date().getTime()); - setOffsetMinutes(offset / (60 * 1000)); - return this; - } - - public String toHumanDisplay() { - if (isTime()) - return java.lang.Integer.toString(this.day)+"-"+this.getMonthCode()+" "+java.lang.Integer.toString(this.getYear()) +" "+java.lang.Integer.toString(this.hour)+":"+java.lang.Integer.toString(this.minute); - else - return java.lang.Integer.toString(this.day)+"-"+this.getMonthCode()+" "+java.lang.Integer.toString(this.getYear()); - } - - private String getMonthCode() { - switch (month) { - case 1: return "Jan"; - case 2: return "Feb"; - case 3: return "Mar"; - case 4: return "Apr"; - case 5: return "May"; - case 6: return "Jun"; - case 7: return "Jul"; - case 8: return "Aug"; - case 9: return "Sep"; - case 10: return "Oct"; - case 11: return "Nov"; - case 12: return "Dec"; - - } - return null; - } - - /** - * Add a duration to the DateAndTime. See documentation for Calendar.add - * - * @param field - Calendar constants for field - * @param value - value to add - can be positive or negative - * @throws Exception - */ - public void add(int field, int value) throws Exception { - switch (field) { - case Calendar.YEAR: - year = year + value; - break; - case Calendar.MONTH: - month = month + (value == 0 ? 1 : value); - while (month <= 0) { - add(Calendar.YEAR, -1); - month = month + 12; - } - while (month > 12) { - add(Calendar.YEAR, 1); - month = month - 12; - } - break; - case Calendar.DAY_OF_YEAR: - day = day + (value == 0 ? 1 : value); - while (day <= 0) { - add(Calendar.MONTH, -1); - day = day + daysInMonth(year, month); - } - int days = daysInMonth(year, month); - while (day > days) { - add(Calendar.MONTH, 1); - day = day - days; - days = daysInMonth(year, month); - } - break; - case Calendar.HOUR: - hour = hour + value; - time = true; - while (hour < 0) { - add(Calendar.DAY_OF_YEAR, -1); - hour = hour + 24; - } - while (hour >= 24) { - add(Calendar.DAY_OF_YEAR, 1); - hour = hour - 24; - } - break; - case Calendar.MINUTE: - minute = minute + value; - time = true; - while (minute < 0) { - add(Calendar.HOUR, -1); - minute = minute + 60; - } - while (minute >= 60) { - add(Calendar.HOUR, 1); - minute = minute - 60; - } - break; - case Calendar.SECOND: - second = second + value; - seconds = true; - while (second < 0) { - add(Calendar.MINUTE, -1); - second = second + 60; - } - while (second >= 60) { - add(Calendar.MINUTE, 1); - second = second - 60; - } - break; - default: - throw new Exception("Unknown field"); - } - } - - private int daysInMonth(int aYear, int aMonth) { - switch (aMonth) { - case 1: return 31; - case 2: return isleapYear(aYear) ? 29 : 28; - case 3: return 31; - case 4: return 30; - case 5: return 31; - case 6: return 30; - case 7: return 31; - case 8: return 31; - case 9: return 30; - case 10: return 31; - case 11: return 30; - case 12: return 31; - default: - throw new Error("illegal month "+java.lang.Integer.toString(aMonth)); - } - } - - private boolean isleapYear(int aYear) { - return (aYear % 4 == 0) && !((aYear % 100 == 0) && (aYear % 400 != 0)); - } - - public boolean before(DateAndTime other) { - - if(this.time && other.time) { - return toCalendar().getTimeInMillis() < other.toCalendar().getTimeInMillis(); - } else if (this.year != other.year) { - return this.year < other.year; - } else if (this.month != other.month) { - return this.month < other.month; - } else if (this.day != other.day) { - return this.day < other.day; - } else - return false; - } - -} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumerations.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumerations.java new file mode 100644 index 00000000000..dbe04f8dc59 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Enumerations.java @@ -0,0 +1,91 @@ +package org.hl7.fhir.instance.model; + +public class Enumerations { + + public enum ConformanceResourceStatus { + /** + * This resource is still under development + */ + DRAFT, + /** + * This resource is ready for normal use + */ + ACTIVE, + /** + * This resource has been withdrawn or superceded and should no longer be used + */ + RETIRED, + /** + * added to help the parsers + */ + NULL; + public static ConformanceResourceStatus fromCode(String codeString) throws Exception { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("active".equals(codeString)) + return ACTIVE; + if ("retired".equals(codeString)) + return RETIRED; + throw new Exception("Unknown ConformanceResourceStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case ACTIVE: return "active"; + case RETIRED: return "retired"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return ""; + case ACTIVE: return ""; + case RETIRED: return ""; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "This resource is still under development"; + case ACTIVE: return "This resource is ready for normal use"; + case RETIRED: return "This resource has been withdrawn or superceded and should no longer be used"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case ACTIVE: return "Active"; + case RETIRED: return "Retired"; + default: return "?"; + } + } + } + + public static class ConformanceResourceStatusEnumFactory implements EnumFactory { + public ConformanceResourceStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return ConformanceResourceStatus.DRAFT; + if ("active".equals(codeString)) + return ConformanceResourceStatus.ACTIVE; + if ("retired".equals(codeString)) + return ConformanceResourceStatus.RETIRED; + throw new IllegalArgumentException("Unknown ConformanceResourceStatus code '"+codeString+"'"); + } + public String toCode(ConformanceResourceStatus code) { + if (code == ConformanceResourceStatus.DRAFT) + return "draft"; + if (code == ConformanceResourceStatus.ACTIVE) + return "active"; + if (code == ConformanceResourceStatus.RETIRED) + return "retired"; + return "?"; + } + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java index 9d7ca645c9f..e76b311aedb 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExplanationOfBenefit.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; @@ -90,8 +90,8 @@ public class ExplanationOfBenefit extends DomainResource { } public String getDisplay() { switch (this) { - case COMPLETE: return "complete"; - case ERROR: return "error"; + case COMPLETE: return "Complete"; + case ERROR: return "Error"; default: return "?"; } } @@ -120,61 +120,61 @@ public class ExplanationOfBenefit extends DomainResource { /** * The Response Business Identifier. */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name = "request", type = {OralHealthClaim.class}, order = 1, min = 0, max = 1) + @Child(name ="request", type={Claim.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; /** * The actual object that is the target of the reference (Original request resource reference.) */ - protected OralHealthClaim requestTarget; + protected Claim requestTarget; /** * Transaction status: error, complete. */ - @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) + @Child(name ="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) + @Child(name ="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) + @Child(name ="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) + @Child(name ="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) + @Child(name ="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The Insurer who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) + @Child(name ="organization", type={Organization.class}, order=7, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -186,7 +186,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) + @Child(name ="requestProvider", type={Practitioner.class}, order=8, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -198,7 +198,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) + @Child(name ="requestOrganization", type={Organization.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -207,7 +207,7 @@ public class ExplanationOfBenefit extends DomainResource { */ protected Organization requestOrganizationTarget; - private static final long serialVersionUID = 1627363360L; + private static final long serialVersionUID = 2098041034L; public ExplanationOfBenefit() { super(); @@ -243,6 +243,16 @@ public class ExplanationOfBenefit extends DomainResource { return t; } + // syntactic sugar + public ExplanationOfBenefit addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + /** * @return {@link #request} (Original request resource reference.) */ @@ -270,19 +280,19 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) */ - public OralHealthClaim getRequestTarget() { + public Claim getRequestTarget() { if (this.requestTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ExplanationOfBenefit.request"); else if (Configuration.doAutoCreate()) - this.requestTarget = new OralHealthClaim(); // aa + this.requestTarget = new Claim(); // aa return this.requestTarget; } /** * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) */ - public ExplanationOfBenefit setRequestTarget(OralHealthClaim value) { + public ExplanationOfBenefit setRequestTarget(Claim value) { this.requestTarget = value; return this; } @@ -617,7 +627,7 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(OralHealthClaim)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request", "Reference(Claim)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java deleted file mode 100644 index 42c180ab8ce..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ExtensionDefinition.java +++ /dev/null @@ -1,1447 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * Defines an extension that can be used in resources. - */ -@ResourceDef(name="ExtensionDefinition", profile="http://hl7.org/fhir/Profile/ExtensionDefinition") -public class ExtensionDefinition extends DomainResource { - - public enum ResourceProfileStatus { - /** - * This profile is still under development. - */ - DRAFT, - /** - * This profile is ready for normal use. - */ - ACTIVE, - /** - * This profile has been deprecated, withdrawn or superseded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static ResourceProfileStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This profile is still under development."; - case ACTIVE: return "This profile is ready for normal use."; - case RETIRED: return "This profile has been deprecated, withdrawn or superseded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - } - - public static class ResourceProfileStatusEnumFactory implements EnumFactory { - public ResourceProfileStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return ResourceProfileStatus.DRAFT; - if ("active".equals(codeString)) - return ResourceProfileStatus.ACTIVE; - if ("retired".equals(codeString)) - return ResourceProfileStatus.RETIRED; - throw new IllegalArgumentException("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode(ResourceProfileStatus code) { - if (code == ResourceProfileStatus.DRAFT) - return "draft"; - if (code == ResourceProfileStatus.ACTIVE) - return "active"; - if (code == ResourceProfileStatus.RETIRED) - return "retired"; - return "?"; - } - } - - public enum ExtensionContext { - /** - * The context is all elements matching a particular resource element path. - */ - RESOURCE, - /** - * The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name). - */ - DATATYPE, - /** - * The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used. - */ - MAPPING, - /** - * The context is a particular extension from a particular profile. Expressed as uri#name, where uri identifies the profile and #name identifies the extension code. - */ - EXTENSION, - /** - * added to help the parsers - */ - NULL; - public static ExtensionContext fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("resource".equals(codeString)) - return RESOURCE; - if ("datatype".equals(codeString)) - return DATATYPE; - if ("mapping".equals(codeString)) - return MAPPING; - if ("extension".equals(codeString)) - return EXTENSION; - throw new Exception("Unknown ExtensionContext code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case RESOURCE: return "resource"; - case DATATYPE: return "datatype"; - case MAPPING: return "mapping"; - case EXTENSION: return "extension"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case RESOURCE: return ""; - case DATATYPE: return ""; - case MAPPING: return ""; - case EXTENSION: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case RESOURCE: return "The context is all elements matching a particular resource element path."; - case DATATYPE: return "The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name)."; - case MAPPING: return "The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used."; - case EXTENSION: return "The context is a particular extension from a particular profile. Expressed as uri#name, where uri identifies the profile and #name identifies the extension code."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case RESOURCE: return "resource"; - case DATATYPE: return "datatype"; - case MAPPING: return "mapping"; - case EXTENSION: return "extension"; - default: return "?"; - } - } - } - - public static class ExtensionContextEnumFactory implements EnumFactory { - public ExtensionContext fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("resource".equals(codeString)) - return ExtensionContext.RESOURCE; - if ("datatype".equals(codeString)) - return ExtensionContext.DATATYPE; - if ("mapping".equals(codeString)) - return ExtensionContext.MAPPING; - if ("extension".equals(codeString)) - return ExtensionContext.EXTENSION; - throw new IllegalArgumentException("Unknown ExtensionContext code '"+codeString+"'"); - } - public String toCode(ExtensionContext code) { - if (code == ExtensionContext.RESOURCE) - return "resource"; - if (code == ExtensionContext.DATATYPE) - return "datatype"; - if (code == ExtensionContext.MAPPING) - return "mapping"; - if (code == ExtensionContext.EXTENSION) - return "extension"; - return "?"; - } - } - - @Block() - public static class ExtensionDefinitionMappingComponent extends BackboneElement { - /** - * An Internal id that is used to identify this mapping set when specific mappings are made. - */ - @Child(name="identity", type={IdType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made." ) - protected IdType identity; - - /** - * A URI that identifies the specification that this mapping is expressed to. - */ - @Child(name="uri", type={UriType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="A URI that identifies the specification that this mapping is expressed to." ) - protected UriType uri; - - /** - * A name for the specification that is being mapped to. - */ - @Child(name="name", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) - protected StringType name; - - /** - * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Versions, Issues, Scope limitations etc", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) - protected StringType comments; - - private static final long serialVersionUID = 299630820L; - - public ExtensionDefinitionMappingComponent() { - super(); - } - - public ExtensionDefinitionMappingComponent(IdType identity) { - super(); - this.identity = identity; - } - - /** - * @return {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value - */ - public IdType getIdentityElement() { - if (this.identity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinitionMappingComponent.identity"); - else if (Configuration.doAutoCreate()) - this.identity = new IdType(); // bb - return this.identity; - } - - public boolean hasIdentityElement() { - return this.identity != null && !this.identity.isEmpty(); - } - - public boolean hasIdentity() { - return this.identity != null && !this.identity.isEmpty(); - } - - /** - * @param value {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value - */ - public ExtensionDefinitionMappingComponent setIdentityElement(IdType value) { - this.identity = value; - return this; - } - - /** - * @return An Internal id that is used to identify this mapping set when specific mappings are made. - */ - public String getIdentity() { - return this.identity == null ? null : this.identity.getValue(); - } - - /** - * @param value An Internal id that is used to identify this mapping set when specific mappings are made. - */ - public ExtensionDefinitionMappingComponent setIdentity(String value) { - if (this.identity == null) - this.identity = new IdType(); - this.identity.setValue(value); - return this; - } - - /** - * @return {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public UriType getUriElement() { - if (this.uri == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinitionMappingComponent.uri"); - else if (Configuration.doAutoCreate()) - this.uri = new UriType(); // bb - return this.uri; - } - - public boolean hasUriElement() { - return this.uri != null && !this.uri.isEmpty(); - } - - public boolean hasUri() { - return this.uri != null && !this.uri.isEmpty(); - } - - /** - * @param value {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public ExtensionDefinitionMappingComponent setUriElement(UriType value) { - this.uri = value; - return this; - } - - /** - * @return A URI that identifies the specification that this mapping is expressed to. - */ - public String getUri() { - return this.uri == null ? null : this.uri.getValue(); - } - - /** - * @param value A URI that identifies the specification that this mapping is expressed to. - */ - public ExtensionDefinitionMappingComponent setUri(String value) { - if (Utilities.noString(value)) - this.uri = null; - else { - if (this.uri == null) - this.uri = new UriType(); - this.uri.setValue(value); - } - return this; - } - - /** - * @return {@link #name} (A name for the specification that is being mapped to.). 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 ExtensionDefinitionMappingComponent.name"); - else if (Configuration.doAutoCreate()) - this.name = new StringType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public ExtensionDefinitionMappingComponent setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return A name for the specification that is being mapped to. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value A name for the specification that is being mapped to. - */ - public ExtensionDefinitionMappingComponent 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 #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value - */ - public StringType getCommentsElement() { - if (this.comments == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinitionMappingComponent.comments"); - else if (Configuration.doAutoCreate()) - this.comments = new StringType(); // bb - return this.comments; - } - - public boolean hasCommentsElement() { - return this.comments != null && !this.comments.isEmpty(); - } - - public boolean hasComments() { - return this.comments != null && !this.comments.isEmpty(); - } - - /** - * @param value {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value - */ - public ExtensionDefinitionMappingComponent setCommentsElement(StringType value) { - this.comments = value; - return this; - } - - /** - * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - public String getComments() { - return this.comments == null ? null : this.comments.getValue(); - } - - /** - * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - public ExtensionDefinitionMappingComponent setComments(String value) { - if (Utilities.noString(value)) - this.comments = null; - else { - if (this.comments == null) - this.comments = new StringType(); - this.comments.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identity", "id", "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, java.lang.Integer.MAX_VALUE, identity)); - childrenList.add(new Property("uri", "uri", "A URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); - childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); - } - - public ExtensionDefinitionMappingComponent copy() { - ExtensionDefinitionMappingComponent dst = new ExtensionDefinitionMappingComponent(); - copyValues(dst); - dst.identity = identity == null ? null : identity.copy(); - dst.uri = uri == null ? null : uri.copy(); - dst.name = name == null ? null : name.copy(); - dst.comments = comments == null ? null : comments.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ExtensionDefinitionMappingComponent)) - return false; - ExtensionDefinitionMappingComponent o = (ExtensionDefinitionMappingComponent) other; - return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) - && compareDeep(comments, o.comments, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ExtensionDefinitionMappingComponent)) - return false; - ExtensionDefinitionMappingComponent o = (ExtensionDefinitionMappingComponent) other; - return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) - && compareValues(comments, o.comments, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) - && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); - } - - } - - /** - * The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems. - */ - @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) - @Description(shortDefinition="Literal URL used to reference this extension", formalDefinition="The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems." ) - protected UriType url; - - /** - * Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). - */ - @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Other identifiers for the extension", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) - protected List identifier; - - /** - * A free text natural language name identifying the extension. - */ - @Child(name = "name", type = {StringType.class}, order = 2, min = 1, max = 1) - @Description(shortDefinition="Descriptional name for this profile", formalDefinition="A free text natural language name identifying the extension." ) - protected StringType name; - - /** - * Defined so that applications can use this name when displaying the value of the extension to the user. - */ - @Child(name = "display", type = {StringType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) - protected StringType display; - - /** - * Details of the individual or organization who accepts responsibility for publishing the extension definition. - */ - @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the extension definition." ) - protected StringType publisher; - - /** - * Contact details to assist a user in finding and communicating with the publisher. - */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) - protected List telecom; - - /** - * A free text natural language description of the extension and its use. - */ - @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Natural language description of the extension", formalDefinition="A free text natural language description of the extension and its use." ) - protected StringType description; - - /** - * A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions. - */ - @Child(name = "code", type = {Coding.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions." ) - protected List code; - - /** - * The status of the extension. - */ - @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) - @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the extension." ) - protected Enumeration status; - - /** - * This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - @Child(name = "experimental", type = {BooleanType.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) - protected BooleanType experimental; - - /** - * The date that this version of the extension was published. - */ - @Child(name = "date", type = {DateTimeType.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Date for this version of the extension", formalDefinition="The date that this version of the extension was published." ) - protected DateTimeType date; - - /** - * The Scope and Usage that this extension was created to meet. - */ - @Child(name = "requirements", type = {StringType.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Scope and Usage this extesion is for", formalDefinition="The Scope and Usage that this extension was created to meet." ) - protected StringType requirements; - - /** - * An external specification that the content is mapped to. - */ - @Child(name = "mapping", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) - protected List mapping; - - /** - * Identifies the type of context to which the extension applies. - */ - @Child(name = "contextType", type = {CodeType.class}, order = 13, min = 1, max = 1) - @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) - protected Enumeration contextType; - - /** - * Identifies the types of resource or data type elements to which the extension can be applied. - */ - @Child(name = "context", type = {StringType.class}, order = 14, min = 1, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) - protected List context; - - /** - * Definition of the elements that are defined to be in the extension. - */ - @Child(name = "element", type = {ElementDefinition.class}, order = 15, min = 1, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Definition of the elements in the extension", formalDefinition="Definition of the elements that are defined to be in the extension." ) - protected List element; - - private static final long serialVersionUID = -989216686L; - - public ExtensionDefinition() { - super(); - } - - public ExtensionDefinition(UriType url, StringType name, Enumeration status, Enumeration contextType) { - super(); - this.url = url; - this.name = name; - this.status = status; - this.contextType = contextType; - } - - /** - * @return {@link #url} (The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value - */ - public UriType getUrlElement() { - if (this.url == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.url"); - else if (Configuration.doAutoCreate()) - this.url = new UriType(); // bb - return this.url; - } - - public boolean hasUrlElement() { - return this.url != null && !this.url.isEmpty(); - } - - public boolean hasUrl() { - return this.url != null && !this.url.isEmpty(); - } - - /** - * @param value {@link #url} (The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value - */ - public ExtensionDefinition setUrlElement(UriType value) { - this.url = value; - return this; - } - - /** - * @return The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems. - */ - public String getUrl() { - return this.url == null ? null : this.url.getValue(); - } - - /** - * @param value The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems. - */ - public ExtensionDefinition setUrl(String value) { - if (this.url == null) - this.url = new UriType(); - this.url.setValue(value); - return this; - } - - /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #name} (A free text natural language name identifying the extension.). 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 ExtensionDefinition.name"); - else if (Configuration.doAutoCreate()) - this.name = new StringType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (A free text natural language name identifying the extension.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public ExtensionDefinition setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return A free text natural language name identifying the extension. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value A free text natural language name identifying the extension. - */ - public ExtensionDefinition setName(String value) { - if (this.name == null) - this.name = new StringType(); - this.name.setValue(value); - return this; - } - - /** - * @return {@link #display} (Defined so that applications can use this name when displaying the value of the extension to the user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public StringType getDisplayElement() { - if (this.display == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.display"); - else if (Configuration.doAutoCreate()) - this.display = new StringType(); // bb - return this.display; - } - - public boolean hasDisplayElement() { - return this.display != null && !this.display.isEmpty(); - } - - public boolean hasDisplay() { - return this.display != null && !this.display.isEmpty(); - } - - /** - * @param value {@link #display} (Defined so that applications can use this name when displaying the value of the extension to the user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public ExtensionDefinition setDisplayElement(StringType value) { - this.display = value; - return this; - } - - /** - * @return Defined so that applications can use this name when displaying the value of the extension to the user. - */ - public String getDisplay() { - return this.display == null ? null : this.display.getValue(); - } - - /** - * @param value Defined so that applications can use this name when displaying the value of the extension to the user. - */ - public ExtensionDefinition setDisplay(String value) { - if (Utilities.noString(value)) - this.display = null; - else { - if (this.display == null) - this.display = new StringType(); - this.display.setValue(value); - } - return this; - } - - /** - * @return {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the extension definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value - */ - public StringType getPublisherElement() { - if (this.publisher == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.publisher"); - else if (Configuration.doAutoCreate()) - this.publisher = new StringType(); // bb - return this.publisher; - } - - public boolean hasPublisherElement() { - return this.publisher != null && !this.publisher.isEmpty(); - } - - public boolean hasPublisher() { - return this.publisher != null && !this.publisher.isEmpty(); - } - - /** - * @param value {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the extension definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value - */ - public ExtensionDefinition setPublisherElement(StringType value) { - this.publisher = value; - return this; - } - - /** - * @return Details of the individual or organization who accepts responsibility for publishing the extension definition. - */ - public String getPublisher() { - return this.publisher == null ? null : this.publisher.getValue(); - } - - /** - * @param value Details of the individual or organization who accepts responsibility for publishing the extension definition. - */ - public ExtensionDefinition setPublisher(String value) { - if (Utilities.noString(value)) - this.publisher = null; - else { - if (this.publisher == null) - this.publisher = new StringType(); - this.publisher.setValue(value); - } - return this; - } - - /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) - */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; - } - - public boolean hasTelecom() { - if (this.telecom == null) - return false; - for (ContactPoint item : this.telecom) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) - */ - // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); - return t; - } - - /** - * @return {@link #description} (A free text natural language description of the extension and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A free text natural language description of the extension and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public ExtensionDefinition setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A free text natural language description of the extension and its use. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A free text natural language description of the extension and its use. - */ - public ExtensionDefinition 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 #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions.) - */ - public List getCode() { - if (this.code == null) - this.code = new ArrayList(); - return this.code; - } - - public boolean hasCode() { - if (this.code == null) - return false; - for (Coding item : this.code) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions.) - */ - // syntactic sugar - public Coding addCode() { //3 - Coding t = new Coding(); - if (this.code == null) - this.code = new ArrayList(); - this.code.add(t); - return t; - } - - /** - * @return {@link #status} (The status of the extension.). 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 ExtensionDefinition.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); // 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 extension.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public ExtensionDefinition setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The status of the extension. - */ - public ResourceProfileStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The status of the extension. - */ - public ExtensionDefinition setStatus(ResourceProfileStatus value) { - if (this.status == null) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #experimental} (This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value - */ - public BooleanType getExperimentalElement() { - if (this.experimental == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.experimental"); - else if (Configuration.doAutoCreate()) - this.experimental = new BooleanType(); // bb - return this.experimental; - } - - public boolean hasExperimentalElement() { - return this.experimental != null && !this.experimental.isEmpty(); - } - - public boolean hasExperimental() { - return this.experimental != null && !this.experimental.isEmpty(); - } - - /** - * @param value {@link #experimental} (This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value - */ - public ExtensionDefinition setExperimentalElement(BooleanType value) { - this.experimental = value; - return this; - } - - /** - * @return This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); - } - - /** - * @param value This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - public ExtensionDefinition setExperimental(boolean value) { - if (this.experimental == null) - this.experimental = new BooleanType(); - this.experimental.setValue(value); - return this; - } - - /** - * @return {@link #date} (The date that this version of the extension was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; - } - - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); - } - - /** - * @param value {@link #date} (The date that this version of the extension was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public ExtensionDefinition setDateElement(DateTimeType value) { - this.date = value; - return this; - } - - /** - * @return The date that this version of the extension was published. - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The date that this version of the extension was published. - */ - public ExtensionDefinition setDate(Date value) { - if (value == null) - this.date = null; - else { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - } - return this; - } - - /** - * @return {@link #requirements} (The Scope and Usage that this extension was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public StringType getRequirementsElement() { - if (this.requirements == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.requirements"); - else if (Configuration.doAutoCreate()) - this.requirements = new StringType(); // bb - return this.requirements; - } - - public boolean hasRequirementsElement() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - public boolean hasRequirements() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - /** - * @param value {@link #requirements} (The Scope and Usage that this extension was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public ExtensionDefinition setRequirementsElement(StringType value) { - this.requirements = value; - return this; - } - - /** - * @return The Scope and Usage that this extension was created to meet. - */ - public String getRequirements() { - return this.requirements == null ? null : this.requirements.getValue(); - } - - /** - * @param value The Scope and Usage that this extension was created to meet. - */ - public ExtensionDefinition setRequirements(String value) { - if (Utilities.noString(value)) - this.requirements = null; - else { - if (this.requirements == null) - this.requirements = new StringType(); - this.requirements.setValue(value); - } - return this; - } - - /** - * @return {@link #mapping} (An external specification that the content is mapped to.) - */ - public List getMapping() { - if (this.mapping == null) - this.mapping = new ArrayList(); - return this.mapping; - } - - public boolean hasMapping() { - if (this.mapping == null) - return false; - for (ExtensionDefinitionMappingComponent item : this.mapping) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #mapping} (An external specification that the content is mapped to.) - */ - // syntactic sugar - public ExtensionDefinitionMappingComponent addMapping() { //3 - ExtensionDefinitionMappingComponent t = new ExtensionDefinitionMappingComponent(); - if (this.mapping == null) - this.mapping = new ArrayList(); - this.mapping.add(t); - return t; - } - - /** - * @return {@link #contextType} (Identifies the type of context to which the extension applies.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value - */ - public Enumeration getContextTypeElement() { - if (this.contextType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExtensionDefinition.contextType"); - else if (Configuration.doAutoCreate()) - this.contextType = new Enumeration(new ExtensionContextEnumFactory()); // bb - return this.contextType; - } - - public boolean hasContextTypeElement() { - return this.contextType != null && !this.contextType.isEmpty(); - } - - public boolean hasContextType() { - return this.contextType != null && !this.contextType.isEmpty(); - } - - /** - * @param value {@link #contextType} (Identifies the type of context to which the extension applies.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value - */ - public ExtensionDefinition setContextTypeElement(Enumeration value) { - this.contextType = value; - return this; - } - - /** - * @return Identifies the type of context to which the extension applies. - */ - public ExtensionContext getContextType() { - return this.contextType == null ? null : this.contextType.getValue(); - } - - /** - * @param value Identifies the type of context to which the extension applies. - */ - public ExtensionDefinition setContextType(ExtensionContext value) { - if (this.contextType == null) - this.contextType = new Enumeration(new ExtensionContextEnumFactory()); - this.contextType.setValue(value); - return this; - } - - /** - * @return {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) - */ - public List getContext() { - if (this.context == null) - this.context = new ArrayList(); - return this.context; - } - - public boolean hasContext() { - if (this.context == null) - return false; - for (StringType item : this.context) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) - */ - // syntactic sugar - public StringType addContextElement() {//2 - StringType t = new StringType(); - if (this.context == null) - this.context = new ArrayList(); - this.context.add(t); - return t; - } - - /** - * @param value {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) - */ - public ExtensionDefinition addContext(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.context == null) - this.context = new ArrayList(); - this.context.add(t); - return this; - } - - /** - * @param value {@link #context} (Identifies the types of resource or data type elements to which the extension can be applied.) - */ - public boolean hasContext(String value) { - if (this.context == null) - return false; - for (StringType v : this.context) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #element} (Definition of the elements that are defined to be in the extension.) - */ - public List getElement() { - if (this.element == null) - this.element = new ArrayList(); - return this.element; - } - - public boolean hasElement() { - if (this.element == null) - return false; - for (ElementDefinition item : this.element) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #element} (Definition of the elements that are defined to be in the extension.) - */ - // syntactic sugar - public ElementDefinition addElement() { //3 - ElementDefinition t = new ElementDefinition(); - if (this.element == null) - this.element = new ArrayList(); - this.element.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("url", "uri", "The URL at which this definition is (or will be) published, and which is used to reference this profile in extension urls in operational FHIR systems.", 0, java.lang.Integer.MAX_VALUE, url)); - childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this profile when it is represented in other formats (e.g. ISO 11179(, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("name", "string", "A free text natural language name identifying the extension.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("display", "string", "Defined so that applications can use this name when displaying the value of the extension to the user.", 0, java.lang.Integer.MAX_VALUE, display)); - childrenList.add(new Property("publisher", "string", "Details of the individual or organization who accepts responsibility for publishing the extension definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); - childrenList.add(new Property("description", "string", "A free text natural language description of the extension and its use.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of extension definitions.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("status", "code", "The status of the extension.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("experimental", "boolean", "This extension definition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); - childrenList.add(new Property("date", "dateTime", "The date that this version of the extension was published.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("requirements", "string", "The Scope and Usage that this extension was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); - childrenList.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, java.lang.Integer.MAX_VALUE, mapping)); - childrenList.add(new Property("contextType", "code", "Identifies the type of context to which the extension applies.", 0, java.lang.Integer.MAX_VALUE, contextType)); - childrenList.add(new Property("context", "string", "Identifies the types of resource or data type elements to which the extension can be applied.", 0, java.lang.Integer.MAX_VALUE, context)); - childrenList.add(new Property("element", "ElementDefinition", "Definition of the elements that are defined to be in the extension.", 0, java.lang.Integer.MAX_VALUE, element)); - } - - public ExtensionDefinition copy() { - ExtensionDefinition dst = new ExtensionDefinition(); - copyValues(dst); - dst.url = url == null ? null : url.copy(); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.name = name == null ? null : name.copy(); - dst.display = display == null ? null : display.copy(); - dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); - }; - dst.description = description == null ? null : description.copy(); - if (code != null) { - dst.code = new ArrayList(); - for (Coding i : code) - dst.code.add(i.copy()); - }; - dst.status = status == null ? null : status.copy(); - dst.experimental = experimental == null ? null : experimental.copy(); - dst.date = date == null ? null : date.copy(); - dst.requirements = requirements == null ? null : requirements.copy(); - if (mapping != null) { - dst.mapping = new ArrayList(); - for (ExtensionDefinitionMappingComponent i : mapping) - dst.mapping.add(i.copy()); - }; - dst.contextType = contextType == null ? null : contextType.copy(); - if (context != null) { - dst.context = new ArrayList(); - for (StringType i : context) - dst.context.add(i.copy()); - }; - if (element != null) { - dst.element = new ArrayList(); - for (ElementDefinition i : element) - dst.element.add(i.copy()); - }; - return dst; - } - - protected ExtensionDefinition typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ExtensionDefinition)) - return false; - ExtensionDefinition o = (ExtensionDefinition) other; - return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) - && compareDeep(display, o.display, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(description, o.description, true) && compareDeep(code, o.code, true) && compareDeep(status, o.status, true) - && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(requirements, o.requirements, true) - && compareDeep(mapping, o.mapping, true) && compareDeep(contextType, o.contextType, true) && compareDeep(context, o.context, true) - && compareDeep(element, o.element, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ExtensionDefinition)) - return false; - ExtensionDefinition o = (ExtensionDefinition) other; - return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(display, o.display, true) - && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(status, o.status, true) - && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(requirements, o.requirements, true) - && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (name == null || name.isEmpty()) && (display == null || display.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (description == null || description.isEmpty()) - && (code == null || code.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (date == null || date.isEmpty()) && (requirements == null || requirements.isEmpty()) && (mapping == null || mapping.isEmpty()) - && (contextType == null || contextType.isEmpty()) && (context == null || context.isEmpty()) - && (element == null || element.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.ExtensionDefinition; - } - - @SearchParamDefinition(name="date", path="ExtensionDefinition.date", description="Date for this version of the extension", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="ExtensionDefinition.identifier", description="Other identifiers for the extension", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "code", path = "ExtensionDefinition.code", description = "Assist with indexing and finding", type = "token") - public static final String SP_CODE = "code"; - @SearchParamDefinition(name = "valueset", path = "ExtensionDefinition.element.binding.reference[x]", description = "Source of value set", type = "reference") - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name = "name", path = "ExtensionDefinition.name", description = "Descriptional name for this profile", type = "string") - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="ExtensionDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "description", path = "ExtensionDefinition.description", description = "Natural language description of the extension", type = "string") - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name = "url", path = "ExtensionDefinition.url", description = "Literal URL used to reference this extension", type = "token") - public static final String SP_URL = "url"; - @SearchParamDefinition(name = "status", path = "ExtensionDefinition.status", description = "draft | active | retired", type = "token") - public static final String SP_STATUS = "status"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java deleted file mode 100644 index 6597313300f..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyHistory.java +++ /dev/null @@ -1,1029 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * Significant health events and conditions for people related to the subject relevant in the context of care for the subject. - */ -@ResourceDef(name="FamilyHistory", profile="http://hl7.org/fhir/Profile/FamilyHistory") -public class FamilyHistory extends DomainResource { - - @Block() - public static class FamilyHistoryRelationComponent extends BackboneElement { - /** - * This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". - */ - @Child(name="name", type={StringType.class}, order=1, min=0, max=1) - @Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description. E.g. 'Aunt Susan', 'my cousin with the red hair'." ) - protected StringType name; - - /** - * The type of relationship this person has to the patient (father, mother, brother etc.). - */ - @Child(name="relationship", type={CodeableConcept.class}, order=2, min=1, max=1) - @Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." ) - protected CodeableConcept relationship; - - /** - * The actual or approximate date of birth of the relative. - */ - @Child(name="born", type={Period.class, DateType.class, StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." ) - protected Type born; - - /** - * The actual or approximate age of the relative at the time the family history is recorded. - */ - @Child(name="age", type={Age.class, Range.class, StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="(approximate) age", formalDefinition="The actual or approximate age of the relative at the time the family history is recorded." ) - protected Type age; - - /** - * If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set. - */ - @Child(name="deceased", type={BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Dead? How old/when?", formalDefinition="If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set." ) - protected Type deceased; - - /** - * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. - */ - @Child(name="note", type={StringType.class}, order=6, min=0, max=1) - @Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." ) - protected StringType note; - - /** - * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition. - */ - @Child(name="condition", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." ) - protected List condition; - - private static final long serialVersionUID = 211772865L; - - public FamilyHistoryRelationComponent() { - super(); - } - - public FamilyHistoryRelationComponent(CodeableConcept relationship) { - super(); - this.relationship = relationship; - } - - /** - * @return {@link #name} (This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".). 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 FamilyHistoryRelationComponent.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} (This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public FamilyHistoryRelationComponent setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". - */ - public FamilyHistoryRelationComponent 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 #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) - */ - public CodeableConcept getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistoryRelationComponent.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} (The type of relationship this person has to the patient (father, mother, brother etc.).) - */ - public FamilyHistoryRelationComponent setRelationship(CodeableConcept value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #born} (The actual or approximate date of birth of the relative.) - */ - public Type getBorn() { - return this.born; - } - - /** - * @return {@link #born} (The actual or approximate date of birth of the relative.) - */ - public Period getBornPeriod() throws Exception { - if (!(this.born instanceof Period)) - throw new Exception("Type mismatch: the type Period was expected, but "+this.born.getClass().getName()+" was encountered"); - return (Period) this.born; - } - - /** - * @return {@link #born} (The actual or approximate date of birth of the relative.) - */ - public DateType getBornDateType() throws Exception { - if (!(this.born instanceof DateType)) - throw new Exception("Type mismatch: the type DateType was expected, but "+this.born.getClass().getName()+" was encountered"); - return (DateType) this.born; - } - - /** - * @return {@link #born} (The actual or approximate date of birth of the relative.) - */ - public StringType getBornStringType() throws Exception { - if (!(this.born instanceof StringType)) - throw new Exception("Type mismatch: the type StringType was expected, but "+this.born.getClass().getName()+" was encountered"); - return (StringType) this.born; - } - - public boolean hasBorn() { - return this.born != null && !this.born.isEmpty(); - } - - /** - * @param value {@link #born} (The actual or approximate date of birth of the relative.) - */ - public FamilyHistoryRelationComponent setBorn(Type value) { - this.born = value; - return this; - } - - /** - * @return {@link #age} (The actual or approximate age of the relative at the time the family history is recorded.) - */ - public Type getAge() { - return this.age; - } - - /** - * @return {@link #age} (The actual or approximate age of the relative at the time the family history is recorded.) - */ - public Age getAgeAge() throws Exception { - if (!(this.age instanceof Age)) - throw new Exception("Type mismatch: the type Age was expected, but "+this.age.getClass().getName()+" was encountered"); - return (Age) this.age; - } - - /** - * @return {@link #age} (The actual or approximate age of the relative at the time the family history is recorded.) - */ - public Range getAgeRange() throws Exception { - if (!(this.age instanceof Range)) - throw new Exception("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered"); - return (Range) this.age; - } - - /** - * @return {@link #age} (The actual or approximate age of the relative at the time the family history is recorded.) - */ - public StringType getAgeStringType() throws Exception { - if (!(this.age instanceof StringType)) - throw new Exception("Type mismatch: the type StringType was expected, but "+this.age.getClass().getName()+" was encountered"); - return (StringType) this.age; - } - - public boolean hasAge() { - return this.age != null && !this.age.isEmpty(); - } - - /** - * @param value {@link #age} (The actual or approximate age of the relative at the time the family history is recorded.) - */ - public FamilyHistoryRelationComponent setAge(Type value) { - this.age = value; - return this; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public Type getDeceased() { - return this.deceased; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public BooleanType getDeceasedBooleanType() throws Exception { - if (!(this.deceased instanceof BooleanType)) - throw new Exception("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered"); - return (BooleanType) this.deceased; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public Age getDeceasedAge() throws Exception { - if (!(this.deceased instanceof Age)) - throw new Exception("Type mismatch: the type Age was expected, but "+this.deceased.getClass().getName()+" was encountered"); - return (Age) this.deceased; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public Range getDeceasedRange() throws Exception { - if (!(this.deceased instanceof Range)) - throw new Exception("Type mismatch: the type Range was expected, but "+this.deceased.getClass().getName()+" was encountered"); - return (Range) this.deceased; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public DateType getDeceasedDateType() throws Exception { - if (!(this.deceased instanceof DateType)) - throw new Exception("Type mismatch: the type DateType was expected, but "+this.deceased.getClass().getName()+" was encountered"); - return (DateType) this.deceased; - } - - /** - * @return {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public StringType getDeceasedStringType() throws Exception { - if (!(this.deceased instanceof StringType)) - throw new Exception("Type mismatch: the type StringType was expected, but "+this.deceased.getClass().getName()+" was encountered"); - return (StringType) this.deceased; - } - - public boolean hasDeceased() { - return this.deceased != null && !this.deceased.isEmpty(); - } - - /** - * @param value {@link #deceased} (If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.) - */ - public FamilyHistoryRelationComponent setDeceased(Type value) { - this.deceased = value; - return this; - } - - /** - * @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public StringType getNoteElement() { - if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistoryRelationComponent.note"); - else if (Configuration.doAutoCreate()) - this.note = new StringType(); // bb - return this.note; - } - - public boolean hasNoteElement() { - return this.note != null && !this.note.isEmpty(); - } - - public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); - } - - /** - * @param value {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public FamilyHistoryRelationComponent setNoteElement(StringType value) { - this.note = value; - return this; - } - - /** - * @return This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. - */ - public String getNote() { - return this.note == null ? null : this.note.getValue(); - } - - /** - * @param value This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. - */ - public FamilyHistoryRelationComponent setNote(String value) { - if (Utilities.noString(value)) - this.note = null; - else { - if (this.note == null) - this.note = new StringType(); - this.note.setValue(value); - } - return this; - } - - /** - * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (FamilyHistoryRelationConditionComponent item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) - */ - // syntactic sugar - public FamilyHistoryRelationConditionComponent addCondition() { //3 - FamilyHistoryRelationConditionComponent t = new FamilyHistoryRelationConditionComponent(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("name", "string", "This will either be a name or a description. E.g. 'Aunt Susan', 'my cousin with the red hair'.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, java.lang.Integer.MAX_VALUE, born)); - childrenList.add(new Property("age[x]", "Age|Range|string", "The actual or approximate age of the relative at the time the family history is recorded.", 0, java.lang.Integer.MAX_VALUE, age)); - childrenList.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "If this resource is indicating that the related person is deceased, then an indicator of whether the person is deceased (yes) or not (no) or the age or age range or description of age at death - can be indicated here. If the reason for death is known, then it can be indicated in the outcome code of the condition - in this case the deceased property should still be set.", 0, java.lang.Integer.MAX_VALUE, deceased)); - childrenList.add(new Property("note", "string", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note)); - childrenList.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition)); - } - - public FamilyHistoryRelationComponent copy() { - FamilyHistoryRelationComponent dst = new FamilyHistoryRelationComponent(); - copyValues(dst); - dst.name = name == null ? null : name.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - dst.born = born == null ? null : born.copy(); - dst.age = age == null ? null : age.copy(); - dst.deceased = deceased == null ? null : deceased.copy(); - dst.note = note == null ? null : note.copy(); - if (condition != null) { - dst.condition = new ArrayList(); - for (FamilyHistoryRelationConditionComponent i : condition) - dst.condition.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof FamilyHistoryRelationComponent)) - return false; - FamilyHistoryRelationComponent o = (FamilyHistoryRelationComponent) other; - return compareDeep(name, o.name, true) && compareDeep(relationship, o.relationship, true) && compareDeep(born, o.born, true) - && compareDeep(age, o.age, true) && compareDeep(deceased, o.deceased, true) && compareDeep(note, o.note, true) - && compareDeep(condition, o.condition, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof FamilyHistoryRelationComponent)) - return false; - FamilyHistoryRelationComponent o = (FamilyHistoryRelationComponent) other; - return compareValues(name, o.name, true) && compareValues(note, o.note, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (relationship == null || relationship.isEmpty()) - && (born == null || born.isEmpty()) && (age == null || age.isEmpty()) && (deceased == null || deceased.isEmpty()) - && (note == null || note.isEmpty()) && (condition == null || condition.isEmpty()); - } - - } - - @Block() - public static class FamilyHistoryRelationConditionComponent extends BackboneElement { - /** - * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system. - */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) - @Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." ) - protected CodeableConcept type; - - /** - * Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation. - */ - @Child(name="outcome", type={CodeableConcept.class}, order=2, min=0, max=1) - @Description(shortDefinition="deceased | permanent disability | etc.", formalDefinition="Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation." ) - protected CodeableConcept outcome; - - /** - * Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence. - */ - @Child(name="onset", type={Age.class, Range.class, StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence." ) - protected Type onset; - - /** - * An area where general notes can be placed about this specific condition. - */ - @Child(name="note", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." ) - protected StringType note; - - private static final long serialVersionUID = -1664709272L; - - public FamilyHistoryRelationConditionComponent() { - super(); - } - - public FamilyHistoryRelationConditionComponent(CodeableConcept type) { - super(); - this.type = type; - } - - /** - * @return {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistoryRelationConditionComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) - */ - public FamilyHistoryRelationConditionComponent setType(CodeableConcept value) { - this.type = value; - return this; - } - - /** - * @return {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) - */ - public CodeableConcept getOutcome() { - if (this.outcome == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistoryRelationConditionComponent.outcome"); - else if (Configuration.doAutoCreate()) - this.outcome = new CodeableConcept(); // cc - return this.outcome; - } - - public boolean hasOutcome() { - return this.outcome != null && !this.outcome.isEmpty(); - } - - /** - * @param value {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) - */ - public FamilyHistoryRelationConditionComponent setOutcome(CodeableConcept value) { - this.outcome = value; - return this; - } - - /** - * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) - */ - public Type getOnset() { - return this.onset; - } - - /** - * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) - */ - public Age getOnsetAge() throws Exception { - if (!(this.onset instanceof Age)) - throw new Exception("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (Age) this.onset; - } - - /** - * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) - */ - public Range getOnsetRange() throws Exception { - if (!(this.onset instanceof Range)) - throw new Exception("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (Range) this.onset; - } - - /** - * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) - */ - public StringType getOnsetStringType() throws Exception { - if (!(this.onset instanceof StringType)) - throw new Exception("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (StringType) this.onset; - } - - public boolean hasOnset() { - return this.onset != null && !this.onset.isEmpty(); - } - - /** - * @param value {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) - */ - public FamilyHistoryRelationConditionComponent setOnset(Type value) { - this.onset = value; - return this; - } - - /** - * @return {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public StringType getNoteElement() { - if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistoryRelationConditionComponent.note"); - else if (Configuration.doAutoCreate()) - this.note = new StringType(); // bb - return this.note; - } - - public boolean hasNoteElement() { - return this.note != null && !this.note.isEmpty(); - } - - public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); - } - - /** - * @param value {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public FamilyHistoryRelationConditionComponent setNoteElement(StringType value) { - this.note = value; - return this; - } - - /** - * @return An area where general notes can be placed about this specific condition. - */ - public String getNote() { - return this.note == null ? null : this.note.getValue(); - } - - /** - * @param value An area where general notes can be placed about this specific condition. - */ - public FamilyHistoryRelationConditionComponent setNote(String value) { - if (Utilities.noString(value)) - this.note = null; - else { - if (this.note == null) - this.note = new StringType(); - this.note.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, java.lang.Integer.MAX_VALUE, outcome)); - childrenList.add(new Property("onset[x]", "Age|Range|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, java.lang.Integer.MAX_VALUE, onset)); - childrenList.add(new Property("note", "string", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note)); - } - - public FamilyHistoryRelationConditionComponent copy() { - FamilyHistoryRelationConditionComponent dst = new FamilyHistoryRelationConditionComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.outcome = outcome == null ? null : outcome.copy(); - dst.onset = onset == null ? null : onset.copy(); - dst.note = note == null ? null : note.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof FamilyHistoryRelationConditionComponent)) - return false; - FamilyHistoryRelationConditionComponent o = (FamilyHistoryRelationConditionComponent) other; - return compareDeep(type, o.type, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true) - && compareDeep(note, o.note, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof FamilyHistoryRelationConditionComponent)) - return false; - FamilyHistoryRelationConditionComponent o = (FamilyHistoryRelationConditionComponent) other; - return compareValues(note, o.note, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (outcome == null || outcome.isEmpty()) - && (onset == null || onset.isEmpty()) && (note == null || note.isEmpty()); - } - - } - - /** - * This records identifiers associated with this family history record 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) - @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family history record 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 person who this history concerns. - */ - @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) - @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (The person who this history concerns.) - */ - protected Patient patientTarget; - - /** - * The date (and possibly time) when the family history was taken. - */ - @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family history was taken." ) - protected DateTimeType date; - - /** - * Conveys information about family history not specific to individual relations. - */ - @Child(name = "note", type = {StringType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Additional details not covered elsewhere", formalDefinition="Conveys information about family history not specific to individual relations." ) - protected StringType note; - - /** - * The related person. Each FamilyHistory resource contains the entire family history for a single person. - */ - @Child(name = "relation", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Relative described by history", formalDefinition="The related person. Each FamilyHistory resource contains the entire family history for a single person." ) - protected List relation; - - private static final long serialVersionUID = 1010516594L; - - public FamilyHistory() { - super(); - } - - public FamilyHistory(Reference patient) { - super(); - this.patient = patient; - } - - /** - * @return {@link #identifier} (This records identifiers associated with this family history record 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; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (This records identifiers associated with this family history record 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).) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #patient} (The person who this history concerns.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistory.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (The person who this history concerns.) - */ - public FamilyHistory setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistory.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) - */ - public FamilyHistory setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #date} (The date (and possibly time) when the family history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistory.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; - } - - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); - } - - /** - * @param value {@link #date} (The date (and possibly time) when the family history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public FamilyHistory setDateElement(DateTimeType value) { - this.date = value; - return this; - } - - /** - * @return The date (and possibly time) when the family history was taken. - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The date (and possibly time) when the family history was taken. - */ - public FamilyHistory setDate(Date value) { - if (value == null) - this.date = null; - else { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - } - return this; - } - - /** - * @return {@link #note} (Conveys information about family history not specific to individual relations.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public StringType getNoteElement() { - if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create FamilyHistory.note"); - else if (Configuration.doAutoCreate()) - this.note = new StringType(); // bb - return this.note; - } - - public boolean hasNoteElement() { - return this.note != null && !this.note.isEmpty(); - } - - public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); - } - - /** - * @param value {@link #note} (Conveys information about family history not specific to individual relations.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value - */ - public FamilyHistory setNoteElement(StringType value) { - this.note = value; - return this; - } - - /** - * @return Conveys information about family history not specific to individual relations. - */ - public String getNote() { - return this.note == null ? null : this.note.getValue(); - } - - /** - * @param value Conveys information about family history not specific to individual relations. - */ - public FamilyHistory setNote(String value) { - if (Utilities.noString(value)) - this.note = null; - else { - if (this.note == null) - this.note = new StringType(); - this.note.setValue(value); - } - return this; - } - - /** - * @return {@link #relation} (The related person. Each FamilyHistory resource contains the entire family history for a single person.) - */ - public List getRelation() { - if (this.relation == null) - this.relation = new ArrayList(); - return this.relation; - } - - public boolean hasRelation() { - if (this.relation == null) - return false; - for (FamilyHistoryRelationComponent item : this.relation) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #relation} (The related person. Each FamilyHistory resource contains the entire family history for a single person.) - */ - // syntactic sugar - public FamilyHistoryRelationComponent addRelation() { //3 - FamilyHistoryRelationComponent t = new FamilyHistoryRelationComponent(); - if (this.relation == null) - this.relation = new ArrayList(); - this.relation.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this family history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("date", "dateTime", "The date (and possibly time) when the family history was taken.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("note", "string", "Conveys information about family history not specific to individual relations.", 0, java.lang.Integer.MAX_VALUE, note)); - childrenList.add(new Property("relation", "", "The related person. Each FamilyHistory resource contains the entire family history for a single person.", 0, java.lang.Integer.MAX_VALUE, relation)); - } - - public FamilyHistory copy() { - FamilyHistory dst = new FamilyHistory(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - dst.date = date == null ? null : date.copy(); - dst.note = note == null ? null : note.copy(); - if (relation != null) { - dst.relation = new ArrayList(); - for (FamilyHistoryRelationComponent i : relation) - dst.relation.add(i.copy()); - }; - return dst; - } - - protected FamilyHistory typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof FamilyHistory)) - return false; - FamilyHistory o = (FamilyHistory) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true) - && compareDeep(note, o.note, true) && compareDeep(relation, o.relation, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof FamilyHistory)) - return false; - FamilyHistory o = (FamilyHistory) other; - return compareValues(date, o.date, true) && compareValues(note, o.note, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (date == null || date.isEmpty()) && (note == null || note.isEmpty()) && (relation == null || relation.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.FamilyHistory; - } - - @SearchParamDefinition(name="date", path="FamilyHistory.date", description="When history was captured/updated", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "patient", path = "FamilyHistory.patient", description = "The identity of a subject to list family history items for", type = "reference") - public static final String SP_PATIENT = "patient"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyMemberHistory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyMemberHistory.java new file mode 100644 index 00000000000..76d54fda612 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/FamilyMemberHistory.java @@ -0,0 +1,1059 @@ +package org.hl7.fhir.instance.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, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.annotations.ResourceDef; +import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; +import org.hl7.fhir.instance.model.annotations.Block; +import org.hl7.fhir.instance.model.annotations.Child; +import org.hl7.fhir.instance.model.annotations.Description; +/** + * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. + */ +@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/Profile/FamilyMemberHistory") +public class FamilyMemberHistory extends DomainResource { + + public enum AdministrativeGender { + /** + * Male + */ + MALE, + /** + * Female + */ + FEMALE, + /** + * Other + */ + OTHER, + /** + * Unknown + */ + UNKNOWN, + /** + * added to help the parsers + */ + NULL; + public static AdministrativeGender fromCode(String codeString) throws Exception { + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return MALE; + if ("female".equals(codeString)) + return FEMALE; + if ("other".equals(codeString)) + return OTHER; + if ("unknown".equals(codeString)) + return UNKNOWN; + throw new Exception("Unknown AdministrativeGender code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case MALE: return "male"; + case FEMALE: return "female"; + case OTHER: return "other"; + case UNKNOWN: return "unknown"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case MALE: return ""; + case FEMALE: return ""; + case OTHER: return ""; + case UNKNOWN: return ""; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case MALE: return "Male"; + case FEMALE: return "Female"; + case OTHER: return "Other"; + case UNKNOWN: return "Unknown"; + default: return "?"; + } + } + } + + public static class AdministrativeGenderEnumFactory implements EnumFactory { + public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("male".equals(codeString)) + return AdministrativeGender.MALE; + if ("female".equals(codeString)) + return AdministrativeGender.FEMALE; + if ("other".equals(codeString)) + return AdministrativeGender.OTHER; + if ("unknown".equals(codeString)) + return AdministrativeGender.UNKNOWN; + throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'"); + } + public String toCode(AdministrativeGender code) { + if (code == AdministrativeGender.MALE) + return "male"; + if (code == AdministrativeGender.FEMALE) + return "female"; + if (code == AdministrativeGender.OTHER) + return "other"; + if (code == AdministrativeGender.UNKNOWN) + return "unknown"; + return "?"; + } + } + + @Block() + public static class FamilyMemberHistoryConditionComponent extends BackboneElement { + /** + * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system. + */ + @Child(name ="type", type={CodeableConcept.class}, order=1, min=1, max=1) + @Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." ) + protected CodeableConcept type; + + /** + * Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation. + */ + @Child(name ="outcome", type={CodeableConcept.class}, order=2, min=0, max=1) + @Description(shortDefinition="deceased | permanent disability | etc.", formalDefinition="Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation." ) + protected CodeableConcept outcome; + + /** + * Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence. + */ + @Child(name ="onset", type={Age.class, Range.class, StringType.class}, order=3, min=0, max=1) + @Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence." ) + protected Type onset; + + /** + * An area where general notes can be placed about this specific condition. + */ + @Child(name ="note", type={StringType.class}, order=4, min=0, max=1) + @Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." ) + protected StringType note; + + private static final long serialVersionUID = -1664709272L; + + public FamilyMemberHistoryConditionComponent() { + super(); + } + + public FamilyMemberHistoryConditionComponent(CodeableConcept type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.) + */ + public FamilyMemberHistoryConditionComponent setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) + */ + public CodeableConcept getOutcome() { + if (this.outcome == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.outcome"); + else if (Configuration.doAutoCreate()) + this.outcome = new CodeableConcept(); // cc + return this.outcome; + } + + public boolean hasOutcome() { + return this.outcome != null && !this.outcome.isEmpty(); + } + + /** + * @param value {@link #outcome} (Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.) + */ + public FamilyMemberHistoryConditionComponent setOutcome(CodeableConcept value) { + this.outcome = value; + return this; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Type getOnset() { + return this.onset; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Age getOnsetAge() throws Exception { + if (!(this.onset instanceof Age)) + throw new Exception("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Age) this.onset; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public Range getOnsetRange() throws Exception { + if (!(this.onset instanceof Range)) + throw new Exception("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (Range) this.onset; + } + + /** + * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public StringType getOnsetStringType() throws Exception { + if (!(this.onset instanceof StringType)) + throw new Exception("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered"); + return (StringType) this.onset; + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.) + */ + public FamilyMemberHistoryConditionComponent setOnset(Type value) { + this.onset = value; + return this; + } + + /** + * @return {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (An area where general notes can be placed about this specific condition.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public FamilyMemberHistoryConditionComponent setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return An area where general notes can be placed about this specific condition. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value An area where general notes can be placed about this specific condition. + */ + public FamilyMemberHistoryConditionComponent setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("outcome", "CodeableConcept", "Indicates what happened as a result of this condition. If the condition resulted in death, deceased date is captured on the relation.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("onset[x]", "Age|Range|string", "Either the age of onset, range of approximate age or descriptive string can be recorded. For conditions with multiple occurrences, this describes the first known occurrence.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("note", "string", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note)); + } + + public FamilyMemberHistoryConditionComponent copy() { + FamilyMemberHistoryConditionComponent dst = new FamilyMemberHistoryConditionComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.outcome = outcome == null ? null : outcome.copy(); + dst.onset = onset == null ? null : onset.copy(); + dst.note = note == null ? null : note.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FamilyMemberHistoryConditionComponent)) + return false; + FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other; + return compareDeep(type, o.type, true) && compareDeep(outcome, o.outcome, true) && compareDeep(onset, o.onset, true) + && compareDeep(note, o.note, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FamilyMemberHistoryConditionComponent)) + return false; + FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other; + return compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (type == null || type.isEmpty()) && (outcome == null || outcome.isEmpty()) + && (onset == null || onset.isEmpty()) && (note == null || note.isEmpty()); + } + + } + + /** + * This records identifiers associated with this family member history record 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) + @Description(shortDefinition="External Id(s) for this record", formalDefinition="This records identifiers associated with this family member history record 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 person who this history concerns. + */ + @Child(name ="patient", type={Patient.class}, order=1, min=1, max=1) + @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (The person who this history concerns.) + */ + protected Patient patientTarget; + + /** + * The date (and possibly time) when the family member history was taken. + */ + @Child(name ="date", type={DateTimeType.class}, order=2, min=0, max=1) + @Description(shortDefinition="When history was captured/updated", formalDefinition="The date (and possibly time) when the family member history was taken." ) + protected DateTimeType date; + + /** + * This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". + */ + @Child(name ="name", type={StringType.class}, order=3, min=0, max=1) + @Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description. E.g. 'Aunt Susan', 'my cousin with the red hair'." ) + protected StringType name; + + /** + * The type of relationship this person has to the patient (father, mother, brother etc.). + */ + @Child(name ="relationship", type={CodeableConcept.class}, order=4, min=1, max=1) + @Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." ) + protected CodeableConcept relationship; + + /** + * Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + @Child(name ="gender", type={CodeType.class}, order=5, min=0, max=1) + @Description(shortDefinition="male | female | other | unknown", formalDefinition="Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes." ) + protected Enumeration gender; + + /** + * The actual or approximate date of birth of the relative. + */ + @Child(name ="born", type={Period.class, DateType.class, StringType.class}, order=6, min=0, max=1) + @Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." ) + protected Type born; + + /** + * The actual or approximate age of the relative at the time the family member history is recorded. + */ + @Child(name ="age", type={Age.class, Range.class, StringType.class}, order=7, min=0, max=1) + @Description(shortDefinition="(approximate) age", formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded." ) + protected Type age; + + /** + * The actual or approximate age of the relative at the time the family member history is recorded. + */ + @Child(name ="deceased", type={BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=8, min=0, max=1) + @Description(shortDefinition="Dead? How old/when?", formalDefinition="The actual or approximate age of the relative at the time the family member history is recorded." ) + protected Type deceased; + + /** + * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. + */ + @Child(name ="note", type={StringType.class}, order=9, min=0, max=1) + @Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." ) + protected StringType note; + + /** + * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition. + */ + @Child(name ="condition", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." ) + protected List condition; + + private static final long serialVersionUID = 1785160836L; + + public FamilyMemberHistory() { + super(); + } + + public FamilyMemberHistory(Reference patient, CodeableConcept relationship) { + super(); + this.patient = patient; + this.relationship = relationship; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this family member history record 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; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this family member history record 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).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public FamilyMemberHistory addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #patient} (The person who this history concerns.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The person who this history concerns.) + */ + public FamilyMemberHistory setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who this history concerns.) + */ + public FamilyMemberHistory setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and possibly time) when the family member history was taken.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public FamilyMemberHistory setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and possibly time) when the family member history was taken. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and possibly time) when the family member history was taken. + */ + public FamilyMemberHistory setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".). 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 FamilyMemberHistory.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} (This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public FamilyMemberHistory setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value This will either be a name or a description. E.g. "Aunt Susan", "my cousin with the red hair". + */ + public FamilyMemberHistory 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 #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).) + */ + public CodeableConcept getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.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} (The type of relationship this person has to the patient (father, mother, brother etc.).) + */ + public FamilyMemberHistory setRelationship(CodeableConcept value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public Enumeration getGenderElement() { + if (this.gender == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.gender"); + else if (Configuration.doAutoCreate()) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); // bb + return this.gender; + } + + public boolean hasGenderElement() { + return this.gender != null && !this.gender.isEmpty(); + } + + public boolean hasGender() { + return this.gender != null && !this.gender.isEmpty(); + } + + /** + * @param value {@link #gender} (Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.). This is the underlying object with id, value and extensions. The accessor "getGender" gives direct access to the value + */ + public FamilyMemberHistory setGenderElement(Enumeration value) { + this.gender = value; + return this; + } + + /** + * @return Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + public AdministrativeGender getGender() { + return this.gender == null ? null : this.gender.getValue(); + } + + /** + * @param value Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes. + */ + public FamilyMemberHistory setGender(AdministrativeGender value) { + if (value == null) + this.gender = null; + else { + if (this.gender == null) + this.gender = new Enumeration(new AdministrativeGenderEnumFactory()); + this.gender.setValue(value); + } + return this; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public Type getBorn() { + return this.born; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public Period getBornPeriod() throws Exception { + if (!(this.born instanceof Period)) + throw new Exception("Type mismatch: the type Period was expected, but "+this.born.getClass().getName()+" was encountered"); + return (Period) this.born; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public DateType getBornDateType() throws Exception { + if (!(this.born instanceof DateType)) + throw new Exception("Type mismatch: the type DateType was expected, but "+this.born.getClass().getName()+" was encountered"); + return (DateType) this.born; + } + + /** + * @return {@link #born} (The actual or approximate date of birth of the relative.) + */ + public StringType getBornStringType() throws Exception { + if (!(this.born instanceof StringType)) + throw new Exception("Type mismatch: the type StringType was expected, but "+this.born.getClass().getName()+" was encountered"); + return (StringType) this.born; + } + + public boolean hasBorn() { + return this.born != null && !this.born.isEmpty(); + } + + /** + * @param value {@link #born} (The actual or approximate date of birth of the relative.) + */ + public FamilyMemberHistory setBorn(Type value) { + this.born = value; + return this; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Type getAge() { + return this.age; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Age getAgeAge() throws Exception { + if (!(this.age instanceof Age)) + throw new Exception("Type mismatch: the type Age was expected, but "+this.age.getClass().getName()+" was encountered"); + return (Age) this.age; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Range getAgeRange() throws Exception { + if (!(this.age instanceof Range)) + throw new Exception("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered"); + return (Range) this.age; + } + + /** + * @return {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public StringType getAgeStringType() throws Exception { + if (!(this.age instanceof StringType)) + throw new Exception("Type mismatch: the type StringType was expected, but "+this.age.getClass().getName()+" was encountered"); + return (StringType) this.age; + } + + public boolean hasAge() { + return this.age != null && !this.age.isEmpty(); + } + + /** + * @param value {@link #age} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public FamilyMemberHistory setAge(Type value) { + this.age = value; + return this; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Type getDeceased() { + return this.deceased; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public BooleanType getDeceasedBooleanType() throws Exception { + if (!(this.deceased instanceof BooleanType)) + throw new Exception("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (BooleanType) this.deceased; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Age getDeceasedAge() throws Exception { + if (!(this.deceased instanceof Age)) + throw new Exception("Type mismatch: the type Age was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (Age) this.deceased; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public Range getDeceasedRange() throws Exception { + if (!(this.deceased instanceof Range)) + throw new Exception("Type mismatch: the type Range was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (Range) this.deceased; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public DateType getDeceasedDateType() throws Exception { + if (!(this.deceased instanceof DateType)) + throw new Exception("Type mismatch: the type DateType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (DateType) this.deceased; + } + + /** + * @return {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public StringType getDeceasedStringType() throws Exception { + if (!(this.deceased instanceof StringType)) + throw new Exception("Type mismatch: the type StringType was expected, but "+this.deceased.getClass().getName()+" was encountered"); + return (StringType) this.deceased; + } + + public boolean hasDeceased() { + return this.deceased != null && !this.deceased.isEmpty(); + } + + /** + * @param value {@link #deceased} (The actual or approximate age of the relative at the time the family member history is recorded.) + */ + public FamilyMemberHistory setDeceased(Type value) { + this.deceased = value; + return this; + } + + /** + * @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public StringType getNoteElement() { + if (this.note == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create FamilyMemberHistory.note"); + else if (Configuration.doAutoCreate()) + this.note = new StringType(); // bb + return this.note; + } + + public boolean hasNoteElement() { + return this.note != null && !this.note.isEmpty(); + } + + public boolean hasNote() { + return this.note != null && !this.note.isEmpty(); + } + + /** + * @param value {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value + */ + public FamilyMemberHistory setNoteElement(StringType value) { + this.note = value; + return this; + } + + /** + * @return This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. + */ + public String getNote() { + return this.note == null ? null : this.note.getValue(); + } + + /** + * @param value This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible. + */ + public FamilyMemberHistory setNote(String value) { + if (Utilities.noString(value)) + this.note = null; + else { + if (this.note == null) + this.note = new StringType(); + this.note.setValue(value); + } + return this; + } + + /** + * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) + */ + public List getCondition() { + if (this.condition == null) + this.condition = new ArrayList(); + return this.condition; + } + + public boolean hasCondition() { + if (this.condition == null) + return false; + for (FamilyMemberHistoryConditionComponent item : this.condition) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.) + */ + // syntactic sugar + public FamilyMemberHistoryConditionComponent addCondition() { //3 + FamilyMemberHistoryConditionComponent t = new FamilyMemberHistoryConditionComponent(); + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return t; + } + + // syntactic sugar + public FamilyMemberHistory addCondition(FamilyMemberHistoryConditionComponent t) { //3 + if (t == null) + return this; + if (this.condition == null) + this.condition = new ArrayList(); + this.condition.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this family member history record that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("date", "dateTime", "The date (and possibly time) when the family member history was taken.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("name", "string", "This will either be a name or a description. E.g. 'Aunt Susan', 'my cousin with the red hair'.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the relative is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); + childrenList.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, java.lang.Integer.MAX_VALUE, born)); + childrenList.add(new Property("age[x]", "Age|Range|string", "The actual or approximate age of the relative at the time the family member history is recorded.", 0, java.lang.Integer.MAX_VALUE, age)); + childrenList.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "The actual or approximate age of the relative at the time the family member history is recorded.", 0, java.lang.Integer.MAX_VALUE, deceased)); + childrenList.add(new Property("note", "string", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition)); + } + + public FamilyMemberHistory copy() { + FamilyMemberHistory dst = new FamilyMemberHistory(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.patient = patient == null ? null : patient.copy(); + dst.date = date == null ? null : date.copy(); + dst.name = name == null ? null : name.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.gender = gender == null ? null : gender.copy(); + dst.born = born == null ? null : born.copy(); + dst.age = age == null ? null : age.copy(); + dst.deceased = deceased == null ? null : deceased.copy(); + dst.note = note == null ? null : note.copy(); + if (condition != null) { + dst.condition = new ArrayList(); + for (FamilyMemberHistoryConditionComponent i : condition) + dst.condition.add(i.copy()); + }; + return dst; + } + + protected FamilyMemberHistory typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof FamilyMemberHistory)) + return false; + FamilyMemberHistory o = (FamilyMemberHistory) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(date, o.date, true) + && compareDeep(name, o.name, true) && compareDeep(relationship, o.relationship, true) && compareDeep(gender, o.gender, true) + && compareDeep(born, o.born, true) && compareDeep(age, o.age, true) && compareDeep(deceased, o.deceased, true) + && compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof FamilyMemberHistory)) + return false; + FamilyMemberHistory o = (FamilyMemberHistory) other; + return compareValues(date, o.date, true) && compareValues(name, o.name, true) && compareValues(gender, o.gender, true) + && compareValues(note, o.note, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) + && (date == null || date.isEmpty()) && (name == null || name.isEmpty()) && (relationship == null || relationship.isEmpty()) + && (gender == null || gender.isEmpty()) && (born == null || born.isEmpty()) && (age == null || age.isEmpty()) + && (deceased == null || deceased.isEmpty()) && (note == null || note.isEmpty()) && (condition == null || condition.isEmpty()) + ; + } + + @Override + public ResourceType getResourceType() { + return ResourceType.FamilyMemberHistory; + } + + @SearchParamDefinition(name="date", path="FamilyMemberHistory.date", description="When history was captured/updated", type="date" ) + public static final String SP_DATE = "date"; + @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference" ) + public static final String SP_PATIENT = "patient"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IBase.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IBase.java deleted file mode 100644 index e59ef9f464d..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IBase.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.hl7.fhir.instance.model; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -/** - * This interface is a simple marker for anything which is an HL7 - * structure of some kind. It is provided mostly to simplify convergence - * between the HL7.org structures and the HAPI ones. - */ -public interface IBase { - - boolean isEmpty(); - -} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ICompositeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ICompositeType.java deleted file mode 100644 index 8f8b0c22a64..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ICompositeType.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.hl7.fhir.instance.model; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -public interface ICompositeType extends IBase { - -} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IPrimitiveType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IPrimitiveType.java deleted file mode 100644 index 689db961190..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IPrimitiveType.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.hl7.fhir.instance.model; - -import org.hl7.fhir.instance.model.api.IBaseDatatype; - -/* - * #%L - * HAPI FHIR - Core Library - * %% - * Copyright (C) 2014 - 2015 University Health Network - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - - -public interface IPrimitiveType extends IBase, IBaseDatatype { - - void setValueAsString(String theValue) throws IllegalArgumentException; - - String getValueAsString(); - - T getValue(); - - IPrimitiveType setValue(T theValue) throws IllegalArgumentException; - -} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IdType.java.orig b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IdType.java.orig deleted file mode 100644 index 72fc08a2863..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IdType.java.orig +++ /dev/null @@ -1,588 +0,0 @@ -/* -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. - -*/ -package org.hl7.fhir.instance.model; - -import static org.apache.commons.lang3.StringUtils.*; - -import java.math.BigDecimal; - -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Validate; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.hl7.fhir.instance.model.annotations.DatatypeDef; -import org.hl7.fhir.instance.model.api.IIdType; - -import ca.uhn.fhir.model.api.annotation.SimpleSetter; -import ca.uhn.fhir.model.primitive.UriDt; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.server.Constants; -import ca.uhn.fhir.util.UrlUtil; - -/** - * Primitive type "id" in FHIR: a string from 1 to 64 characters, only containing letters, digits, "-" and "." - */ -@DatatypeDef(name = "id") -public class IdType extends UriType implements IIdType { - - private static final long serialVersionUID = 1L; - - private String myBaseUrl; - private boolean myHaveComponentParts; - private String myResourceType; - private String myUnqualifiedId; - private String myUnqualifiedVersionId; - private volatile String myValue; - - /** - * Create a new empty ID - */ - public IdType() { - super(); - } - - /** - * Create a new ID, using a BigDecimal input. Uses {@link BigDecimal#toPlainString()} to generate the string representation. - */ - public IdType(BigDecimal thePid) { - if (thePid != null) { - setValue(toPlainStringWithNpeThrowIfNeeded(thePid)); - } else { - setValue(null); - } - } - - /** - * Create a new ID using a long - */ - public IdType(long theId) { - setValue(Long.toString(theId)); - } - - /** - * Create a new ID using a string. This String may contain a simple ID (e.g. "1234") or it may contain a complete URL (http://example.com/fhir/Patient/1234). - * - *

- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length - * limit of 36 characters. - *

- *

- * regex: [a-z0-9\-\.]{1,36} - *

- */ - @SimpleSetter - public IdType(@SimpleSetter.Parameter(name = "theId") String theValue) { - setValue(theValue); - } - - /** - * Constructor - * - * @param theResourceType - * The resource type (e.g. "Patient") - * @param theIdPart - * The ID (e.g. "123") - */ - public IdType(String theResourceType, BigDecimal theIdPart) { - this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); - } - - /** - * Constructor - * - * @param theResourceType - * The resource type (e.g. "Patient") - * @param theIdPart - * The ID (e.g. "123") - */ - public IdType(String theResourceType, Long theIdPart) { - this(theResourceType, toPlainStringWithNpeThrowIfNeeded(theIdPart)); - } - - /** - * Constructor - * - * @param theResourceType - * The resource type (e.g. "Patient") - * @param theId - * The ID (e.g. "123") - */ - public IdType(String theResourceType, String theId) { - this(theResourceType, theId, null); - } - - /** - * Constructor - * - * @param theResourceType - * The resource type (e.g. "Patient") - * @param theId - * The ID (e.g. "123") - * @param theVersionId - * The version ID ("e.g. "456") - */ - public IdType(String theResourceType, String theId, String theVersionId) { - this(null,theResourceType,theId,theVersionId); - } - - /** - * Constructor - * - * @param theBaseUrl - * The server base URL (e.g. "http://example.com/fhir") - * @param theResourceType - * The resource type (e.g. "Patient") - * @param theId - * The ID (e.g. "123") - * @param theVersionId - * The version ID ("e.g. "456") - */ - public IdType(String theBaseUrl, String theResourceType, String theId, String theVersionId) { - myBaseUrl = theBaseUrl; - myResourceType = theResourceType; - myUnqualifiedId = theId; - myUnqualifiedVersionId = StringUtils.defaultIfBlank(theVersionId, null); - myHaveComponentParts = true; - } - - /** - * Creates an ID based on a given URL - */ - public IdType(UriDt theUrl) { - setValue(theUrl.getValueAsString()); - } - - /** - * @deprecated Use {@link #getIdPartAsBigDecimal()} instead (this method was deprocated because its name is ambiguous) - */ - @Deprecated - public BigDecimal asBigDecimal() { - return getIdPartAsBigDecimal(); - } - - /** - * Returns true if this IdDt matches the given IdDt in terms of resource type and ID, but ignores the URL base - */ - @SuppressWarnings("deprecation") - public boolean equalsIgnoreBase(IdType theId) { - if (theId == null) { - return false; - } - if (theId.isEmpty()) { - return isEmpty(); - } - return ObjectUtils.equals(getResourceType(), theId.getResourceType()) && ObjectUtils.equals(getIdPart(), theId.getIdPart()) && ObjectUtils.equals(getVersionIdPart(), theId.getVersionIdPart()); - } - - - - @Override - public boolean equals(Object theArg0) { - if (!(theArg0 instanceof IdType)) { - return false; - } - IdType id = (IdType)theArg0; - return StringUtils.equals(getValueAsString(), id.getValueAsString()); - } - - @Override - public int hashCode() { - HashCodeBuilder b = new HashCodeBuilder(); - b.append(getValueAsString()); - return b.toHashCode(); - } - - /** - * Returns the portion of this resource ID which corresponds to the server base URL. For example given the resource ID http://example.com/fhir/Patient/123 the base URL would be - * http://example.com/fhir. - *

- * This method may return null if the ID contains no base (e.g. "Patient/123") - *

- */ - public String getBaseUrl() { - return myBaseUrl; - } - - public String getIdPart() { - return myUnqualifiedId; - } - - /** - * Returns the unqualified portion of this ID as a big decimal, or null if the value is null - * - * @throws NumberFormatException - * If the value is not a valid BigDecimal - */ - public BigDecimal getIdPartAsBigDecimal() { - String val = getIdPart(); - if (isBlank(val)) { - return null; - } - return new BigDecimal(val); - } - - /** - * Returns the unqualified portion of this ID as a {@link Long}, or null if the value is null - * - * @throws NumberFormatException - * If the value is not a valid Long - */ - public Long getIdPartAsLong() { - String val = getIdPart(); - if (isBlank(val)) { - return null; - } - return Long.parseLong(val); - } - - public String getResourceType() { - return myResourceType; - } - - /** - * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use {@link #getIdPart()} to get just the ID portion. - * - * @see #getIdPart() - */ - @Override - public String getValue() { - if (myValue == null && myHaveComponentParts) { - StringBuilder b = new StringBuilder(); - if (isNotBlank(myBaseUrl)) { - b.append(myBaseUrl); - if (myBaseUrl.charAt(myBaseUrl.length()-1)!='/') { - b.append('/'); - } - } - - if (isNotBlank(myResourceType)) { - b.append(myResourceType); - } - - if (b.length() > 0) { - b.append('/'); - } - - b.append(myUnqualifiedId); - if (isNotBlank(myUnqualifiedVersionId)) { - b.append('/'); - b.append(Constants.PARAM_HISTORY); - b.append('/'); - b.append(myUnqualifiedVersionId); - } - String value = b.toString(); - myValue = value; - } - return myValue; - } - - @Override - public String getValueAsString() { - return getValue(); - } - - public String getVersionIdPart() { - return myUnqualifiedVersionId; - } - - public Long getVersionIdPartAsLong() { - if (!hasVersionIdPart()) { - return null; - } else { - return Long.parseLong(getVersionIdPart()); - } - } - - /** - * Returns true if this ID has a base url - * - * @see #getBaseUrl() - */ - public boolean hasBaseUrl() { - return isNotBlank(myBaseUrl); - } - - public boolean hasIdPart() { - return isNotBlank(getIdPart()); - } - - public boolean hasResourceType() { - return isNotBlank(myResourceType); - } - - public boolean hasVersionIdPart() { - return isNotBlank(getVersionIdPart()); - } - - /** - * Returns true if this ID contains an absolute URL (in other words, a URL starting with "http://" or "https://" - */ - public boolean isAbsolute() { - if (StringUtils.isBlank(getValue())) { - return false; - } - return UrlUtil.isAbsolute(getValue()); - } - - /** - * Returns true if the unqualified ID is a valid {@link Long} value (in other words, it consists only of digits) - */ - public boolean isIdPartValidLong() { - String id = getIdPart(); - if (StringUtils.isBlank(id)) { - return false; - } - for (int i = 0; i < id.length(); i++) { - if (Character.isDigit(id.charAt(i)) == false) { - return false; - } - } - return true; - } - - /** - * Returns true if the ID is a local reference (in other words, it begins with the '#' character) - */ - public boolean isLocal() { - return myUnqualifiedId != null && myUnqualifiedId.isEmpty() == false && myUnqualifiedId.charAt(0) == '#'; - } - - /** - * Copies the value from the given IdDt to this IdDt. It is generally not neccesary to use this method but it is provided for consistency with the rest of the API. - */ - public void setId(IdType theId) { - setValue(theId.getValue()); - } - - /** - * Set the value - * - *

- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length - * limit of 36 characters. - *

- *

- * regex: [a-z0-9\-\.]{1,36} - *

- */ - @Override - public IdType setValue(String theValue) throws DataFormatException { - // TODO: add validation - myValue = theValue; - myHaveComponentParts = false; - if (StringUtils.isBlank(theValue)) { - myBaseUrl = null; - myValue = null; - myUnqualifiedId = null; - myUnqualifiedVersionId = null; - myResourceType = null; - } else if (theValue.charAt(0)== '#') { - myValue = theValue; - myUnqualifiedId = theValue; - myUnqualifiedVersionId=null; - myResourceType = null; - myHaveComponentParts = true; - } else { - int vidIndex = theValue.indexOf("/_history/"); - int idIndex; - if (vidIndex != -1) { - myUnqualifiedVersionId = theValue.substring(vidIndex + "/_history/".length()); - idIndex = theValue.lastIndexOf('/', vidIndex - 1); - myUnqualifiedId = theValue.substring(idIndex + 1, vidIndex); - } else { - idIndex = theValue.lastIndexOf('/'); - myUnqualifiedId = theValue.substring(idIndex + 1); - myUnqualifiedVersionId = null; - } - - myBaseUrl = null; - if (idIndex <= 0) { - myResourceType = null; - } else { - int typeIndex = theValue.lastIndexOf('/', idIndex - 1); - if (typeIndex == -1) { - myResourceType = theValue.substring(0, idIndex); - } else { - myResourceType = theValue.substring(typeIndex + 1, idIndex); - - if (typeIndex > 4) { - myBaseUrl = theValue.substring(0, typeIndex); - } - - } - } - - } - return this; - } - - /** - * Set the value - * - *

- * Description: A whole number in the range 0 to 2^64-1 (optionally represented in hex), a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length - * limit of 36 characters. - *

- *

- * regex: [a-z0-9\-\.]{1,36} - *

- */ - @Override - public void setValueAsString(String theValue) throws DataFormatException { - setValue(theValue); - } - - @Override - public String toString() { - return getValue(); - } - - /** - * Returns a new IdDt containing this IdDt's values but with no server base URL if one - * is present in this IdDt. For example, if this IdDt contains the ID "http://foo/Patient/1", - * this method will return a new IdDt containing ID "Patient/1". - */ - public IdType toUnqualified() { - return new IdType(getResourceType(), getIdPart(), getVersionIdPart()); - } - - public IdType toUnqualifiedVersionless() { - return new IdType(getResourceType(), getIdPart()); - } - - public IdType toVersionless() { - return new IdType(getBaseUrl(), getResourceType(), getIdPart(), null); - } - - public IdType withResourceType(String theResourceName) { - return new IdType(theResourceName, getIdPart(), getVersionIdPart()); - } - - /** - * Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially, - * because IdDt can contain either a complete URL or a partial one (or even jut a simple ID), this method may be used to translate into a complete URL. - * - * @param theServerBase - * The server base (e.g. "http://example.com/fhir") - * @param theResourceType - * The resource name (e.g. "Patient") - * @return A fully qualified URL for this ID (e.g. "http://example.com/fhir/Patient/1") - */ - public IdType withServerBase(String theServerBase, String theResourceType) { - return new IdType(theServerBase, theResourceType, getIdPart(), getVersionIdPart()); - } - - /** - * Creates a new instance of this ID which is identical, but refers to the specific version of this resource ID noted by theVersion. - * - * @param theVersion - * The actual version string, e.g. "1" - * @return A new instance of IdDt which is identical, but refers to the specific version of this resource ID noted by theVersion. - */ - public IdType withVersion(String theVersion) { - Validate.notBlank(theVersion, "Version may not be null or empty"); - - String existingValue = getValue(); - - int i = existingValue.indexOf(Constants.PARAM_HISTORY); - String value; - if (i > 1) { - value = existingValue.substring(0, i - 1); - } else { - value = existingValue; - } - - return new IdType(value + '/' + Constants.PARAM_HISTORY + '/' + theVersion); - } - - private static String toPlainStringWithNpeThrowIfNeeded(BigDecimal theIdPart) { - if (theIdPart == null) { - throw new NullPointerException("BigDecimal ID can not be null"); - } - return theIdPart.toPlainString(); - } - - private static String toPlainStringWithNpeThrowIfNeeded(Long theIdPart) { - if (theIdPart == null) { - throw new NullPointerException("Long ID can not be null"); - } - return theIdPart.toString(); - } - - @Override - public boolean isEmpty() { - return isBlank(getValue()); - } - -<<<<<<< HEAD - public void applyTo(IBaseResource theResouce) { - if (theResouce == null) { - throw new NullPointerException("theResource can not be null"); - } else if (theResouce instanceof IResource) { - ((IResource) theResouce).setId(new IdType(getValue())); - } else if (theResouce instanceof IAnyResource) { - ((IAnyResource) theResouce).setId(getIdPart()); - } else { - throw new IllegalArgumentException("Unknown resource class type, does not implement IResource or extend Resource"); - } - } - - /** - * Retrieves the ID from the given resource instance - */ - public static IdType of(IBaseResource theResouce) { - if (theResouce == null) { - throw new NullPointerException("theResource can not be null"); - } else if (theResouce instanceof IResource) { - return ((IBaseResource) theResouce).getIdElement(); - } else if (theResouce instanceof IAnyResource) { - // TODO: implement - throw new UnsupportedOperationException(); - } else { - throw new IllegalArgumentException("Unknown resource class type, does not implement IResource or extend Resource"); - } - } - - @Override - public IdType copy() { - return new IdType(getValue()); - } - -} -======= - @Override - public IdType copy() { - return new IdType(getValue()); - } - - - - -} ->>>>>>> 2edc7eadab64d171ddc1b7c971ff36b9eb55ce67 diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java deleted file mode 100644 index 0c37d7e3c43..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/InstitutionalClaim.java +++ /dev/null @@ -1,3952 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import java.math.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. - */ -@ResourceDef(name="InstitutionalClaim", profile="http://hl7.org/fhir/Profile/InstitutionalClaim") -public class InstitutionalClaim extends DomainResource { - - public enum UseLink { - /** - * The treatment is complete and this represents a Claim for the services. - */ - COMPLETE, - /** - * The treatment is proposed and this represents a Pre-authorization for the services. - */ - PROPOSED, - /** - * The treatment is proposed and this represents a Pre-determination for the services. - */ - EXPLORATORY, - /** - * A locally defined or otherwise resolved status. - */ - OTHER, - /** - * added to help the parsers - */ - NULL; - public static UseLink fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return COMPLETE; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("exploratory".equals(codeString)) - return EXPLORATORY; - if ("other".equals(codeString)) - return OTHER; - throw new Exception("Unknown UseLink code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case COMPLETE: return ""; - case PROPOSED: return ""; - case EXPLORATORY: return ""; - case OTHER: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; - case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; - case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; - case OTHER: return "A locally defined or otherwise resolved status."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - } - - public static class UseLinkEnumFactory implements EnumFactory { - public UseLink fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return UseLink.COMPLETE; - if ("proposed".equals(codeString)) - return UseLink.PROPOSED; - if ("exploratory".equals(codeString)) - return UseLink.EXPLORATORY; - if ("other".equals(codeString)) - return UseLink.OTHER; - throw new IllegalArgumentException("Unknown UseLink code '"+codeString+"'"); - } - public String toCode(UseLink code) { - if (code == UseLink.COMPLETE) - return "complete"; - if (code == UseLink.PROPOSED) - return "proposed"; - if (code == UseLink.EXPLORATORY) - return "exploratory"; - if (code == UseLink.OTHER) - return "other"; - return "?"; - } - } - - @Block() - public static class PayeeComponent extends BackboneElement { - /** - * Party to be reimbursed: Subscriber, provider, other. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) - protected Coding type; - - /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; - - public PayeeComponent() { - super(); - } - - /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public PayeeComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); - } - - public PayeeComponent copy() { - PayeeComponent dst = new PayeeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; - } - - } - - @Block() - public static class DiagnosisComponent extends BackboneElement { - /** - * Sequence of diagnosis. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis." ) - protected IntegerType sequence; - - /** - * The diagnosis. - */ - @Child(name="diagnosis", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) - protected Coding diagnosis; - - private static final long serialVersionUID = -935927954L; - - public DiagnosisComponent() { - super(); - } - - public DiagnosisComponent(IntegerType sequence, Coding diagnosis) { - super(); - this.sequence = sequence; - this.diagnosis = diagnosis; - } - - /** - * @return {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb - return this.sequence; - } - - public boolean hasSequenceElement() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - public boolean hasSequence() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - /** - * @param value {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DiagnosisComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return Sequence of diagnosis. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value Sequence of diagnosis. - */ - public DiagnosisComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #diagnosis} (The diagnosis.) - */ - public Coding getDiagnosis() { - if (this.diagnosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); - else if (Configuration.doAutoCreate()) - this.diagnosis = new Coding(); // cc - return this.diagnosis; - } - - public boolean hasDiagnosis() { - return this.diagnosis != null && !this.diagnosis.isEmpty(); - } - - /** - * @param value {@link #diagnosis} (The diagnosis.) - */ - public DiagnosisComponent setDiagnosis(Coding value) { - this.diagnosis = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "Sequence of diagnosis.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - } - - public DiagnosisComponent copy() { - DiagnosisComponent dst = new DiagnosisComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareValues(sequence, o.sequence, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; - } - - } - - @Block() - public static class CoverageComponent extends BackboneElement { - /** - * A service line item. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) - protected IntegerType sequence; - - /** - * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) - protected BooleanType focal; - - /** - * Reference to the program or plan identification, underwriter or payor. - */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) - @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The contract number of a business agreement which describes the terms and conditions. - */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) - protected StringType businessArrangement; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - - /** - * A list of references from the Insurer to which these services pertain. - */ - @Child(name="preauthref", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) - protected List preauthref; - - /** - * The Coverages adjudication details. - */ - @Child(name="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) - @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) - protected Reference claimResponse; - - /** - * The actual object that is the target of the reference (The Coverages adjudication details.) - */ - protected ClaimResponse claimResponseTarget; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name="originalRuleset", type={Coding.class}, order=8, min=0, max=1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - private static final long serialVersionUID = 450222500L; - - public CoverageComponent() { - super(); - } - - public CoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { - super(); - this.sequence = sequence; - this.focal = focal; - this.coverage = coverage; - this.relationship = relationship; - } - - /** - * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public CoverageComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line item. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line item. - */ - public CoverageComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public BooleanType getFocalElement() { - if (this.focal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.focal"); - else if (Configuration.doAutoCreate()) - this.focal = new BooleanType(); // bb - return this.focal; - } - - public boolean hasFocalElement() { - return this.focal != null && !this.focal.isEmpty(); - } - - public boolean hasFocal() { - return this.focal != null && !this.focal.isEmpty(); - } - - /** - * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public CoverageComponent setFocalElement(BooleanType value) { - this.focal = value; - return this; - } - - /** - * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); - } - - /** - * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public CoverageComponent setFocal(boolean value) { - if (this.focal == null) - this.focal = new BooleanType(); - this.focal.setValue(value); - return this; - } - - /** - * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** - * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public StringType getBusinessArrangementElement() { - if (this.businessArrangement == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); - else if (Configuration.doAutoCreate()) - this.businessArrangement = new StringType(); // bb - return this.businessArrangement; - } - - public boolean hasBusinessArrangementElement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - public boolean hasBusinessArrangement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - /** - * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public CoverageComponent setBusinessArrangementElement(StringType value) { - this.businessArrangement = value; - return this; - } - - /** - * @return The contract number of a business agreement which describes the terms and conditions. - */ - public String getBusinessArrangement() { - return this.businessArrangement == null ? null : this.businessArrangement.getValue(); - } - - /** - * @param value The contract number of a business agreement which describes the terms and conditions. - */ - public CoverageComponent setBusinessArrangement(String value) { - if (Utilities.noString(value)) - this.businessArrangement = null; - else { - if (this.businessArrangement == null) - this.businessArrangement = new StringType(); - this.businessArrangement.setValue(value); - } - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public List getPreauthref() { - if (this.preauthref == null) - this.preauthref = new ArrayList(); - return this.preauthref; - } - - public boolean hasPreauthref() { - if (this.preauthref == null) - return false; - for (StringType item : this.preauthref) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - // syntactic sugar - public StringType addPreauthrefElement() {//2 - StringType t = new StringType(); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return t; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public CoverageComponent addPreauthref(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return this; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public boolean hasPreauthref(String value) { - if (this.preauthref == null) - return false; - for (StringType v : this.preauthref) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #claimResponse} (The Coverages adjudication details.) - */ - public Reference getClaimResponse() { - if (this.claimResponse == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponse = new Reference(); // cc - return this.claimResponse; - } - - public boolean hasClaimResponse() { - return this.claimResponse != null && !this.claimResponse.isEmpty(); - } - - /** - * @param value {@link #claimResponse} (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponse(Reference value) { - this.claimResponse = value; - return this; - } - - /** - * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public ClaimResponse getClaimResponseTarget() { - if (this.claimResponseTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponseTarget = new ClaimResponse(); // aa - return this.claimResponseTarget; - } - - /** - * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponseTarget(ClaimResponse value) { - this.claimResponseTarget = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public CoverageComponent setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("preauthref", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preauthref)); - childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - } - - public CoverageComponent copy() { - CoverageComponent dst = new CoverageComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.focal = focal == null ? null : focal.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - if (preauthref != null) { - dst.preauthref = new ArrayList(); - for (StringType i : preauthref) - dst.preauthref.add(i.copy()); - }; - dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preauthref, o.preauthref, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - && compareValues(preauthref, o.preauthref, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preauthref == null || preauthref.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; - } - - } - - @Block() - public static class ItemsComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name="provider", type={Practitioner.class}, order=3, min=0, max=1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * Diagnosis applicable for this service or product line. - */ - @Child(name="diagnosisLinkId", type={IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) - protected List diagnosisLinkId; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied." ) - protected Coding service; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name="serviceDate", type={DateType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateType serviceDate; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) - @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=12, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Physical service site on the patient (limb, tooth, etc). - */ - @Child(name="bodySite", type={Coding.class}, order=13, min=0, max=1) - @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) - protected Coding bodySite; - - /** - * A region or surface of the site, eg. limb region or tooth surface(s). - */ - @Child(name="subsite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) - protected List subsite; - - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - - /** - * Second tier of goods and services. - */ - @Child(name="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) - protected List detail; - - private static final long serialVersionUID = -1140048455L; - - public ItemsComponent() { - super(); - } - - public ItemsComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public ItemsComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public ItemsComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public ItemsComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public List getDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - return this.diagnosisLinkId; - } - - public boolean hasDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType item : this.diagnosisLinkId) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - // syntactic sugar - public IntegerType addDiagnosisLinkIdElement() {//2 - IntegerType t = new IntegerType(); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return t; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public ItemsComponent addDiagnosisLinkId(int value) { //1 - IntegerType t = new IntegerType(); - t.setValue(value); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return this; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public boolean hasDiagnosisLinkId(int value) { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType v : this.diagnosisLinkId) - if (v.equals(value)) // integer - return true; - return false; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.) - */ - public ItemsComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public DateType getServiceDateElement() { - if (this.serviceDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.serviceDate"); - else if (Configuration.doAutoCreate()) - this.serviceDate = new DateType(); // bb - return this.serviceDate; - } - - public boolean hasServiceDateElement() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - public boolean hasServiceDate() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - /** - * @param value {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public ItemsComponent setServiceDateElement(DateType value) { - this.serviceDate = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getServiceDate() { - return this.serviceDate == null ? null : this.serviceDate.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public ItemsComponent setServiceDate(Date value) { - if (value == null) - this.serviceDate = null; - else { - if (this.serviceDate == null) - this.serviceDate = new DateType(); - this.serviceDate.setValue(value); - } - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public ItemsComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public ItemsComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public ItemsComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public ItemsComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public ItemsComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public ItemsComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public ItemsComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public Coding getBodySite() { - if (this.bodySite == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.bodySite"); - else if (Configuration.doAutoCreate()) - this.bodySite = new Coding(); // cc - return this.bodySite; - } - - public boolean hasBodySite() { - return this.bodySite != null && !this.bodySite.isEmpty(); - } - - /** - * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public ItemsComponent setBodySite(Coding value) { - this.bodySite = value; - return this; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - public List getSubsite() { - if (this.subsite == null) - this.subsite = new ArrayList(); - return this.subsite; - } - - public boolean hasSubsite() { - if (this.subsite == null) - return false; - for (Coding item : this.subsite) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - // syntactic sugar - public Coding addSubsite() { //3 - Coding t = new Coding(); - if (this.subsite == null) - this.subsite = new ArrayList(); - this.subsite.add(t); - return t; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (DetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - // syntactic sugar - public DetailComponent addDetail() { //3 - DetailComponent t = new DetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("diagnosisLinkId", "integer", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); - childrenList.add(new Property("subsite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subsite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); - childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public ItemsComponent copy() { - ItemsComponent dst = new ItemsComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - if (diagnosisLinkId != null) { - dst.diagnosisLinkId = new ArrayList(); - for (IntegerType i : diagnosisLinkId) - dst.diagnosisLinkId.add(i.copy()); - }; - dst.service = service == null ? null : service.copy(); - dst.serviceDate = serviceDate == null ? null : serviceDate.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - dst.bodySite = bodySite == null ? null : bodySite.copy(); - if (subsite != null) { - dst.subsite = new ArrayList(); - for (Coding i : subsite) - dst.subsite.add(i.copy()); - }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; - if (detail != null) { - dst.detail = new ArrayList(); - for (DetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) - && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) - && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subsite, o.subsite, true) - && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) - && compareValues(serviceDate, o.serviceDate, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subsite == null || subsite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()); - } - - } - - @Block() - public static class DetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Third tier of goods and services. - */ - @Child(name="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) - protected List subDetail; - - private static final long serialVersionUID = -342502025L; - - public DetailComponent() { - super(); - } - - public DetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public DetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public DetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.) - */ - public DetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public DetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public DetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public DetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public DetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public DetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public DetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - public List getSubDetail() { - if (this.subDetail == null) - this.subDetail = new ArrayList(); - return this.subDetail; - } - - public boolean hasSubDetail() { - if (this.subDetail == null) - return false; - for (SubDetailComponent item : this.subDetail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - // syntactic sugar - public SubDetailComponent addSubDetail() { //3 - SubDetailComponent t = new SubDetailComponent(); - if (this.subDetail == null) - this.subDetail = new ArrayList(); - this.subDetail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Institutional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); - } - - public DetailComponent copy() { - DetailComponent dst = new DetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - if (subDetail != null) { - dst.subDetail = new ArrayList(); - for (SubDetailComponent i : subDetail) - dst.subDetail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(subDetail, o.subDetail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); - } - - } - - @Block() - public static class SubDetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an additional service or product or charge." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an additional service or product or charge." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - private static final long serialVersionUID = 122809194L; - - public SubDetailComponent() { - super(); - } - - public SubDetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public SubDetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public SubDetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public SubDetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (The fee for an additional service or product or charge.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public SubDetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public SubDetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public SubDetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public SubDetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public SubDetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public SubDetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - } - - public SubDetailComponent copy() { - SubDetailComponent dst = new SubDetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()); - } - - } - - /** - * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected List identifier; - - /** - * The version of the specification on which this instance relies. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) - protected Coding ruleset; - - /** - * The version of the specification from which the original instance was created. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) - protected Coding originalRuleset; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateTimeType created; - - /** - * Insurer Identifier, typical BIN number (6 digit). - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) - */ - protected Organization targetTarget; - - /** - * The provider which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Organization organizationTarget; - - /** - * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) - protected Enumeration use; - - /** - * Immediate (STAT), best effort (NORMAL), deferred (DEFER). - */ - @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) - protected Coding priority; - - /** - * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. - */ - @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) - protected Coding fundsReserve; - - /** - * Person who created the invoice/claim/pre-determination or pre-authorization. - */ - @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; - - /** - * Facility where the services were provided. - */ - @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; - - /** - * The party to be reimbursed for the services. - */ - @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) - @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) - protected PayeeComponent payee; - - /** - * The referral resource which lists the date, practitioner, reason and other supporting information. - */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) - @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; - - /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - protected ReferralRequest referralTarget; - - /** - * Ordered list of patient diagnosis for which care is sought. - */ - @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) - protected List diagnosis; - - /** - * List of patient conditions for which care is sought. - */ - @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) - protected List condition; - - /** - * Patient Resource. - */ - @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) - @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; - - /** - * Financial instrument by which payment information for health care. - */ - @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected List coverage; - - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - - /** - * Date of an accident which these services are addressing. - */ - @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) - protected DateType accident; - - /** - * Type of accident: work, auto, etc. - */ - @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) - protected Coding accidentType; - - /** - * A list of intervention and exception codes which may influence the adjudication of the claim. - */ - @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) - protected List interventionException; - - /** - * First tier of goods and services. - */ - @Child(name = "item", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) - protected List item; - - /** - * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. - */ - @Child(name = "additionalMaterials", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) - protected List additionalMaterials; - - private static final long serialVersionUID = 1113876752L; - - public InstitutionalClaim() { - super(); - } - - public InstitutionalClaim(Reference patient) { - super(); - this.patient = patient; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public InstitutionalClaim setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public InstitutionalClaim setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). 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 InstitutionalClaim.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 when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public InstitutionalClaim setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public InstitutionalClaim 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 #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public InstitutionalClaim setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public InstitutionalClaim setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public InstitutionalClaim setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public InstitutionalClaim setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public InstitutionalClaim setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public InstitutionalClaim setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public Enumeration getUseElement() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.use"); - else if (Configuration.doAutoCreate()) - this.use = new Enumeration(new UseLinkEnumFactory()); // bb - return this.use; - } - - public boolean hasUseElement() { - return this.use != null && !this.use.isEmpty(); - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public InstitutionalClaim setUseElement(Enumeration value) { - this.use = value; - return this; - } - - /** - * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public UseLink getUse() { - return this.use == null ? null : this.use.getValue(); - } - - /** - * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public InstitutionalClaim setUse(UseLink value) { - if (value == null) - this.use = null; - else { - if (this.use == null) - this.use = new Enumeration(new UseLinkEnumFactory()); - this.use.setValue(value); - } - return this; - } - - /** - * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public Coding getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new Coding(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public InstitutionalClaim setPriority(Coding value) { - this.priority = value; - return this; - } - - /** - * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public Coding getFundsReserve() { - if (this.fundsReserve == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.fundsReserve"); - else if (Configuration.doAutoCreate()) - this.fundsReserve = new Coding(); // cc - return this.fundsReserve; - } - - public boolean hasFundsReserve() { - return this.fundsReserve != null && !this.fundsReserve.isEmpty(); - } - - /** - * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public InstitutionalClaim setFundsReserve(Coding value) { - this.fundsReserve = value; - return this; - } - - /** - * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc - return this.enterer; - } - - public boolean hasEnterer() { - return this.enterer != null && !this.enterer.isEmpty(); - } - - /** - * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public InstitutionalClaim setEnterer(Reference value) { - this.enterer = value; - return this; - } - - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public InstitutionalClaim setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - - /** - * @return {@link #facility} (Facility where the services were provided.) - */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc - return this.facility; - } - - public boolean hasFacility() { - return this.facility != null && !this.facility.isEmpty(); - } - - /** - * @param value {@link #facility} (Facility where the services were provided.) - */ - public InstitutionalClaim setFacility(Reference value) { - this.facility = value; - return this; - } - - /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; - } - - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public InstitutionalClaim setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #payee} (The party to be reimbursed for the services.) - */ - public PayeeComponent getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new PayeeComponent(); // cc - return this.payee; - } - - public boolean hasPayee() { - return this.payee != null && !this.payee.isEmpty(); - } - - /** - * @param value {@link #payee} (The party to be reimbursed for the services.) - */ - public InstitutionalClaim setPayee(PayeeComponent value) { - this.payee = value; - return this; - } - - /** - * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc - return this.referral; - } - - public boolean hasReferral() { - return this.referral != null && !this.referral.isEmpty(); - } - - /** - * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public InstitutionalClaim setReferral(Reference value) { - this.referral = value; - return this; - } - - /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; - } - - /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public InstitutionalClaim setReferralTarget(ReferralRequest value) { - this.referralTarget = value; - return this; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (DiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - // syntactic sugar - public DiagnosisComponent addDiagnosis() { //3 - DiagnosisComponent t = new DiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (Coding item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - // syntactic sugar - public Coding addCondition() { //3 - Coding t = new Coding(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - /** - * @return {@link #patient} (Patient Resource.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Patient Resource.) - */ - public InstitutionalClaim setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public InstitutionalClaim setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public List getCoverage() { - if (this.coverage == null) - this.coverage = new ArrayList(); - return this.coverage; - } - - public boolean hasCoverage() { - if (this.coverage == null) - return false; - for (CoverageComponent item : this.coverage) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - // syntactic sugar - public CoverageComponent addCoverage() { //3 - CoverageComponent t = new CoverageComponent(); - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return t; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public InstitutionalClaim setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public InstitutionalClaim setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - - /** - * @return {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public DateType getAccidentElement() { - if (this.accident == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.accident"); - else if (Configuration.doAutoCreate()) - this.accident = new DateType(); // bb - return this.accident; - } - - public boolean hasAccidentElement() { - return this.accident != null && !this.accident.isEmpty(); - } - - public boolean hasAccident() { - return this.accident != null && !this.accident.isEmpty(); - } - - /** - * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public InstitutionalClaim setAccidentElement(DateType value) { - this.accident = value; - return this; - } - - /** - * @return Date of an accident which these services are addressing. - */ - public Date getAccident() { - return this.accident == null ? null : this.accident.getValue(); - } - - /** - * @param value Date of an accident which these services are addressing. - */ - public InstitutionalClaim setAccident(Date value) { - if (value == null) - this.accident = null; - else { - if (this.accident == null) - this.accident = new DateType(); - this.accident.setValue(value); - } - return this; - } - - /** - * @return {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public Coding getAccidentType() { - if (this.accidentType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create InstitutionalClaim.accidentType"); - else if (Configuration.doAutoCreate()) - this.accidentType = new Coding(); // cc - return this.accidentType; - } - - public boolean hasAccidentType() { - return this.accidentType != null && !this.accidentType.isEmpty(); - } - - /** - * @param value {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public InstitutionalClaim setAccidentType(Coding value) { - this.accidentType = value; - return this; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - public List getInterventionException() { - if (this.interventionException == null) - this.interventionException = new ArrayList(); - return this.interventionException; - } - - public boolean hasInterventionException() { - if (this.interventionException == null) - return false; - for (Coding item : this.interventionException) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - // syntactic sugar - public Coding addInterventionException() { //3 - Coding t = new Coding(); - if (this.interventionException == null) - this.interventionException = new ArrayList(); - this.interventionException.add(t); - return t; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (ItemsComponent item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - // syntactic sugar - public ItemsComponent addItem() { //3 - ItemsComponent t = new ItemsComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - public List getAdditionalMaterials() { - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - return this.additionalMaterials; - } - - public boolean hasAdditionalMaterials() { - if (this.additionalMaterials == null) - return false; - for (Coding item : this.additionalMaterials) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - // syntactic sugar - public Coding addAdditionalMaterials() { //3 - Coding t = new Coding(); - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); - childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); - childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - childrenList.add(new Property("condition", "Coding", "List of patient conditions for which care is sought.", 0, java.lang.Integer.MAX_VALUE, condition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); - childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); - childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); - } - - public InstitutionalClaim copy() { - InstitutionalClaim dst = new InstitutionalClaim(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.use = use == null ? null : use.copy(); - dst.priority = priority == null ? null : priority.copy(); - dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); - dst.enterer = enterer == null ? null : enterer.copy(); - dst.facility = facility == null ? null : facility.copy(); - dst.payee = payee == null ? null : payee.copy(); - dst.referral = referral == null ? null : referral.copy(); - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (DiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (condition != null) { - dst.condition = new ArrayList(); - for (Coding i : condition) - dst.condition.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - if (coverage != null) { - dst.coverage = new ArrayList(); - for (CoverageComponent i : coverage) - dst.coverage.add(i.copy()); - }; - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); - dst.accident = accident == null ? null : accident.copy(); - dst.accidentType = accidentType == null ? null : accidentType.copy(); - if (interventionException != null) { - dst.interventionException = new ArrayList(); - for (Coding i : interventionException) - dst.interventionException.add(i.copy()); - }; - if (item != null) { - dst.item = new ArrayList(); - for (ItemsComponent i : item) - dst.item.add(i.copy()); - }; - if (additionalMaterials != null) { - dst.additionalMaterials = new ArrayList(); - for (Coding i : additionalMaterials) - dst.additionalMaterials.add(i.copy()); - }; - return dst; - } - - protected InstitutionalClaim typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof InstitutionalClaim)) - return false; - InstitutionalClaim o = (InstitutionalClaim) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) - && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) - && compareDeep(accidentType, o.accidentType, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(item, o.item, true) && compareDeep(additionalMaterials, o.additionalMaterials, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof InstitutionalClaim)) - return false; - InstitutionalClaim o = (InstitutionalClaim) other; - return compareValues(created, o.created, true) && compareValues(use, o.use, true) && compareValues(school, o.school, true) - && compareValues(accident, o.accident, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (payee == null || payee.isEmpty()) - && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) - && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) - && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.InstitutionalClaim; - } - - @SearchParamDefinition(name = "identifier", path = "InstitutionalClaim.identifier", description = "The primary identifier of the financial resource", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "use", path = "InstitutionalClaim.use", description = "The kind of financial resource", type = "token") - public static final String SP_USE = "use"; - @SearchParamDefinition(name="patient", path="InstitutionalClaim.patient", description="Patient", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="priority", path="InstitutionalClaim.priority", description="Processing priority requested", type="token" ) - public static final String SP_PRIORITY = "priority"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java index b63e2df21de..2546d02580e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/OperationDefinition.java @@ -29,11 +29,12 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.Enumerations.*; import org.hl7.fhir.instance.model.annotations.ResourceDef; import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; @@ -45,92 +46,6 @@ import org.hl7.fhir.instance.model.annotations.Description; @ResourceDef(name="OperationDefinition", profile="http://hl7.org/fhir/Profile/OperationDefinition") public class OperationDefinition extends DomainResource { - public enum ResourceProfileStatus { - /** - * This profile is still under development. - */ - DRAFT, - /** - * This profile is ready for normal use. - */ - ACTIVE, - /** - * This profile has been deprecated, withdrawn or superseded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static ResourceProfileStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This profile is still under development."; - case ACTIVE: return "This profile is ready for normal use."; - case RETIRED: return "This profile has been deprecated, withdrawn or superseded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - } - - public static class ResourceProfileStatusEnumFactory implements EnumFactory { - public ResourceProfileStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return ResourceProfileStatus.DRAFT; - if ("active".equals(codeString)) - return ResourceProfileStatus.ACTIVE; - if ("retired".equals(codeString)) - return ResourceProfileStatus.RETIRED; - throw new IllegalArgumentException("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode(ResourceProfileStatus code) { - if (code == ResourceProfileStatus.DRAFT) - return "draft"; - if (code == ResourceProfileStatus.ACTIVE) - return "active"; - if (code == ResourceProfileStatus.RETIRED) - return "retired"; - return "?"; - } - } - public enum OperationKind { /** * This operation is invoked as an operation. @@ -176,8 +91,8 @@ public class OperationDefinition extends DomainResource { } public String getDisplay() { switch (this) { - case OPERATION: return "operation"; - case QUERY: return "query"; + case OPERATION: return "Operation"; + case QUERY: return "Query"; default: return "?"; } } @@ -248,8 +163,8 @@ public class OperationDefinition extends DomainResource { } public String getDisplay() { switch (this) { - case IN: return "in"; - case OUT: return "out"; + case IN: return "In"; + case OUT: return "Out"; default: return "?"; } } @@ -275,70 +190,226 @@ public class OperationDefinition extends DomainResource { } } + @Block() + public static class OperationDefinitionContactComponent extends BackboneElement { + /** + * The name of an individual to contact regarding the operation definition. + */ + @Child(name ="name", type={StringType.class}, order=1, min=0, max=1) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the operation definition." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name ="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + public OperationDefinitionContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinitionContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public OperationDefinitionContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the operation definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the operation definition. + */ + public OperationDefinitionContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public OperationDefinitionContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the operation definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + public OperationDefinitionContactComponent copy() { + OperationDefinitionContactComponent dst = new OperationDefinitionContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OperationDefinitionContactComponent)) + return false; + OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OperationDefinitionContactComponent)) + return false; + OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + } + @Block() public static class OperationDefinitionParameterComponent extends BackboneElement { /** * The name of used to identify the parameter. */ - @Child(name="name", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="name", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="Name of the parameter", formalDefinition="The name of used to identify the parameter." ) protected CodeType name; /** * Whether this is an input or an output parameter. */ - @Child(name="use", type={CodeType.class}, order=2, min=1, max=1) + @Child(name ="use", type={CodeType.class}, order=2, min=1, max=1) @Description(shortDefinition="in | out", formalDefinition="Whether this is an input or an output parameter." ) protected Enumeration use; /** * The minimum number of times this parameter SHALL appear in the request or response. */ - @Child(name="min", type={IntegerType.class}, order=3, min=1, max=1) + @Child(name ="min", type={IntegerType.class}, order=3, min=1, max=1) @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." ) protected IntegerType min; /** * The maximum number of times this element is permitted to appear in the request or response. */ - @Child(name="max", type={StringType.class}, order=4, min=1, max=1) + @Child(name ="max", type={StringType.class}, order=4, min=1, max=1) @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." ) protected StringType max; /** * Describes the meaning or use of this parameter. */ - @Child(name="documentation", type={StringType.class}, order=5, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." ) protected StringType documentation; /** * The type for this parameter. */ - @Child(name="type", type={CodeType.class}, order=6, min=0, max=1) + @Child(name ="type", type={CodeType.class}, order=6, min=0, max=1) @Description(shortDefinition="What type this parameter hs", formalDefinition="The type for this parameter." ) protected CodeType type; /** * A profile the specifies the rules that this parameter must conform to. */ - @Child(name="profile", type={Profile.class}, order=7, min=0, max=1) + @Child(name ="profile", type={StructureDefinition.class}, order=7, min=0, max=1) @Description(shortDefinition="Profile on the type", formalDefinition="A profile the specifies the rules that this parameter must conform to." ) protected Reference profile; /** * The actual object that is the target of the reference (A profile the specifies the rules that this parameter must conform to.) */ - protected Profile profileTarget; + protected StructureDefinition profileTarget; /** * The parts of a Tuple Parameter. */ - @Child(name="part", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) + @Child(name ="part", type={}, order=8, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parts of a Tuple Parameter", formalDefinition="The parts of a Tuple Parameter." ) protected List part; - private static final long serialVersionUID = 176609099L; + private static final long serialVersionUID = 633191560L; public OperationDefinitionParameterComponent() { super(); @@ -474,7 +545,7 @@ public class OperationDefinition extends DomainResource { * @return The minimum number of times this parameter SHALL appear in the request or response. */ public int getMin() { - return this.min == null ? 0 : this.min.getValue(); + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); } /** @@ -657,19 +728,19 @@ public class OperationDefinition extends DomainResource { /** * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) */ - public Profile getProfileTarget() { + public StructureDefinition getProfileTarget() { if (this.profileTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile"); else if (Configuration.doAutoCreate()) - this.profileTarget = new Profile(); // aa + this.profileTarget = new StructureDefinition(); // aa return this.profileTarget; } /** * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) */ - public OperationDefinitionParameterComponent setProfileTarget(Profile value) { + public OperationDefinitionParameterComponent setProfileTarget(StructureDefinition value) { this.profileTarget = value; return this; } @@ -704,6 +775,16 @@ public class OperationDefinition extends DomainResource { return t; } + // syntactic sugar + public OperationDefinitionParameterComponent addPart(OperationDefinitionParameterPartComponent t) { //3 + if (t == null) + return this; + if (this.part == null) + this.part = new ArrayList(); + this.part.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("name", "code", "The name of used to identify the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); @@ -712,7 +793,7 @@ public class OperationDefinition extends DomainResource { childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, max)); childrenList.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("type", "code", "The type for this parameter.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("profile", "Reference(Profile)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("part", "", "The parts of a Tuple Parameter.", 0, java.lang.Integer.MAX_VALUE, part)); } @@ -772,57 +853,57 @@ public class OperationDefinition extends DomainResource { /** * The name of used to identify the parameter. */ - @Child(name="name", type={CodeType.class}, order=1, min=1, max=1) + @Child(name ="name", type={CodeType.class}, order=1, min=1, max=1) @Description(shortDefinition="Name of the parameter", formalDefinition="The name of used to identify the parameter." ) protected CodeType name; /** * The minimum number of times this parameter SHALL appear in the request or response. */ - @Child(name="min", type={IntegerType.class}, order=2, min=1, max=1) + @Child(name ="min", type={UnsignedIntType.class}, order=2, min=1, max=1) @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." ) - protected IntegerType min; + protected UnsignedIntType min; /** * The maximum number of times this element is permitted to appear in the request or response. */ - @Child(name="max", type={StringType.class}, order=3, min=1, max=1) + @Child(name ="max", type={StringType.class}, order=3, min=1, max=1) @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." ) protected StringType max; /** * Describes the meaning or use of this parameter. */ - @Child(name="documentation", type={StringType.class}, order=4, min=0, max=1) + @Child(name ="documentation", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." ) protected StringType documentation; /** * The type for this parameter. */ - @Child(name="type", type={CodeType.class}, order=5, min=1, max=1) + @Child(name ="type", type={CodeType.class}, order=5, min=1, max=1) @Description(shortDefinition="What type this parameter hs", formalDefinition="The type for this parameter." ) protected CodeType type; /** * A profile the specifies the rules that this parameter must conform to. */ - @Child(name="profile", type={Profile.class}, order=6, min=0, max=1) + @Child(name ="profile", type={StructureDefinition.class}, order=6, min=0, max=1) @Description(shortDefinition="Profile on the type", formalDefinition="A profile the specifies the rules that this parameter must conform to." ) protected Reference profile; /** * The actual object that is the target of the reference (A profile the specifies the rules that this parameter must conform to.) */ - protected Profile profileTarget; + protected StructureDefinition profileTarget; - private static final long serialVersionUID = -2143629468L; + private static final long serialVersionUID = -856151797L; public OperationDefinitionParameterPartComponent() { super(); } - public OperationDefinitionParameterPartComponent(CodeType name, IntegerType min, StringType max, CodeType type) { + public OperationDefinitionParameterPartComponent(CodeType name, UnsignedIntType min, StringType max, CodeType type) { super(); this.name = name; this.min = min; @@ -878,12 +959,12 @@ public class OperationDefinition extends DomainResource { /** * @return {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value */ - public IntegerType getMinElement() { + public UnsignedIntType getMinElement() { if (this.min == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OperationDefinitionParameterPartComponent.min"); else if (Configuration.doAutoCreate()) - this.min = new IntegerType(); // bb + this.min = new UnsignedIntType(); // bb return this.min; } @@ -898,7 +979,7 @@ public class OperationDefinition extends DomainResource { /** * @param value {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value */ - public OperationDefinitionParameterPartComponent setMinElement(IntegerType value) { + public OperationDefinitionParameterPartComponent setMinElement(UnsignedIntType value) { this.min = value; return this; } @@ -907,7 +988,7 @@ public class OperationDefinition extends DomainResource { * @return The minimum number of times this parameter SHALL appear in the request or response. */ public int getMin() { - return this.min == null ? 0 : this.min.getValue(); + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); } /** @@ -915,7 +996,7 @@ public class OperationDefinition extends DomainResource { */ public OperationDefinitionParameterPartComponent setMin(int value) { if (this.min == null) - this.min = new IntegerType(); + this.min = new UnsignedIntType(); this.min.setValue(value); return this; } @@ -1086,19 +1167,19 @@ public class OperationDefinition extends DomainResource { /** * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) */ - public Profile getProfileTarget() { + public StructureDefinition getProfileTarget() { if (this.profileTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OperationDefinitionParameterPartComponent.profile"); else if (Configuration.doAutoCreate()) - this.profileTarget = new Profile(); // aa + this.profileTarget = new StructureDefinition(); // aa return this.profileTarget; } /** * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.) */ - public OperationDefinitionParameterPartComponent setProfileTarget(Profile value) { + public OperationDefinitionParameterPartComponent setProfileTarget(StructureDefinition value) { this.profileTarget = value; return this; } @@ -1106,11 +1187,11 @@ public class OperationDefinition extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("name", "code", "The name of used to identify the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, min)); + childrenList.add(new Property("min", "unsignedInt", "The minimum number of times this parameter SHALL appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, min)); childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, max)); childrenList.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("type", "code", "The type for this parameter.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("profile", "Reference(Profile)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); } public OperationDefinitionParameterPartComponent copy() { @@ -1157,100 +1238,107 @@ public class OperationDefinition extends DomainResource { } /** - * The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri). */ - @Child(name = "identifier", type = {UriType.class}, order = 0, min = 0, max = 1) - @Description(shortDefinition="Logical id to reference this operation definition", formalDefinition="The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." ) - protected UriType identifier; + @Child(name ="url", type={UriType.class}, order=0, min=0, max=1) + @Description(shortDefinition="Logical url to reference this operation definition", formalDefinition="An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri)." ) + protected UriType url; /** * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. */ - @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1) + @Child(name ="version", type={StringType.class}, order=1, min=0, max=1) @Description(shortDefinition="Logical id for this version of the operation definition", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) protected StringType version; /** * A free text natural language name identifying the Profile. */ - @Child(name = "title", type = {StringType.class}, order = 2, min = 1, max = 1) + @Child(name ="name", type={StringType.class}, order=2, min=1, max=1) @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) - protected StringType title; + protected StringType name; /** - * Details of the individual or organization who accepts responsibility for publishing the profile. + * The name of the individual or organization that published the operation definition. */ - @Child(name = "publisher", type = {StringType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) + @Child(name ="publisher", type={StringType.class}, order=3, min=0, max=1) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the operation definition." ) protected StringType publisher; /** - * Contact details to assist a user in finding and communicating with the publisher. + * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) - protected List telecom; + @Child(name ="contact", type={}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; /** * A free text natural language description of the profile and its use. */ - @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1) + @Child(name ="description", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Natural language description of the operation", formalDefinition="A free text natural language description of the profile and its use." ) protected StringType description; /** - * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. + * Explains why this operation definition is needed and why it's been constrained as it has. */ - @Child(name = "code", type = {Coding.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) - protected List code; + @Child(name ="requirements", type={StringType.class}, order=6, min=0, max=1) + @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this operation definition is needed and why it's been constrained as it has." ) + protected StringType requirements; /** * The status of the profile. */ - @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1) + @Child(name ="status", type={CodeType.class}, order=7, min=1, max=1) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) - protected Enumeration status; + protected Enumeration status; /** * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name = "experimental", type = {BooleanType.class}, order = 8, min = 0, max = 1) + @Child(name ="experimental", type={BooleanType.class}, order=8, min=0, max=1) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The date that this version of the profile was published. */ - @Child(name = "date", type = {DateTimeType.class}, order = 9, min = 0, max = 1) + @Child(name ="date", type={DateTimeType.class}, order=9, min=0, max=1) @Description(shortDefinition="Date for this version of the operation definition", formalDefinition="The date that this version of the profile was published." ) protected DateTimeType date; /** * Whether this is operation or named query. */ - @Child(name = "kind", type = {CodeType.class}, order = 10, min = 1, max = 1) + @Child(name ="kind", type={CodeType.class}, order=10, min=1, max=1) @Description(shortDefinition="operation | query", formalDefinition="Whether this is operation or named query." ) protected Enumeration kind; + /** + * Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + @Child(name ="idempotent", type={BooleanType.class}, order=11, min=0, max=1) + @Description(shortDefinition="Whether operation causes changes to content", formalDefinition="Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST." ) + protected BooleanType idempotent; + /** * The name used to invoke the operation. */ - @Child(name = "name", type = {CodeType.class}, order = 11, min = 1, max = 1) + @Child(name ="code", type={CodeType.class}, order=12, min=1, max=1) @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." ) - protected CodeType name; + protected CodeType code; /** * Additional information about how to use this operation or named query. */ - @Child(name = "notes", type = {StringType.class}, order = 12, min = 0, max = 1) + @Child(name ="notes", type={StringType.class}, order=13, min=0, max=1) @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." ) protected StringType notes; /** * Indicates that this operation definition is a constraining profile on the base. */ - @Child(name = "base", type = {OperationDefinition.class}, order = 13, min = 0, max = 1) + @Child(name ="base", type={OperationDefinition.class}, order=14, min=0, max=1) @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." ) protected Reference base; @@ -1262,92 +1350,92 @@ public class OperationDefinition extends DomainResource { /** * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). */ - @Child(name = "system", type = {BooleanType.class}, order = 14, min = 1, max = 1) + @Child(name ="system", type={BooleanType.class}, order=15, min=1, max=1) @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." ) protected BooleanType system; /** * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context). */ - @Child(name = "type", type = {CodeType.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="type", type={CodeType.class}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Invoke at resource level for these type", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context)." ) protected List type; /** * Indicates whether this operation can be invoked on a particular instance of one of the given types. */ - @Child(name = "instance", type = {BooleanType.class}, order = 16, min = 1, max = 1) + @Child(name ="instance", type={BooleanType.class}, order=17, min=1, max=1) @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." ) protected BooleanType instance; /** * The parameters for the operation/query. */ - @Child(name = "parameter", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="parameter", type={}, order=18, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." ) protected List parameter; - private static final long serialVersionUID = 300577956L; + private static final long serialVersionUID = 1747303098L; public OperationDefinition() { super(); } - public OperationDefinition(StringType title, Enumeration status, Enumeration kind, CodeType name, BooleanType system, BooleanType instance) { + public OperationDefinition(StringType name, Enumeration status, Enumeration kind, CodeType code, BooleanType system, BooleanType instance) { super(); - this.title = title; + this.name = name; this.status = status; this.kind = kind; - this.name = name; + this.code = code; this.system = system; this.instance = instance; } /** - * @return {@link #identifier} (The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @return {@link #url} (An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ - public UriType getIdentifierElement() { - if (this.identifier == null) + public UriType getUrlElement() { + if (this.url == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OperationDefinition.identifier"); + throw new Error("Attempt to auto-create OperationDefinition.url"); else if (Configuration.doAutoCreate()) - this.identifier = new UriType(); // bb - return this.identifier; + this.url = new UriType(); // bb + return this.url; } - public boolean hasIdentifierElement() { - return this.identifier != null && !this.identifier.isEmpty(); + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); } - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); } /** - * @param value {@link #identifier} (The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + * @param value {@link #url} (An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ - public OperationDefinition setIdentifierElement(UriType value) { - this.identifier = value; + public OperationDefinition setUrlElement(UriType value) { + this.url = value; return this; } /** - * @return The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * @return An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri). */ - public String getIdentifier() { - return this.identifier == null ? null : this.identifier.getValue(); + public String getUrl() { + return this.url == null ? null : this.url.getValue(); } /** - * @param value The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI). + * @param value An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri). */ - public OperationDefinition setIdentifier(String value) { + public OperationDefinition setUrl(String value) { if (Utilities.noString(value)) - this.identifier = null; + this.url = null; else { - if (this.identifier == null) - this.identifier = new UriType(); - this.identifier.setValue(value); + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); } return this; } @@ -1402,52 +1490,52 @@ public class OperationDefinition extends DomainResource { } /** - * @return {@link #title} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + * @return {@link #name} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public StringType getTitleElement() { - if (this.title == null) + public StringType getNameElement() { + if (this.name == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OperationDefinition.title"); + throw new Error("Attempt to auto-create OperationDefinition.name"); else if (Configuration.doAutoCreate()) - this.title = new StringType(); // bb - return this.title; + this.name = new StringType(); // bb + return this.name; } - public boolean hasTitleElement() { - return this.title != null && !this.title.isEmpty(); + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); } - public boolean hasTitle() { - return this.title != null && !this.title.isEmpty(); + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); } /** - * @param value {@link #title} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + * @param value {@link #name} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public OperationDefinition setTitleElement(StringType value) { - this.title = value; + public OperationDefinition setNameElement(StringType value) { + this.name = value; return this; } /** * @return A free text natural language name identifying the Profile. */ - public String getTitle() { - return this.title == null ? null : this.title.getValue(); + public String getName() { + return this.name == null ? null : this.name.getValue(); } /** * @param value A free text natural language name identifying the Profile. */ - public OperationDefinition setTitle(String value) { - if (this.title == null) - this.title = new StringType(); - this.title.setValue(value); + public OperationDefinition setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); return this; } /** - * @return {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @return {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public StringType getPublisherElement() { if (this.publisher == null) @@ -1467,7 +1555,7 @@ public class OperationDefinition extends DomainResource { } /** - * @param value {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @param value {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public OperationDefinition setPublisherElement(StringType value) { this.publisher = value; @@ -1475,14 +1563,14 @@ public class OperationDefinition extends DomainResource { } /** - * @return Details of the individual or organization who accepts responsibility for publishing the profile. + * @return The name of the individual or organization that published the operation definition. */ public String getPublisher() { return this.publisher == null ? null : this.publisher.getValue(); } /** - * @param value Details of the individual or organization who accepts responsibility for publishing the profile. + * @param value The name of the individual or organization that published the operation definition. */ public OperationDefinition setPublisher(String value) { if (Utilities.noString(value)) @@ -1496,35 +1584,45 @@ public class OperationDefinition extends DomainResource { } /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; } - public boolean hasTelecom() { - if (this.telecom == null) + public boolean hasContact() { + if (this.contact == null) return false; - for (ContactPoint item : this.telecom) + for (OperationDefinitionContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); + public OperationDefinitionContactComponent addContact() { //3 + OperationDefinitionContactComponent t = new OperationDefinitionContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); return t; } + // syntactic sugar + public OperationDefinition addContact(OperationDefinitionContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** * @return {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ @@ -1575,44 +1673,63 @@ public class OperationDefinition extends DomainResource { } /** - * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) + * @return {@link #requirements} (Explains why this operation definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value */ - public List getCode() { - if (this.code == null) - this.code = new ArrayList(); - return this.code; + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; } - public boolean hasCode() { - if (this.code == null) - return false; - for (Coding item : this.code) - if (!item.isEmpty()) - return true; - return false; + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); } /** - * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) + * @param value {@link #requirements} (Explains why this operation definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value */ - // syntactic sugar - public Coding addCode() { //3 - Coding t = new Coding(); - if (this.code == null) - this.code = new ArrayList(); - this.code.add(t); - return t; + public OperationDefinition setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this operation definition is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this operation definition is needed and why it's been constrained as it has. + */ + public OperationDefinition setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; } /** * @return {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Enumeration getStatusElement() { + public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OperationDefinition.status"); else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); // bb + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb return this.status; } @@ -1627,7 +1744,7 @@ public class OperationDefinition extends DomainResource { /** * @param value {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public OperationDefinition setStatusElement(Enumeration value) { + public OperationDefinition setStatusElement(Enumeration value) { this.status = value; return this; } @@ -1635,16 +1752,16 @@ public class OperationDefinition extends DomainResource { /** * @return The status of the profile. */ - public ResourceProfileStatus getStatus() { + public ConformanceResourceStatus getStatus() { return this.status == null ? null : this.status.getValue(); } /** * @param value The status of the profile. */ - public OperationDefinition setStatus(ResourceProfileStatus value) { + public OperationDefinition setStatus(ConformanceResourceStatus value) { if (this.status == null) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); this.status.setValue(value); return this; } @@ -1681,7 +1798,7 @@ public class OperationDefinition extends DomainResource { * @return This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); } /** @@ -1789,47 +1906,92 @@ public class OperationDefinition extends DomainResource { } /** - * @return {@link #name} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value */ - public CodeType getNameElement() { - if (this.name == null) + public BooleanType getIdempotentElement() { + if (this.idempotent == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OperationDefinition.name"); + throw new Error("Attempt to auto-create OperationDefinition.idempotent"); else if (Configuration.doAutoCreate()) - this.name = new CodeType(); // bb - return this.name; + this.idempotent = new BooleanType(); // bb + return this.idempotent; } - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); + public boolean hasIdempotentElement() { + return this.idempotent != null && !this.idempotent.isEmpty(); } - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); + public boolean hasIdempotent() { + return this.idempotent != null && !this.idempotent.isEmpty(); } /** - * @param value {@link #name} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value */ - public OperationDefinition setNameElement(CodeType value) { - this.name = value; + public OperationDefinition setIdempotentElement(BooleanType value) { + this.idempotent = value; + return this; + } + + /** + * @return Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + public boolean getIdempotent() { + return this.idempotent == null || this.idempotent.isEmpty() ? false : this.idempotent.getValue(); + } + + /** + * @param value Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. + */ + public OperationDefinition setIdempotent(boolean value) { + if (this.idempotent == null) + this.idempotent = new BooleanType(); + this.idempotent.setValue(value); + return this; + } + + /** + * @return {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OperationDefinition.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public OperationDefinition setCodeElement(CodeType value) { + this.code = value; return this; } /** * @return The name used to invoke the operation. */ - public String getName() { - return this.name == null ? null : this.name.getValue(); + public String getCode() { + return this.code == null ? null : this.code.getValue(); } /** * @param value The name used to invoke the operation. */ - public OperationDefinition setName(String value) { - if (this.name == null) - this.name = new CodeType(); - this.name.setValue(value); + public OperationDefinition setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); return this; } @@ -1958,7 +2120,7 @@ public class OperationDefinition extends DomainResource { * @return Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). */ public boolean getSystem() { - return this.system == null ? false : this.system.getValue(); + return this.system == null || this.system.isEmpty() ? false : this.system.getValue(); } /** @@ -2057,7 +2219,7 @@ public class OperationDefinition extends DomainResource { * @return Indicates whether this operation can be invoked on a particular instance of one of the given types. */ public boolean getInstance() { - return this.instance == null ? false : this.instance.getValue(); + return this.instance == null || this.instance.isEmpty() ? false : this.instance.getValue(); } /** @@ -2100,20 +2262,31 @@ public class OperationDefinition extends DomainResource { return t; } + // syntactic sugar + public OperationDefinition addParameter(OperationDefinitionParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "uri", "The identifier that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("url", "uri", "An absolute url that is used to identify this operation definition when it is referenced in a specification, model, design or an instance (should be globally unique uri).", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("title", "string", "A free text natural language name identifying the Profile.", 0, java.lang.Integer.MAX_VALUE, title)); - childrenList.add(new Property("publisher", "string", "Details of the individual or organization who accepts responsibility for publishing the profile.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the Profile.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the operation definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("description", "string", "A free text natural language description of the profile and its use.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of templates.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("requirements", "string", "Explains why this operation definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("status", "code", "The status of the profile.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("experimental", "boolean", "This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); childrenList.add(new Property("date", "dateTime", "The date that this version of the profile was published.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("kind", "code", "Whether this is operation or named query.", 0, java.lang.Integer.MAX_VALUE, kind)); - childrenList.add(new Property("name", "code", "The name used to invoke the operation.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("idempotent", "boolean", "Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.", 0, java.lang.Integer.MAX_VALUE, idempotent)); + childrenList.add(new Property("code", "code", "The name used to invoke the operation.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("notes", "string", "Additional information about how to use this operation or named query.", 0, java.lang.Integer.MAX_VALUE, notes)); childrenList.add(new Property("base", "Reference(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, java.lang.Integer.MAX_VALUE, base)); childrenList.add(new Property("system", "boolean", "Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", 0, java.lang.Integer.MAX_VALUE, system)); @@ -2125,26 +2298,23 @@ public class OperationDefinition extends DomainResource { public OperationDefinition copy() { OperationDefinition dst = new OperationDefinition(); copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); + dst.url = url == null ? null : url.copy(); dst.version = version == null ? null : version.copy(); - dst.title = title == null ? null : title.copy(); + dst.name = name == null ? null : name.copy(); dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); + if (contact != null) { + dst.contact = new ArrayList(); + for (OperationDefinitionContactComponent i : contact) + dst.contact.add(i.copy()); }; dst.description = description == null ? null : description.copy(); - if (code != null) { - dst.code = new ArrayList(); - for (Coding i : code) - dst.code.add(i.copy()); - }; + dst.requirements = requirements == null ? null : requirements.copy(); dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); dst.date = date == null ? null : date.copy(); dst.kind = kind == null ? null : kind.copy(); - dst.name = name == null ? null : name.copy(); + dst.idempotent = idempotent == null ? null : idempotent.copy(); + dst.code = code == null ? null : code.copy(); dst.notes = notes == null ? null : notes.copy(); dst.base = base == null ? null : base.copy(); dst.system = system == null ? null : system.copy(); @@ -2173,13 +2343,13 @@ public class OperationDefinition extends DomainResource { if (!(other instanceof OperationDefinition)) return false; OperationDefinition o = (OperationDefinition) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(title, o.title, true) - && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) && compareDeep(description, o.description, true) - && compareDeep(code, o.code, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) - && compareDeep(date, o.date, true) && compareDeep(kind, o.kind, true) && compareDeep(name, o.name, true) - && compareDeep(notes, o.notes, true) && compareDeep(base, o.base, true) && compareDeep(system, o.system, true) - && compareDeep(type, o.type, true) && compareDeep(instance, o.instance, true) && compareDeep(parameter, o.parameter, true) - ; + return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(date, o.date, true) && compareDeep(kind, o.kind, true) && compareDeep(idempotent, o.idempotent, true) + && compareDeep(code, o.code, true) && compareDeep(notes, o.notes, true) && compareDeep(base, o.base, true) + && compareDeep(system, o.system, true) && compareDeep(type, o.type, true) && compareDeep(instance, o.instance, true) + && compareDeep(parameter, o.parameter, true); } @Override @@ -2189,19 +2359,21 @@ public class OperationDefinition extends DomainResource { if (!(other instanceof OperationDefinition)) return false; OperationDefinition o = (OperationDefinition) other; - return compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) && compareValues(title, o.title, true) - && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(status, o.status, true) - && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(kind, o.kind, true) - && compareValues(name, o.name, true) && compareValues(notes, o.notes, true) && compareValues(system, o.system, true) - && compareValues(type, o.type, true) && compareValues(instance, o.instance, true); + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) + && compareValues(kind, o.kind, true) && compareValues(idempotent, o.idempotent, true) && compareValues(code, o.code, true) + && compareValues(notes, o.notes, true) && compareValues(system, o.system, true) && compareValues(type, o.type, true) + && compareValues(instance, o.instance, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (title == null || title.isEmpty()) && (publisher == null || publisher.isEmpty()) && (telecom == null || telecom.isEmpty()) - && (description == null || description.isEmpty()) && (code == null || code.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (date == null || date.isEmpty()) && (kind == null || kind.isEmpty()) - && (name == null || name.isEmpty()) && (notes == null || notes.isEmpty()) && (base == null || base.isEmpty()) + return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) + && (name == null || name.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) + && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) + && (date == null || date.isEmpty()) && (kind == null || kind.isEmpty()) && (idempotent == null || idempotent.isEmpty()) + && (code == null || code.isEmpty()) && (notes == null || notes.isEmpty()) && (base == null || base.isEmpty()) && (system == null || system.isEmpty()) && (type == null || type.isEmpty()) && (instance == null || instance.isEmpty()) && (parameter == null || parameter.isEmpty()); } @@ -2213,30 +2385,28 @@ public class OperationDefinition extends DomainResource { @SearchParamDefinition(name="date", path="OperationDefinition.date", description="Date for this version of the operation definition", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "identifier", path = "OperationDefinition.identifier", description = "Logical id to reference this operation definition", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "code", path = "OperationDefinition.code", description = "Assist with indexing and finding", type = "token") - public static final String SP_CODE = "code"; - @SearchParamDefinition(name = "instance", path = "OperationDefinition.instance", description = "Invoke on an instance?", type = "token") - public static final String SP_INSTANCE = "instance"; + @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Name used to invoke the operation", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) + public static final String SP_INSTANCE = "instance"; @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" ) public static final String SP_KIND = "kind"; - @SearchParamDefinition(name = "profile", path = "OperationDefinition.parameter.profile", description = "Profile on the type", type = "reference") - public static final String SP_PROFILE = "profile"; - @SearchParamDefinition(name="title", path="OperationDefinition.title", description="Informal name for this profile", type="string" ) - public static final String SP_TITLE = "title"; - @SearchParamDefinition(name = "type", path = "OperationDefinition.type", description = "Invoke at resource level for these type", type = "token") - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name = "version", path = "OperationDefinition.version", description = "Logical id for this version of the operation definition", type = "token") - public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) + public static final String SP_PROFILE = "profile"; + @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) + public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) + public static final String SP_VERSION = "version"; + @SearchParamDefinition(name="url", path="OperationDefinition.url", description="Logical url to reference this operation definition", type="uri" ) + public static final String SP_URL = "url"; @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" ) public static final String SP_SYSTEM = "system"; - @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Name used to invoke the operation", type="token" ) + @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Informal name for this profile", type="string" ) public static final String SP_NAME = "name"; - @SearchParamDefinition(name = "publisher", path = "OperationDefinition.publisher", description = "Name of the publisher (Organization or individual)", type = "string") - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "status", path = "OperationDefinition.status", description = "draft | active | retired", type = "token") - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference" ) public static final String SP_BASE = "base"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java deleted file mode 100644 index 89ac6663d41..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Other.java +++ /dev/null @@ -1,354 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * Other is a conformant for handling resource concepts not yet defined for FHIR or outside HL7's scope of interest. - */ -@ResourceDef(name="Other", profile="http://hl7.org/fhir/Profile/Other") -public class Other extends DomainResource { - - /** - * Identifier assigned to the resource for business purposes, outside the context of FHIR. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) - protected List identifier; - - /** - * Identifies the 'type' of resource - equivalent to the resource name for other resources. - */ - @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 1, max = 1) - @Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." ) - protected CodeableConcept code; - - /** - * Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce. - */ - @Child(name = "subject", type = {}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." ) - protected Reference subject; - - /** - * The actual object that is the target of the reference (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.) - */ - protected Resource subjectTarget; - - /** - * Indicates who was responsible for creating the resource instance. - */ - @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." ) - protected Reference author; - - /** - * The actual object that is the target of the reference (Indicates who was responsible for creating the resource instance.) - */ - protected Resource authorTarget; - - /** - * Identifies when the resource was first created. - */ - @Child(name = "created", type = {DateType.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." ) - protected DateType created; - - private static final long serialVersionUID = 916539354L; - - public Other() { - super(); - } - - public Other(CodeableConcept code) { - super(); - this.code = code; - } - - /** - * @return {@link #identifier} (Identifier assigned to the resource for business purposes, outside the context of FHIR.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (Identifier assigned to the resource for business purposes, outside the context of FHIR.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #code} (Identifies the 'type' of resource - equivalent to the resource name for other resources.) - */ - public CodeableConcept getCode() { - if (this.code == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Other.code"); - else if (Configuration.doAutoCreate()) - this.code = new CodeableConcept(); // cc - return this.code; - } - - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); - } - - /** - * @param value {@link #code} (Identifies the 'type' of resource - equivalent to the resource name for other resources.) - */ - public Other setCode(CodeableConcept value) { - this.code = value; - return this; - } - - /** - * @return {@link #subject} (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Other.subject"); - else if (Configuration.doAutoCreate()) - this.subject = new Reference(); // cc - return this.subject; - } - - public boolean hasSubject() { - return this.subject != null && !this.subject.isEmpty(); - } - - /** - * @param value {@link #subject} (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.) - */ - public Other setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.) - */ - public Resource getSubjectTarget() { - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.) - */ - public Other setSubjectTarget(Resource value) { - this.subjectTarget = value; - return this; - } - - /** - * @return {@link #author} (Indicates who was responsible for creating the resource instance.) - */ - public Reference getAuthor() { - if (this.author == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Other.author"); - else if (Configuration.doAutoCreate()) - this.author = new Reference(); // cc - return this.author; - } - - public boolean hasAuthor() { - return this.author != null && !this.author.isEmpty(); - } - - /** - * @param value {@link #author} (Indicates who was responsible for creating the resource instance.) - */ - public Other setAuthor(Reference value) { - this.author = value; - return this; - } - - /** - * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates who was responsible for creating the resource instance.) - */ - public Resource getAuthorTarget() { - return this.authorTarget; - } - - /** - * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates who was responsible for creating the resource instance.) - */ - public Other setAuthorTarget(Resource value) { - this.authorTarget = value; - return this; - } - - /** - * @return {@link #created} (Identifies when the resource was first created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Other.created"); - else if (Configuration.doAutoCreate()) - this.created = new DateType(); // 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} (Identifies when the resource was first created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public Other setCreatedElement(DateType value) { - this.created = value; - return this; - } - - /** - * @return Identifies when the resource was first created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value Identifies when the resource was first created. - */ - public Other setCreated(Date value) { - if (value == null) - this.created = null; - else { - if (this.created == null) - this.created = new DateType(); - this.created.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "Identifier assigned to the resource for business purposes, outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("code", "CodeableConcept", "Identifies the 'type' of resource - equivalent to the resource name for other resources.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("subject", "Reference(Any)", "Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce.", 0, java.lang.Integer.MAX_VALUE, subject)); - childrenList.add(new Property("author", "Reference(Practitioner|Patient|RelatedPerson)", "Indicates who was responsible for creating the resource instance.", 0, java.lang.Integer.MAX_VALUE, author)); - childrenList.add(new Property("created", "date", "Identifies when the resource was first created.", 0, java.lang.Integer.MAX_VALUE, created)); - } - - public Other copy() { - Other dst = new Other(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.code = code == null ? null : code.copy(); - dst.subject = subject == null ? null : subject.copy(); - dst.author = author == null ? null : author.copy(); - dst.created = created == null ? null : created.copy(); - return dst; - } - - protected Other typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Other)) - return false; - Other o = (Other) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) - && compareDeep(author, o.author, true) && compareDeep(created, o.created, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Other)) - return false; - Other o = (Other) other; - return compareValues(created, o.created, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) - && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (created == null || created.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Other; - } - - @SearchParamDefinition(name="code", path="Other.code", description="Kind of Resource", type="token" ) - public static final String SP_CODE = "code"; - @SearchParamDefinition(name = "subject", path = "Other.subject", description = "Identifies the", type = "reference") - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name = "created", path = "Other.created", description = "When created", type = "date") - public static final String SP_CREATED = "created"; - @SearchParamDefinition(name = "patient", path = "Other.subject", description = "Identifies the", type = "reference") - public static final String SP_PATIENT = "patient"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java index fb1e1b701d2..dbb3f858f6e 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PaymentReconciliation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; @@ -90,8 +90,8 @@ public class PaymentReconciliation extends DomainResource { } public String getDisplay() { switch (this) { - case COMPLETE: return "complete"; - case ERROR: return "error"; + case COMPLETE: return "Complete"; + case ERROR: return "Error"; default: return "?"; } } @@ -122,14 +122,14 @@ public class PaymentReconciliation extends DomainResource { /** * Code to indicate the nature of the payment, adjustment, funds advance, etc. */ - @Child(name="type", type={Coding.class}, order=1, min=1, max=1) + @Child(name ="type", type={Coding.class}, order=1, min=1, max=1) @Description(shortDefinition="Type code", formalDefinition="Code to indicate the nature of the payment, adjustment, funds advance, etc." ) protected Coding type; /** * The claim or financial resource. */ - @Child(name="request", type={}, order=2, min=0, max=1) + @Child(name ="request", type={}, order=2, min=0, max=1) @Description(shortDefinition="Claim", formalDefinition="The claim or financial resource." ) protected Reference request; @@ -141,7 +141,7 @@ public class PaymentReconciliation extends DomainResource { /** * The claim response resource. */ - @Child(name="responce", type={}, order=3, min=0, max=1) + @Child(name ="responce", type={}, order=3, min=0, max=1) @Description(shortDefinition="Claim Response", formalDefinition="The claim response resource." ) protected Reference responce; @@ -153,7 +153,7 @@ public class PaymentReconciliation extends DomainResource { /** * The Organization which submitted the invoice or financial transaction. */ - @Child(name="submitter", type={Organization.class}, order=4, min=0, max=1) + @Child(name ="submitter", type={Organization.class}, order=4, min=0, max=1) @Description(shortDefinition="Submitter", formalDefinition="The Organization which submitted the invoice or financial transaction." ) protected Reference submitter; @@ -165,7 +165,7 @@ public class PaymentReconciliation extends DomainResource { /** * The organization which is receiving the payment. */ - @Child(name="payee", type={Organization.class}, order=5, min=0, max=1) + @Child(name ="payee", type={Organization.class}, order=5, min=0, max=1) @Description(shortDefinition="Payee", formalDefinition="The organization which is receiving the payment." ) protected Reference payee; @@ -177,14 +177,14 @@ public class PaymentReconciliation extends DomainResource { /** * The date of the invoice or financial resource. */ - @Child(name="date", type={DateType.class}, order=6, min=0, max=1) + @Child(name ="date", type={DateType.class}, order=6, min=0, max=1) @Description(shortDefinition="Invoice date", formalDefinition="The date of the invoice or financial resource." ) protected DateType date; /** * Amount paid for this detail. */ - @Child(name="amount", type={Money.class}, order=7, min=0, max=1) + @Child(name ="amount", type={Money.class}, order=7, min=0, max=1) @Description(shortDefinition="Detail amount", formalDefinition="Amount paid for this detail." ) protected Money amount; @@ -522,14 +522,14 @@ public class PaymentReconciliation extends DomainResource { /** * The note purpose: Print/Display. */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) + @Child(name ="type", type={Coding.class}, order=1, min=0, max=1) @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) protected Coding type; /** * The note text. */ - @Child(name="text", type={StringType.class}, order=2, min=0, max=1) + @Child(name ="text", type={StringType.class}, order=2, min=0, max=1) @Description(shortDefinition="Notes text", formalDefinition="The note text." ) protected StringType text; @@ -656,68 +656,68 @@ public class PaymentReconciliation extends DomainResource { /** * The Response Business Identifier. */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) protected List identifier; /** * Original request resource reference. */ - @Child(name = "request", type = {PendedRequest.class}, order = 1, min = 0, max = 1) + @Child(name ="request", type={ProcessRequest.class}, order=1, min=0, max=1) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) protected Reference request; /** * The actual object that is the target of the reference (Original request resource reference.) */ - protected PendedRequest requestTarget; + protected ProcessRequest requestTarget; /** * Transaction status: error, complete. */ - @Child(name = "outcome", type = {CodeType.class}, order = 2, min = 0, max = 1) + @Child(name ="outcome", type={CodeType.class}, order=2, min=0, max=1) @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." ) protected Enumeration outcome; /** * A description of the status of the adjudication. */ - @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) + @Child(name ="disposition", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. */ - @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) + @Child(name ="ruleset", type={Coding.class}, order=4, min=0, max=1) @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) protected Coding ruleset; /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) + @Child(name ="originalRuleset", type={Coding.class}, order=5, min=0, max=1) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) + @Child(name ="created", type={DateTimeType.class}, order=6, min=0, max=1) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The period of time for which payments have been gathered into this bulk payment for settlement. */ - @Child(name = "period", type = {Period.class}, order = 7, min = 0, max = 1) + @Child(name ="period", type={Period.class}, order=7, min=0, max=1) @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." ) protected Period period; /** * The Insurer who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order = 8, min = 0, max = 1) + @Child(name ="organization", type={Organization.class}, order=8, min=0, max=1) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) protected Reference organization; @@ -729,7 +729,7 @@ public class PaymentReconciliation extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order = 9, min = 0, max = 1) + @Child(name ="requestProvider", type={Practitioner.class}, order=9, min=0, max=1) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) protected Reference requestProvider; @@ -741,7 +741,7 @@ public class PaymentReconciliation extends DomainResource { /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order = 10, min = 0, max = 1) + @Child(name ="requestOrganization", type={Organization.class}, order=10, min=0, max=1) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) protected Reference requestOrganization; @@ -753,32 +753,32 @@ public class PaymentReconciliation extends DomainResource { /** * List of individual settlement amounts and the corresponding transaction. */ - @Child(name = "detail", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="detail", type={}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." ) protected List detail; /** * The form to be used for printing the content. */ - @Child(name = "form", type = {Coding.class}, order = 12, min = 0, max = 1) + @Child(name ="form", type={Coding.class}, order=12, min=0, max=1) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Total payment amount. */ - @Child(name = "total", type = {Money.class}, order = 13, min = 1, max = 1) + @Child(name ="total", type={Money.class}, order=13, min=1, max=1) @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." ) protected Money total; /** * Suite of notes. */ - @Child(name = "note", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="note", type={}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) protected List note; - private static final long serialVersionUID = 2043460985L; + private static final long serialVersionUID = 1602249640L; public PaymentReconciliation() { super(); @@ -819,6 +819,16 @@ public class PaymentReconciliation extends DomainResource { return t; } + // syntactic sugar + public PaymentReconciliation addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + /** * @return {@link #request} (Original request resource reference.) */ @@ -846,19 +856,19 @@ public class PaymentReconciliation extends DomainResource { /** * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) */ - public PendedRequest getRequestTarget() { + public ProcessRequest getRequestTarget() { if (this.requestTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create PaymentReconciliation.request"); else if (Configuration.doAutoCreate()) - this.requestTarget = new PendedRequest(); // aa + this.requestTarget = new ProcessRequest(); // aa return this.requestTarget; } /** * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) */ - public PaymentReconciliation setRequestTarget(PendedRequest value) { + public PaymentReconciliation setRequestTarget(ProcessRequest value) { this.requestTarget = value; return this; } @@ -1244,6 +1254,16 @@ public class PaymentReconciliation extends DomainResource { return t; } + // syntactic sugar + public PaymentReconciliation addDetail(DetailsComponent t) { //3 + if (t == null) + return this; + if (this.detail == null) + this.detail = new ArrayList(); + this.detail.add(t); + return this; + } + /** * @return {@link #form} (The form to be used for printing the content.) */ @@ -1322,10 +1342,20 @@ public class PaymentReconciliation extends DomainResource { return t; } + // syntactic sugar + public PaymentReconciliation addNote(NotesComponent t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(PendedRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java deleted file mode 100644 index 6a23d055fd6..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PendedRequest.java +++ /dev/null @@ -1,670 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides the request and response details for the resource for which the status is to be checked. - */ -@ResourceDef(name="PendedRequest", profile="http://hl7.org/fhir/Profile/PendedRequest") -public class PendedRequest extends DomainResource { - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when this resource was created. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) - protected DateTimeType created; - - /** - * The Insurer who is target of the request. - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; - - /** - * Reference of resource to reverse. - */ - @Child(name = "request", type = {}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource to reverse.) - */ - protected Resource requestTarget; - - /** - * Names of resource types to include. - */ - @Child(name = "include", type = {StringType.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) - protected List include; - - /** - * Names of resource types to exclude. - */ - @Child(name = "exclude", type = {StringType.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) - protected List exclude; - - /** - * A period of time during which the fulfilling resources would have been created. - */ - @Child(name = "period", type = {Period.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) - protected Period period; - - private static final long serialVersionUID = 1211492560L; - - public PendedRequest() { - super(); - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public PendedRequest setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public PendedRequest setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateTimeType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public PendedRequest setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when this resource was created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when this resource was created. - */ - public PendedRequest 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 #target} (The Insurer who is target of the request.) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (The Insurer who is target of the request.) - */ - public PendedRequest setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public PendedRequest setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public PendedRequest setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public PendedRequest setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public PendedRequest setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public PendedRequest setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #request} (Reference of resource to reverse.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.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} (Reference of resource to reverse.) - */ - public PendedRequest setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public PendedRequest setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #include} (Names of resource types to include.) - */ - public List getInclude() { - if (this.include == null) - this.include = new ArrayList(); - return this.include; - } - - public boolean hasInclude() { - if (this.include == null) - return false; - for (StringType item : this.include) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #include} (Names of resource types to include.) - */ - // syntactic sugar - public StringType addIncludeElement() {//2 - StringType t = new StringType(); - if (this.include == null) - this.include = new ArrayList(); - this.include.add(t); - return t; - } - - /** - * @param value {@link #include} (Names of resource types to include.) - */ - public PendedRequest addInclude(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.include == null) - this.include = new ArrayList(); - this.include.add(t); - return this; - } - - /** - * @param value {@link #include} (Names of resource types to include.) - */ - public boolean hasInclude(String value) { - if (this.include == null) - return false; - for (StringType v : this.include) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #exclude} (Names of resource types to exclude.) - */ - public List getExclude() { - if (this.exclude == null) - this.exclude = new ArrayList(); - return this.exclude; - } - - public boolean hasExclude() { - if (this.exclude == null) - return false; - for (StringType item : this.exclude) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exclude} (Names of resource types to exclude.) - */ - // syntactic sugar - public StringType addExcludeElement() {//2 - StringType t = new StringType(); - if (this.exclude == null) - this.exclude = new ArrayList(); - this.exclude.add(t); - return t; - } - - /** - * @param value {@link #exclude} (Names of resource types to exclude.) - */ - public PendedRequest addExclude(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.exclude == null) - this.exclude = new ArrayList(); - this.exclude.add(t); - return this; - } - - /** - * @param value {@link #exclude} (Names of resource types to exclude.) - */ - public boolean hasExclude(String value) { - if (this.exclude == null) - return false; - for (StringType v : this.exclude) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #period} (A period of time during which the fulfilling resources would have been created.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PendedRequest.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} (A period of time during which the fulfilling resources would have been created.) - */ - public PendedRequest setPeriod(Period value) { - this.period = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("include", "string", "Names of resource types to include.", 0, java.lang.Integer.MAX_VALUE, include)); - childrenList.add(new Property("exclude", "string", "Names of resource types to exclude.", 0, java.lang.Integer.MAX_VALUE, exclude)); - childrenList.add(new Property("period", "Period", "A period of time during which the fulfilling resources would have been created.", 0, java.lang.Integer.MAX_VALUE, period)); - } - - public PendedRequest copy() { - PendedRequest dst = new PendedRequest(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.request = request == null ? null : request.copy(); - if (include != null) { - dst.include = new ArrayList(); - for (StringType i : include) - dst.include.add(i.copy()); - }; - if (exclude != null) { - dst.exclude = new ArrayList(); - for (StringType i : exclude) - dst.exclude.add(i.copy()); - }; - dst.period = period == null ? null : period.copy(); - return dst; - } - - protected PendedRequest typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PendedRequest)) - return false; - PendedRequest o = (PendedRequest) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(include, o.include, true) - && compareDeep(exclude, o.exclude, true) && compareDeep(period, o.period, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PendedRequest)) - return false; - PendedRequest o = (PendedRequest) other; - return compareValues(created, o.created, true) && compareValues(include, o.include, true) && compareValues(exclude, o.exclude, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) - && (period == null || period.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.PendedRequest; - } - - @SearchParamDefinition(name="identifier", path="PendedRequest.identifier", description="The business identifier of the Eligibility", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java deleted file mode 100644 index bda2b6fa23e..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PharmacyClaim.java +++ /dev/null @@ -1,4070 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import java.math.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. - */ -@ResourceDef(name="PharmacyClaim", profile="http://hl7.org/fhir/Profile/PharmacyClaim") -public class PharmacyClaim extends DomainResource { - - public enum UseLink { - /** - * The treatment is complete and this represents a Claim for the services. - */ - COMPLETE, - /** - * The treatment is proposed and this represents a Pre-authorization for the services. - */ - PROPOSED, - /** - * The treatment is proposed and this represents a Pre-determination for the services. - */ - EXPLORATORY, - /** - * A locally defined or otherwise resolved status. - */ - OTHER, - /** - * added to help the parsers - */ - NULL; - public static UseLink fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return COMPLETE; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("exploratory".equals(codeString)) - return EXPLORATORY; - if ("other".equals(codeString)) - return OTHER; - throw new Exception("Unknown UseLink code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case COMPLETE: return ""; - case PROPOSED: return ""; - case EXPLORATORY: return ""; - case OTHER: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; - case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; - case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; - case OTHER: return "A locally defined or otherwise resolved status."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - } - - public static class UseLinkEnumFactory implements EnumFactory { - public UseLink fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return UseLink.COMPLETE; - if ("proposed".equals(codeString)) - return UseLink.PROPOSED; - if ("exploratory".equals(codeString)) - return UseLink.EXPLORATORY; - if ("other".equals(codeString)) - return UseLink.OTHER; - throw new IllegalArgumentException("Unknown UseLink code '"+codeString+"'"); - } - public String toCode(UseLink code) { - if (code == UseLink.COMPLETE) - return "complete"; - if (code == UseLink.PROPOSED) - return "proposed"; - if (code == UseLink.EXPLORATORY) - return "exploratory"; - if (code == UseLink.OTHER) - return "other"; - return "?"; - } - } - - @Block() - public static class PayeeComponent extends BackboneElement { - /** - * Party to be reimbursed: Subscriber, provider, other. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) - protected Coding type; - - /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; - - public PayeeComponent() { - super(); - } - - /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public PayeeComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); - } - - public PayeeComponent copy() { - PayeeComponent dst = new PayeeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; - } - - } - - @Block() - public static class DiagnosisComponent extends BackboneElement { - /** - * Sequence of diagnosis. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis." ) - protected IntegerType sequence; - - /** - * The diagnosis. - */ - @Child(name="diagnosis", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) - protected Coding diagnosis; - - private static final long serialVersionUID = -935927954L; - - public DiagnosisComponent() { - super(); - } - - public DiagnosisComponent(IntegerType sequence, Coding diagnosis) { - super(); - this.sequence = sequence; - this.diagnosis = diagnosis; - } - - /** - * @return {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb - return this.sequence; - } - - public boolean hasSequenceElement() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - public boolean hasSequence() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - /** - * @param value {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DiagnosisComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return Sequence of diagnosis. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value Sequence of diagnosis. - */ - public DiagnosisComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #diagnosis} (The diagnosis.) - */ - public Coding getDiagnosis() { - if (this.diagnosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); - else if (Configuration.doAutoCreate()) - this.diagnosis = new Coding(); // cc - return this.diagnosis; - } - - public boolean hasDiagnosis() { - return this.diagnosis != null && !this.diagnosis.isEmpty(); - } - - /** - * @param value {@link #diagnosis} (The diagnosis.) - */ - public DiagnosisComponent setDiagnosis(Coding value) { - this.diagnosis = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "Sequence of diagnosis.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - } - - public DiagnosisComponent copy() { - DiagnosisComponent dst = new DiagnosisComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareValues(sequence, o.sequence, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; - } - - } - - @Block() - public static class CoverageComponent extends BackboneElement { - /** - * A service line item. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) - protected IntegerType sequence; - - /** - * The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated. - */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated." ) - protected BooleanType focal; - - /** - * Reference to the program or plan identification, underwriter or payor. - */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) - @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The contract number of a business agreement which describes the terms and conditions. - */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) - protected StringType businessArrangement; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - - /** - * A list of references from the Insurer to which these services pertain. - */ - @Child(name="preauthref", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) - protected List preauthref; - - /** - * The Coverages adjudication details. - */ - @Child(name="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) - @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) - protected Reference claimResponse; - - /** - * The actual object that is the target of the reference (The Coverages adjudication details.) - */ - protected ClaimResponse claimResponseTarget; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name="originalRuleset", type={Coding.class}, order=8, min=0, max=1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - private static final long serialVersionUID = 450222500L; - - public CoverageComponent() { - super(); - } - - public CoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { - super(); - this.sequence = sequence; - this.focal = focal; - this.coverage = coverage; - this.relationship = relationship; - } - - /** - * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public CoverageComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line item. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line item. - */ - public CoverageComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public BooleanType getFocalElement() { - if (this.focal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.focal"); - else if (Configuration.doAutoCreate()) - this.focal = new BooleanType(); // bb - return this.focal; - } - - public boolean hasFocalElement() { - return this.focal != null && !this.focal.isEmpty(); - } - - public boolean hasFocal() { - return this.focal != null && !this.focal.isEmpty(); - } - - /** - * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public CoverageComponent setFocalElement(BooleanType value) { - this.focal = value; - return this; - } - - /** - * @return The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated. - */ - public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); - } - - /** - * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated. - */ - public CoverageComponent setFocal(boolean value) { - if (this.focal == null) - this.focal = new BooleanType(); - this.focal.setValue(value); - return this; - } - - /** - * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** - * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public StringType getBusinessArrangementElement() { - if (this.businessArrangement == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); - else if (Configuration.doAutoCreate()) - this.businessArrangement = new StringType(); // bb - return this.businessArrangement; - } - - public boolean hasBusinessArrangementElement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - public boolean hasBusinessArrangement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - /** - * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public CoverageComponent setBusinessArrangementElement(StringType value) { - this.businessArrangement = value; - return this; - } - - /** - * @return The contract number of a business agreement which describes the terms and conditions. - */ - public String getBusinessArrangement() { - return this.businessArrangement == null ? null : this.businessArrangement.getValue(); - } - - /** - * @param value The contract number of a business agreement which describes the terms and conditions. - */ - public CoverageComponent setBusinessArrangement(String value) { - if (Utilities.noString(value)) - this.businessArrangement = null; - else { - if (this.businessArrangement == null) - this.businessArrangement = new StringType(); - this.businessArrangement.setValue(value); - } - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public List getPreauthref() { - if (this.preauthref == null) - this.preauthref = new ArrayList(); - return this.preauthref; - } - - public boolean hasPreauthref() { - if (this.preauthref == null) - return false; - for (StringType item : this.preauthref) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - // syntactic sugar - public StringType addPreauthrefElement() {//2 - StringType t = new StringType(); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return t; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public CoverageComponent addPreauthref(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return this; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public boolean hasPreauthref(String value) { - if (this.preauthref == null) - return false; - for (StringType v : this.preauthref) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #claimResponse} (The Coverages adjudication details.) - */ - public Reference getClaimResponse() { - if (this.claimResponse == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponse = new Reference(); // cc - return this.claimResponse; - } - - public boolean hasClaimResponse() { - return this.claimResponse != null && !this.claimResponse.isEmpty(); - } - - /** - * @param value {@link #claimResponse} (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponse(Reference value) { - this.claimResponse = value; - return this; - } - - /** - * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public ClaimResponse getClaimResponseTarget() { - if (this.claimResponseTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponseTarget = new ClaimResponse(); // aa - return this.claimResponseTarget; - } - - /** - * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponseTarget(ClaimResponse value) { - this.claimResponseTarget = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public CoverageComponent setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage to against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("preauthref", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preauthref)); - childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - } - - public CoverageComponent copy() { - CoverageComponent dst = new CoverageComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.focal = focal == null ? null : focal.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - if (preauthref != null) { - dst.preauthref = new ArrayList(); - for (StringType i : preauthref) - dst.preauthref.add(i.copy()); - }; - dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preauthref, o.preauthref, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - && compareValues(preauthref, o.preauthref, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preauthref == null || preauthref.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; - } - - } - - @Block() - public static class ItemsComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name="provider", type={Practitioner.class}, order=3, min=0, max=1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * Diagnosis applicable for this service or product line. - */ - @Child(name="diagnosisLinkId", type={IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) - protected List diagnosisLinkId; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name="serviceDate", type={DateType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateType serviceDate; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) - @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=12, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Physical service site on the patient (limb, tooth, etc). - */ - @Child(name="bodySite", type={Coding.class}, order=13, min=0, max=1) - @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) - protected Coding bodySite; - - /** - * A region or surface of the site, eg. limb region or tooth surface(s). - */ - @Child(name="subsite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) - protected List subsite; - - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - - /** - * Second tier of goods and services. - */ - @Child(name="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) - protected List detail; - - private static final long serialVersionUID = -1140048455L; - - public ItemsComponent() { - super(); - } - - public ItemsComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public ItemsComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public ItemsComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public ItemsComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public List getDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - return this.diagnosisLinkId; - } - - public boolean hasDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType item : this.diagnosisLinkId) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - // syntactic sugar - public IntegerType addDiagnosisLinkIdElement() {//2 - IntegerType t = new IntegerType(); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return t; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public ItemsComponent addDiagnosisLinkId(int value) { //1 - IntegerType t = new IntegerType(); - t.setValue(value); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return this; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public boolean hasDiagnosisLinkId(int value) { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType v : this.diagnosisLinkId) - if (v.equals(value)) // integer - return true; - return false; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public ItemsComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public DateType getServiceDateElement() { - if (this.serviceDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.serviceDate"); - else if (Configuration.doAutoCreate()) - this.serviceDate = new DateType(); // bb - return this.serviceDate; - } - - public boolean hasServiceDateElement() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - public boolean hasServiceDate() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - /** - * @param value {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public ItemsComponent setServiceDateElement(DateType value) { - this.serviceDate = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getServiceDate() { - return this.serviceDate == null ? null : this.serviceDate.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public ItemsComponent setServiceDate(Date value) { - if (value == null) - this.serviceDate = null; - else { - if (this.serviceDate == null) - this.serviceDate = new DateType(); - this.serviceDate.setValue(value); - } - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public ItemsComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public ItemsComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public ItemsComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public ItemsComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public ItemsComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public ItemsComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public ItemsComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public Coding getBodySite() { - if (this.bodySite == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.bodySite"); - else if (Configuration.doAutoCreate()) - this.bodySite = new Coding(); // cc - return this.bodySite; - } - - public boolean hasBodySite() { - return this.bodySite != null && !this.bodySite.isEmpty(); - } - - /** - * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public ItemsComponent setBodySite(Coding value) { - this.bodySite = value; - return this; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - public List getSubsite() { - if (this.subsite == null) - this.subsite = new ArrayList(); - return this.subsite; - } - - public boolean hasSubsite() { - if (this.subsite == null) - return false; - for (Coding item : this.subsite) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - // syntactic sugar - public Coding addSubsite() { //3 - Coding t = new Coding(); - if (this.subsite == null) - this.subsite = new ArrayList(); - this.subsite.add(t); - return t; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (DetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - // syntactic sugar - public DetailComponent addDetail() { //3 - DetailComponent t = new DetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("diagnosisLinkId", "integer", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); - childrenList.add(new Property("subsite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subsite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); - childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public ItemsComponent copy() { - ItemsComponent dst = new ItemsComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - if (diagnosisLinkId != null) { - dst.diagnosisLinkId = new ArrayList(); - for (IntegerType i : diagnosisLinkId) - dst.diagnosisLinkId.add(i.copy()); - }; - dst.service = service == null ? null : service.copy(); - dst.serviceDate = serviceDate == null ? null : serviceDate.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - dst.bodySite = bodySite == null ? null : bodySite.copy(); - if (subsite != null) { - dst.subsite = new ArrayList(); - for (Coding i : subsite) - dst.subsite.add(i.copy()); - }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; - if (detail != null) { - dst.detail = new ArrayList(); - for (DetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) - && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) - && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subsite, o.subsite, true) - && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) - && compareValues(serviceDate, o.serviceDate, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subsite == null || subsite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()); - } - - } - - @Block() - public static class DetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Third tier of goods and services. - */ - @Child(name="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) - protected List subDetail; - - private static final long serialVersionUID = -342502025L; - - public DetailComponent() { - super(); - } - - public DetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public DetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public DetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public DetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public DetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public DetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public DetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public DetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public DetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public DetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - public List getSubDetail() { - if (this.subDetail == null) - this.subDetail = new ArrayList(); - return this.subDetail; - } - - public boolean hasSubDetail() { - if (this.subDetail == null) - return false; - for (SubDetailComponent item : this.subDetail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - // syntactic sugar - public SubDetailComponent addSubDetail() { //3 - SubDetailComponent t = new SubDetailComponent(); - if (this.subDetail == null) - this.subDetail = new ArrayList(); - this.subDetail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); - } - - public DetailComponent copy() { - DetailComponent dst = new DetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - if (subDetail != null) { - dst.subDetail = new ArrayList(); - for (SubDetailComponent i : subDetail) - dst.subDetail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(subDetail, o.subDetail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); - } - - } - - @Block() - public static class SubDetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an additional service or product or charge." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an additional service or product or charge." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - private static final long serialVersionUID = 122809194L; - - public SubDetailComponent() { - super(); - } - - public SubDetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public SubDetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public SubDetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public SubDetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (The fee for an additional service or product or charge.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public SubDetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public SubDetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public SubDetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public SubDetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public SubDetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public SubDetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - } - - public SubDetailComponent copy() { - SubDetailComponent dst = new SubDetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()); - } - - } - - /** - * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected List identifier; - - /** - * The version of the specification on which this instance relies. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) - protected Coding ruleset; - - /** - * The version of the specification from which the original instance was created. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) - protected Coding originalRuleset; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateTimeType created; - - /** - * Insurer Identifier, typical BIN number (6 digit). - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) - */ - protected Organization targetTarget; - - /** - * The provider which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Organization organizationTarget; - - /** - * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) - protected Enumeration use; - - /** - * Immediate (STAT), best effort (NORMAL), deferred (DEFER). - */ - @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) - protected Coding priority; - - /** - * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. - */ - @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) - protected Coding fundsReserve; - - /** - * Person who created the invoice/claim/pre-determination or pre-authorization. - */ - @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; - - /** - * Facility where the services were provided. - */ - @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; - - /** - * Prescription to support the dispensing of pharmacy services, medications or products. - */ - @Child(name = "prescription", type = {MedicationPrescription.class}, order = 12, min = 0, max = 1) - @Description(shortDefinition="Current Prescription", formalDefinition="Prescription to support the dispensing of pharmacy services, medications or products." ) - protected Reference prescription; - - /** - * The actual object that is the target of the reference (Prescription to support the dispensing of pharmacy services, medications or products.) - */ - protected MedicationPrescription prescriptionTarget; - - /** - * Original prescription to support the dispensing of pharmacy services, medications or products. - */ - @Child(name = "originalPrescription", type = {MedicationPrescription.class}, order = 13, min = 0, max = 1) - @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription to support the dispensing of pharmacy services, medications or products." ) - protected Reference originalPrescription; - - /** - * The actual object that is the target of the reference (Original prescription to support the dispensing of pharmacy services, medications or products.) - */ - protected MedicationPrescription originalPrescriptionTarget; - - /** - * The party to be reimbursed for the services. - */ - @Child(name = "payee", type = {}, order = 14, min = 0, max = 1) - @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) - protected PayeeComponent payee; - - /** - * The referral resource which lists the date, practitioner, reason and other supporting information. - */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 15, min = 0, max = 1) - @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; - - /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - protected ReferralRequest referralTarget; - - /** - * Ordered list of patient diagnosis for which care is sought. - */ - @Child(name = "diagnosis", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) - protected List diagnosis; - - /** - * List of patient conditions for which care is sought. - */ - @Child(name = "condition", type = {Coding.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) - protected List condition; - - /** - * Patient Resource. - */ - @Child(name = "patient", type = {Patient.class}, order = 18, min = 1, max = 1) - @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; - - /** - * Financial instrument by which payment information for health care. - */ - @Child(name = "coverage", type = {}, order = 19, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected List coverage; - - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order = 20, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order = 21, min = 0, max = 1) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - - /** - * Date of an accident which these services are addressing. - */ - @Child(name = "accident", type = {DateType.class}, order = 22, min = 0, max = 1) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) - protected DateType accident; - - /** - * Type of accident: work, auto, etc. - */ - @Child(name = "accidentType", type = {Coding.class}, order = 23, min = 0, max = 1) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) - protected Coding accidentType; - - /** - * A list of intervention and exception codes which may influence the adjudication of the claim. - */ - @Child(name = "interventionException", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) - protected List interventionException; - - /** - * First tier of goods and services. - */ - @Child(name = "item", type = {}, order = 25, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) - protected List item; - - /** - * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. - */ - @Child(name = "additionalMaterials", type = {Coding.class}, order = 26, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) - protected List additionalMaterials; - - private static final long serialVersionUID = -12435566L; - - public PharmacyClaim() { - super(); - } - - public PharmacyClaim(Reference patient) { - super(); - this.patient = patient; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public PharmacyClaim setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public PharmacyClaim setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). 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 PharmacyClaim.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 when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public PharmacyClaim setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public PharmacyClaim 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 #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public PharmacyClaim setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public PharmacyClaim setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public PharmacyClaim setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public PharmacyClaim setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public PharmacyClaim setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public PharmacyClaim setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public Enumeration getUseElement() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.use"); - else if (Configuration.doAutoCreate()) - this.use = new Enumeration(new UseLinkEnumFactory()); // bb - return this.use; - } - - public boolean hasUseElement() { - return this.use != null && !this.use.isEmpty(); - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public PharmacyClaim setUseElement(Enumeration value) { - this.use = value; - return this; - } - - /** - * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public UseLink getUse() { - return this.use == null ? null : this.use.getValue(); - } - - /** - * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public PharmacyClaim setUse(UseLink value) { - if (value == null) - this.use = null; - else { - if (this.use == null) - this.use = new Enumeration(new UseLinkEnumFactory()); - this.use.setValue(value); - } - return this; - } - - /** - * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public Coding getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new Coding(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public PharmacyClaim setPriority(Coding value) { - this.priority = value; - return this; - } - - /** - * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public Coding getFundsReserve() { - if (this.fundsReserve == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.fundsReserve"); - else if (Configuration.doAutoCreate()) - this.fundsReserve = new Coding(); // cc - return this.fundsReserve; - } - - public boolean hasFundsReserve() { - return this.fundsReserve != null && !this.fundsReserve.isEmpty(); - } - - /** - * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public PharmacyClaim setFundsReserve(Coding value) { - this.fundsReserve = value; - return this; - } - - /** - * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc - return this.enterer; - } - - public boolean hasEnterer() { - return this.enterer != null && !this.enterer.isEmpty(); - } - - /** - * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public PharmacyClaim setEnterer(Reference value) { - this.enterer = value; - return this; - } - - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public PharmacyClaim setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - - /** - * @return {@link #facility} (Facility where the services were provided.) - */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc - return this.facility; - } - - public boolean hasFacility() { - return this.facility != null && !this.facility.isEmpty(); - } - - /** - * @param value {@link #facility} (Facility where the services were provided.) - */ - public PharmacyClaim setFacility(Reference value) { - this.facility = value; - return this; - } - - /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; - } - - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public PharmacyClaim setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #prescription} (Prescription to support the dispensing of pharmacy services, medications or products.) - */ - public Reference getPrescription() { - if (this.prescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.prescription"); - else if (Configuration.doAutoCreate()) - this.prescription = new Reference(); // cc - return this.prescription; - } - - public boolean hasPrescription() { - return this.prescription != null && !this.prescription.isEmpty(); - } - - /** - * @param value {@link #prescription} (Prescription to support the dispensing of pharmacy services, medications or products.) - */ - public PharmacyClaim setPrescription(Reference value) { - this.prescription = value; - return this; - } - - /** - * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of pharmacy services, medications or products.) - */ - public MedicationPrescription getPrescriptionTarget() { - if (this.prescriptionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.prescription"); - else if (Configuration.doAutoCreate()) - this.prescriptionTarget = new MedicationPrescription(); // aa - return this.prescriptionTarget; - } - - /** - * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of pharmacy services, medications or products.) - */ - public PharmacyClaim setPrescriptionTarget(MedicationPrescription value) { - this.prescriptionTarget = value; - return this; - } - - /** - * @return {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) - */ - public Reference getOriginalPrescription() { - if (this.originalPrescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescription = new Reference(); // cc - return this.originalPrescription; - } - - public boolean hasOriginalPrescription() { - return this.originalPrescription != null && !this.originalPrescription.isEmpty(); - } - - /** - * @param value {@link #originalPrescription} (Original prescription to support the dispensing of pharmacy services, medications or products.) - */ - public PharmacyClaim setOriginalPrescription(Reference value) { - this.originalPrescription = value; - return this; - } - - /** - * @return {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) - */ - public MedicationPrescription getOriginalPrescriptionTarget() { - if (this.originalPrescriptionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescriptionTarget = new MedicationPrescription(); // aa - return this.originalPrescriptionTarget; - } - - /** - * @param value {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original prescription to support the dispensing of pharmacy services, medications or products.) - */ - public PharmacyClaim setOriginalPrescriptionTarget(MedicationPrescription value) { - this.originalPrescriptionTarget = value; - return this; - } - - /** - * @return {@link #payee} (The party to be reimbursed for the services.) - */ - public PayeeComponent getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new PayeeComponent(); // cc - return this.payee; - } - - public boolean hasPayee() { - return this.payee != null && !this.payee.isEmpty(); - } - - /** - * @param value {@link #payee} (The party to be reimbursed for the services.) - */ - public PharmacyClaim setPayee(PayeeComponent value) { - this.payee = value; - return this; - } - - /** - * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc - return this.referral; - } - - public boolean hasReferral() { - return this.referral != null && !this.referral.isEmpty(); - } - - /** - * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public PharmacyClaim setReferral(Reference value) { - this.referral = value; - return this; - } - - /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; - } - - /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public PharmacyClaim setReferralTarget(ReferralRequest value) { - this.referralTarget = value; - return this; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (DiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - // syntactic sugar - public DiagnosisComponent addDiagnosis() { //3 - DiagnosisComponent t = new DiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (Coding item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - // syntactic sugar - public Coding addCondition() { //3 - Coding t = new Coding(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - /** - * @return {@link #patient} (Patient Resource.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Patient Resource.) - */ - public PharmacyClaim setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public PharmacyClaim setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public List getCoverage() { - if (this.coverage == null) - this.coverage = new ArrayList(); - return this.coverage; - } - - public boolean hasCoverage() { - if (this.coverage == null) - return false; - for (CoverageComponent item : this.coverage) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - // syntactic sugar - public CoverageComponent addCoverage() { //3 - CoverageComponent t = new CoverageComponent(); - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return t; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public PharmacyClaim setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public PharmacyClaim setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - - /** - * @return {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public DateType getAccidentElement() { - if (this.accident == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.accident"); - else if (Configuration.doAutoCreate()) - this.accident = new DateType(); // bb - return this.accident; - } - - public boolean hasAccidentElement() { - return this.accident != null && !this.accident.isEmpty(); - } - - public boolean hasAccident() { - return this.accident != null && !this.accident.isEmpty(); - } - - /** - * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public PharmacyClaim setAccidentElement(DateType value) { - this.accident = value; - return this; - } - - /** - * @return Date of an accident which these services are addressing. - */ - public Date getAccident() { - return this.accident == null ? null : this.accident.getValue(); - } - - /** - * @param value Date of an accident which these services are addressing. - */ - public PharmacyClaim setAccident(Date value) { - if (value == null) - this.accident = null; - else { - if (this.accident == null) - this.accident = new DateType(); - this.accident.setValue(value); - } - return this; - } - - /** - * @return {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public Coding getAccidentType() { - if (this.accidentType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PharmacyClaim.accidentType"); - else if (Configuration.doAutoCreate()) - this.accidentType = new Coding(); // cc - return this.accidentType; - } - - public boolean hasAccidentType() { - return this.accidentType != null && !this.accidentType.isEmpty(); - } - - /** - * @param value {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public PharmacyClaim setAccidentType(Coding value) { - this.accidentType = value; - return this; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - public List getInterventionException() { - if (this.interventionException == null) - this.interventionException = new ArrayList(); - return this.interventionException; - } - - public boolean hasInterventionException() { - if (this.interventionException == null) - return false; - for (Coding item : this.interventionException) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - // syntactic sugar - public Coding addInterventionException() { //3 - Coding t = new Coding(); - if (this.interventionException == null) - this.interventionException = new ArrayList(); - this.interventionException.add(t); - return t; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (ItemsComponent item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - // syntactic sugar - public ItemsComponent addItem() { //3 - ItemsComponent t = new ItemsComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - public List getAdditionalMaterials() { - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - return this.additionalMaterials; - } - - public boolean hasAdditionalMaterials() { - if (this.additionalMaterials == null) - return false; - for (Coding item : this.additionalMaterials) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - // syntactic sugar - public Coding addAdditionalMaterials() { //3 - Coding t = new Coding(); - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); - childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("prescription", "Reference(MedicationPrescription)", "Prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, prescription)); - childrenList.add(new Property("originalPrescription", "Reference(MedicationPrescription)", "Original prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); - childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); - childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - childrenList.add(new Property("condition", "Coding", "List of patient conditions for which care is sought.", 0, java.lang.Integer.MAX_VALUE, condition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); - childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); - childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); - } - - public PharmacyClaim copy() { - PharmacyClaim dst = new PharmacyClaim(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.use = use == null ? null : use.copy(); - dst.priority = priority == null ? null : priority.copy(); - dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); - dst.enterer = enterer == null ? null : enterer.copy(); - dst.facility = facility == null ? null : facility.copy(); - dst.prescription = prescription == null ? null : prescription.copy(); - dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); - dst.payee = payee == null ? null : payee.copy(); - dst.referral = referral == null ? null : referral.copy(); - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (DiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (condition != null) { - dst.condition = new ArrayList(); - for (Coding i : condition) - dst.condition.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - if (coverage != null) { - dst.coverage = new ArrayList(); - for (CoverageComponent i : coverage) - dst.coverage.add(i.copy()); - }; - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); - dst.accident = accident == null ? null : accident.copy(); - dst.accidentType = accidentType == null ? null : accidentType.copy(); - if (interventionException != null) { - dst.interventionException = new ArrayList(); - for (Coding i : interventionException) - dst.interventionException.add(i.copy()); - }; - if (item != null) { - dst.item = new ArrayList(); - for (ItemsComponent i : item) - dst.item.add(i.copy()); - }; - if (additionalMaterials != null) { - dst.additionalMaterials = new ArrayList(); - for (Coding i : additionalMaterials) - dst.additionalMaterials.add(i.copy()); - }; - return dst; - } - - protected PharmacyClaim typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PharmacyClaim)) - return false; - PharmacyClaim o = (PharmacyClaim) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(prescription, o.prescription, true) && compareDeep(originalPrescription, o.originalPrescription, true) - && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) - && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) - && compareDeep(accidentType, o.accidentType, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(item, o.item, true) && compareDeep(additionalMaterials, o.additionalMaterials, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PharmacyClaim)) - return false; - PharmacyClaim o = (PharmacyClaim) other; - return compareValues(created, o.created, true) && compareValues(use, o.use, true) && compareValues(school, o.school, true) - && compareValues(accident, o.accident, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (prescription == null || prescription.isEmpty()) - && (originalPrescription == null || originalPrescription.isEmpty()) && (payee == null || payee.isEmpty()) - && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) - && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) - && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.PharmacyClaim; - } - - @SearchParamDefinition(name = "identifier", path = "PharmacyClaim.identifier", description = "The primary identifier of the financial resource", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "use", path = "PharmacyClaim.use", description = "The kind of financial resource", type = "token") - public static final String SP_USE = "use"; - @SearchParamDefinition(name="patient", path="PharmacyClaim.patient", description="Patient", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="priority", path="PharmacyClaim.priority", description="Processing priority requested", type="token" ) - public static final String SP_PRIORITY = "priority"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PositiveIntType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PositiveIntType.java new file mode 100644 index 00000000000..fdc04b3f487 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/PositiveIntType.java @@ -0,0 +1,94 @@ +/* +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. + + */ +/** + * + */ +package org.hl7.fhir.instance.model; + +import org.hl7.fhir.instance.model.annotations.DatatypeDef; + +/** + * Primitive type "integer" in FHIR: A signed 32-bit integer + */ +@DatatypeDef(name = "positiveInt") +public class PositiveIntType extends IntegerType { + + /** + * + */ + private static final long serialVersionUID = 1686497884249402429L; + + /** + * Constructor + */ + public PositiveIntType() { + // nothing + } + + /** + * Constructor + */ + public PositiveIntType(int theInteger) { + setValue(theInteger); + } + + /** + * Constructor + * + * @param theIntegerAsString + * A string representation of an integer + * @throws IllegalArgumentException + * If the string is not a valid integer representation + */ + public PositiveIntType(String theIntegerAsString) { + setValueAsString(theIntegerAsString); + } + + /** + * Constructor + * + * @param theValue The value + * @throws IllegalArgumentException If the value is too large to fit in a signed integer + */ + public PositiveIntType(Long theValue) { + if (theValue < 1 || theValue > java.lang.Integer.MAX_VALUE) { + throw new IllegalArgumentException + (theValue + " cannot be cast to int without changing its value."); + } + if(theValue!=null) { + setValue((int)theValue.longValue()); + } + } + + @Override + public PositiveIntType copy() { + return new PositiveIntType(getValue()); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java index 0bd59ae4a4f..d786763186b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Procedure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; @@ -40,11 +40,111 @@ import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; /** - * An action that is performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy. + * An action that is or was performed on a patient. This can be a physical 'thing' like an operation, or less invasive like counseling or hypnotherapy. */ @ResourceDef(name="Procedure", profile="http://hl7.org/fhir/Profile/Procedure") public class Procedure extends DomainResource { + public enum ProcedureStatus { + /** + * The procedure is still occurring. + */ + INPROGRESS, + /** + * The procedure was terminated without completing successfully. + */ + ABORTED, + /** + * All actions involved in the procedure have taken place. + */ + COMPLETED, + /** + * The statement was entered in error and Is not valid. + */ + ENTEREDINERROR, + /** + * added to help the parsers + */ + NULL; + public static ProcedureStatus fromCode(String codeString) throws Exception { + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("aborted".equals(codeString)) + return ABORTED; + if ("completed".equals(codeString)) + return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; + throw new Exception("Unknown ProcedureStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INPROGRESS: return "in-progress"; + case ABORTED: return "aborted"; + case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INPROGRESS: return ""; + case ABORTED: return ""; + case COMPLETED: return ""; + case ENTEREDINERROR: return ""; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INPROGRESS: return "The procedure is still occurring."; + case ABORTED: return "The procedure was terminated without completing successfully."; + case COMPLETED: return "All actions involved in the procedure have taken place."; + case ENTEREDINERROR: return "The statement was entered in error and Is not valid."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INPROGRESS: return "In Progress"; + case ABORTED: return "Aborted"; + case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered In Error"; + default: return "?"; + } + } + } + + public static class ProcedureStatusEnumFactory implements EnumFactory { + public ProcedureStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("in-progress".equals(codeString)) + return ProcedureStatus.INPROGRESS; + if ("aborted".equals(codeString)) + return ProcedureStatus.ABORTED; + if ("completed".equals(codeString)) + return ProcedureStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ProcedureStatus.ENTEREDINERROR; + throw new IllegalArgumentException("Unknown ProcedureStatus code '"+codeString+"'"); + } + public String toCode(ProcedureStatus code) { + if (code == ProcedureStatus.INPROGRESS) + return "in-progress"; + if (code == ProcedureStatus.ABORTED) + return "aborted"; + if (code == ProcedureStatus.COMPLETED) + return "completed"; + if (code == ProcedureStatus.ENTEREDINERROR) + return "entered-in-error"; + return "?"; + } + } + public enum ProcedureRelationshipType { /** * This procedure had to be performed because of the related one. @@ -90,8 +190,8 @@ public class Procedure extends DomainResource { } public String getDisplay() { switch (this) { - case CAUSEDBY: return "caused-by"; - case BECAUSEOF: return "because-of"; + case CAUSEDBY: return "Caused By"; + case BECAUSEOF: return "Because Of"; default: return "?"; } } @@ -117,28 +217,123 @@ public class Procedure extends DomainResource { } } + @Block() + public static class ProcedureBodySiteComponent extends BackboneElement { + /** + * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion. + */ + @Child(name ="site", type={CodeableConcept.class, BodySite.class}, order=1, min=1, max=1) + @Description(shortDefinition="Precise location details", formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion." ) + protected Type site; + + private static final long serialVersionUID = 1429072605L; + + public ProcedureBodySiteComponent() { + super(); + } + + public ProcedureBodySiteComponent(Type site) { + super(); + this.site = site; + } + + /** + * @return {@link #site} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + public Type getSite() { + return this.site; + } + + /** + * @return {@link #site} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + public CodeableConcept getSiteCodeableConcept() throws Exception { + if (!(this.site instanceof CodeableConcept)) + throw new Exception("Type mismatch: the type CodeableConcept was expected, but "+this.site.getClass().getName()+" was encountered"); + return (CodeableConcept) this.site; + } + + /** + * @return {@link #site} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + public Reference getSiteReference() throws Exception { + if (!(this.site instanceof Reference)) + throw new Exception("Type mismatch: the type Reference was expected, but "+this.site.getClass().getName()+" was encountered"); + return (Reference) this.site; + } + + public boolean hasSite() { + return this.site != null && !this.site.isEmpty(); + } + + /** + * @param value {@link #site} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) + */ + public ProcedureBodySiteComponent setSite(Type value) { + this.site = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("site[x]", "CodeableConcept|Reference(BodySite)", "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.", 0, java.lang.Integer.MAX_VALUE, site)); + } + + public ProcedureBodySiteComponent copy() { + ProcedureBodySiteComponent dst = new ProcedureBodySiteComponent(); + copyValues(dst); + dst.site = site == null ? null : site.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureBodySiteComponent)) + return false; + ProcedureBodySiteComponent o = (ProcedureBodySiteComponent) other; + return compareDeep(site, o.site, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureBodySiteComponent)) + return false; + ProcedureBodySiteComponent o = (ProcedureBodySiteComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (site == null || site.isEmpty()); + } + + } + @Block() public static class ProcedurePerformerComponent extends BackboneElement { /** * The practitioner who was involved in the procedure. */ - @Child(name="person", type={Practitioner.class}, order=1, min=0, max=1) + @Child(name ="person", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=1, min=0, max=1) @Description(shortDefinition="The reference to the practitioner", formalDefinition="The practitioner who was involved in the procedure." ) protected Reference person; /** * The actual object that is the target of the reference (The practitioner who was involved in the procedure.) */ - protected Practitioner personTarget; + protected Resource personTarget; /** * E.g. surgeon, anaethetist, endoscopist. */ - @Child(name="role", type={CodeableConcept.class}, order=2, min=0, max=1) + @Child(name ="role", type={CodeableConcept.class}, order=2, min=0, max=1) @Description(shortDefinition="The role the person was in", formalDefinition="E.g. surgeon, anaethetist, endoscopist." ) protected CodeableConcept role; - private static final long serialVersionUID = -749890249L; + private static final long serialVersionUID = -1975652413L; public ProcedurePerformerComponent() { super(); @@ -171,19 +366,14 @@ public class Procedure extends DomainResource { /** * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who was involved in the procedure.) */ - public Practitioner getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcedurePerformerComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Practitioner(); // aa + public Resource getPersonTarget() { return this.personTarget; } /** * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who was involved in the procedure.) */ - public ProcedurePerformerComponent setPersonTarget(Practitioner value) { + public ProcedurePerformerComponent setPersonTarget(Resource value) { this.personTarget = value; return this; } @@ -214,7 +404,7 @@ public class Procedure extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("person", "Reference(Practitioner)", "The practitioner who was involved in the procedure.", 0, java.lang.Integer.MAX_VALUE, person)); + childrenList.add(new Property("person", "Reference(Practitioner|Patient|RelatedPerson)", "The practitioner who was involved in the procedure.", 0, java.lang.Integer.MAX_VALUE, person)); childrenList.add(new Property("role", "CodeableConcept", "E.g. surgeon, anaethetist, endoscopist.", 0, java.lang.Integer.MAX_VALUE, role)); } @@ -258,14 +448,14 @@ public class Procedure extends DomainResource { /** * The nature of the relationship. */ - @Child(name="type", type={CodeType.class}, order=1, min=0, max=1) + @Child(name ="type", type={CodeType.class}, order=1, min=0, max=1) @Description(shortDefinition="caused-by | because-of", formalDefinition="The nature of the relationship." ) protected Enumeration type; /** * The related item - e.g. a procedure. */ - @Child(name="target", type={AllergyIntolerance.class, CarePlan.class, Condition.class, DiagnosticReport.class, FamilyHistory.class, ImagingStudy.class, Immunization.class, ImmunizationRecommendation.class, MedicationAdministration.class, MedicationDispense.class, MedicationPrescription.class, MedicationStatement.class, Observation.class, Procedure.class}, order=2, min=0, max=1) + @Child(name ="target", type={AllergyIntolerance.class, CarePlan.class, Condition.class, DiagnosticReport.class, FamilyMemberHistory.class, ImagingStudy.class, Immunization.class, ImmunizationRecommendation.class, MedicationAdministration.class, MedicationDispense.class, MedicationPrescription.class, MedicationStatement.class, Observation.class, Procedure.class}, order=2, min=0, max=1) @Description(shortDefinition="The related item - e.g. a procedure", formalDefinition="The related item - e.g. a procedure." ) protected Reference target; @@ -371,7 +561,7 @@ public class Procedure extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "The nature of the relationship.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("target", "Reference(AllergyIntolerance|CarePlan|Condition|DiagnosticReport|FamilyHistory|ImagingStudy|Immunization|ImmunizationRecommendation|MedicationAdministration|MedicationDispense|MedicationPrescription|MedicationStatement|Observation|Procedure)", "The related item - e.g. a procedure.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("target", "Reference(AllergyIntolerance|CarePlan|Condition|DiagnosticReport|FamilyMemberHistory|ImagingStudy|Immunization|ImmunizationRecommendation|MedicationAdministration|MedicationDispense|MedicationPrescription|MedicationStatement|Observation|Procedure)", "The related item - e.g. a procedure.", 0, java.lang.Integer.MAX_VALUE, target)); } public ProcedureRelatedItemComponent copy() { @@ -407,19 +597,160 @@ public class Procedure extends DomainResource { ; } + } + + @Block() + public static class ProcedureDeviceComponent extends BackboneElement { + /** + * The kind of change that happened to the device during the procedure. + */ + @Child(name ="action", type={CodeableConcept.class}, order=1, min=0, max=1) + @Description(shortDefinition="Kind of change to device", formalDefinition="The kind of change that happened to the device during the procedure." ) + protected CodeableConcept action; + + /** + * The device that was manipulated (changed) during the procedure. + */ + @Child(name ="manipulated", type={Device.class}, order=2, min=1, max=1) + @Description(shortDefinition="Device that was changed", formalDefinition="The device that was manipulated (changed) during the procedure." ) + protected Reference manipulated; + + /** + * The actual object that is the target of the reference (The device that was manipulated (changed) during the procedure.) + */ + protected Device manipulatedTarget; + + private static final long serialVersionUID = 1779937807L; + + public ProcedureDeviceComponent() { + super(); + } + + public ProcedureDeviceComponent(Reference manipulated) { + super(); + this.manipulated = manipulated; + } + + /** + * @return {@link #action} (The kind of change that happened to the device during the procedure.) + */ + public CodeableConcept getAction() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureDeviceComponent.action"); + else if (Configuration.doAutoCreate()) + this.action = new CodeableConcept(); // cc + return this.action; + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (The kind of change that happened to the device during the procedure.) + */ + public ProcedureDeviceComponent setAction(CodeableConcept value) { + this.action = value; + return this; + } + + /** + * @return {@link #manipulated} (The device that was manipulated (changed) during the procedure.) + */ + public Reference getManipulated() { + if (this.manipulated == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureDeviceComponent.manipulated"); + else if (Configuration.doAutoCreate()) + this.manipulated = new Reference(); // cc + return this.manipulated; + } + + public boolean hasManipulated() { + return this.manipulated != null && !this.manipulated.isEmpty(); + } + + /** + * @param value {@link #manipulated} (The device that was manipulated (changed) during the procedure.) + */ + public ProcedureDeviceComponent setManipulated(Reference value) { + this.manipulated = value; + return this; + } + + /** + * @return {@link #manipulated} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device that was manipulated (changed) during the procedure.) + */ + public Device getManipulatedTarget() { + if (this.manipulatedTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureDeviceComponent.manipulated"); + else if (Configuration.doAutoCreate()) + this.manipulatedTarget = new Device(); // aa + return this.manipulatedTarget; + } + + /** + * @param value {@link #manipulated} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device that was manipulated (changed) during the procedure.) + */ + public ProcedureDeviceComponent setManipulatedTarget(Device value) { + this.manipulatedTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "CodeableConcept", "The kind of change that happened to the device during the procedure.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("manipulated", "Reference(Device)", "The device that was manipulated (changed) during the procedure.", 0, java.lang.Integer.MAX_VALUE, manipulated)); + } + + public ProcedureDeviceComponent copy() { + ProcedureDeviceComponent dst = new ProcedureDeviceComponent(); + copyValues(dst); + dst.action = action == null ? null : action.copy(); + dst.manipulated = manipulated == null ? null : manipulated.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureDeviceComponent)) + return false; + ProcedureDeviceComponent o = (ProcedureDeviceComponent) other; + return compareDeep(action, o.action, true) && compareDeep(manipulated, o.manipulated, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureDeviceComponent)) + return false; + ProcedureDeviceComponent o = (ProcedureDeviceComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()) && (manipulated == null || manipulated.isEmpty()) + ; + } + } /** * This records identifiers associated with this procedure that are defined by business processed 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) + @Child(name ="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External Ids for this procedure", formalDefinition="This records identifiers associated with this procedure that are defined by business processed 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 person on whom the procedure was performed. */ - @Child(name = "patient", type = {Patient.class}, order = 1, min = 1, max = 1) + @Child(name ="patient", type={Patient.class}, order=1, min=1, max=1) @Description(shortDefinition="Who procedure was performed on", formalDefinition="The person on whom the procedure was performed." ) protected Reference patient; @@ -428,45 +759,59 @@ public class Procedure extends DomainResource { */ protected Patient patientTarget; + /** + * A code specifying the state of the procedure record. Generally this will be in-progress or completed state. + */ + @Child(name ="status", type={CodeType.class}, order=2, min=1, max=1) + @Description(shortDefinition="in-progress | aborted | completed | entered-in-error", formalDefinition="A code specifying the state of the procedure record. Generally this will be in-progress or completed state." ) + protected Enumeration status; + + /** + * A code that classifies the procedure for searching, sorting and display purposes. + */ + @Child(name ="category", type={CodeableConcept.class}, order=3, min=0, max=1) + @Description(shortDefinition="Classification of the procedure", formalDefinition="A code that classifies the procedure for searching, sorting and display purposes." ) + protected CodeableConcept category; + /** * The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded. */ - @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 1, max = 1) + @Child(name ="type", type={CodeableConcept.class}, order=4, min=1, max=1) @Description(shortDefinition="Identification of the procedure", formalDefinition="The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded." ) protected CodeableConcept type; /** * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion. */ - @Child(name = "bodySite", type = {CodeableConcept.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="bodySite", type={}, order=5, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Precise location details", formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion." ) - protected List bodySite; + protected List bodySite; /** * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text. */ - @Child(name = "indication", type = {CodeableConcept.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="indication", type={CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Reason procedure performed", formalDefinition="The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text." ) protected List indication; /** * Limited to 'real' people rather than equipment. */ - @Child(name = "performer", type = {}, order = 5, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="performer", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="The people who performed the procedure", formalDefinition="Limited to 'real' people rather than equipment." ) protected List performer; /** - * The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured. + * The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured. */ - @Child(name = "date", type = {Period.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="The date the procedure was performed", formalDefinition="The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." ) - protected Period date; + @Child(name ="performed", type={DateTimeType.class, Period.class}, order=8, min=0, max=1) + @Description(shortDefinition="Date/Period the procedure was performed", formalDefinition="The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." ) + protected Type performed; /** * The encounter during which the procedure was performed. */ - @Child(name = "encounter", type = {Encounter.class}, order = 7, min = 0, max = 1) + @Child(name ="encounter", type={Encounter.class}, order=9, min=0, max=1) @Description(shortDefinition="The encounter when procedure performed", formalDefinition="The encounter during which the procedure was performed." ) protected Reference encounter; @@ -476,16 +821,28 @@ public class Procedure extends DomainResource { protected Encounter encounterTarget; /** - * What was the outcome of the procedure - did it resolve reasons why the procedure was performed?. + * The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant. */ - @Child(name = "outcome", type = {StringType.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="What was result of procedure?", formalDefinition="What was the outcome of the procedure - did it resolve reasons why the procedure was performed?." ) - protected StringType outcome; + @Child(name ="location", type={Location.class}, order=10, min=0, max=1) + @Description(shortDefinition="Where the procedure happened", formalDefinition="The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant." ) + protected Reference location; + + /** + * The actual object that is the target of the reference (The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.) + */ + protected Location locationTarget; + + /** + * What was the outcome of the procedure - did it resolve reasons why the procedure was performed? + */ + @Child(name ="outcome", type={CodeableConcept.class}, order=11, min=0, max=1) + @Description(shortDefinition="What was result of procedure?", formalDefinition="What was the outcome of the procedure - did it resolve reasons why the procedure was performed?" ) + protected CodeableConcept outcome; /** * This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies. */ - @Child(name = "report", type = {DiagnosticReport.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="report", type={DiagnosticReport.class}, order=12, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Any report that results from the procedure", formalDefinition="This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies." ) protected List report; /** @@ -497,40 +854,60 @@ public class Procedure extends DomainResource { /** * Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues. */ - @Child(name = "complication", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="complication", type={CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Complication following the procedure", formalDefinition="Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues." ) protected List complication; /** * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used. */ - @Child(name = "followUp", type = {StringType.class}, order = 11, min = 0, max = 1) + @Child(name ="followUp", type={CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Instructions for follow up", formalDefinition="If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used." ) - protected StringType followUp; + protected List followUp; /** * Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure. */ - @Child(name = "relatedItem", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="relatedItem", type={}, order=15, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="A procedure that is related to this one", formalDefinition="Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure." ) protected List relatedItem; /** * Any other notes about the procedure - e.g. the operative notes. */ - @Child(name = "notes", type = {StringType.class}, order = 13, min = 0, max = 1) + @Child(name ="notes", type={StringType.class}, order=16, min=0, max=1) @Description(shortDefinition="Additional information about procedure", formalDefinition="Any other notes about the procedure - e.g. the operative notes." ) protected StringType notes; - private static final long serialVersionUID = 1783571207L; + /** + * A device change during the procedure. + */ + @Child(name ="device", type={}, order=17, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Device changed in procedure", formalDefinition="A device change during the procedure." ) + protected List device; + + /** + * Identifies medications, devices and other substance used as part of the procedure. + */ + @Child(name ="used", type={Device.class, Medication.class, Substance.class}, order=18, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Items used during procedure", formalDefinition="Identifies medications, devices and other substance used as part of the procedure." ) + protected List used; + /** + * The actual objects that are the target of the reference (Identifies medications, devices and other substance used as part of the procedure.) + */ + protected List usedTarget; + + + private static final long serialVersionUID = -1258770542L; public Procedure() { super(); } - public Procedure(Reference patient, CodeableConcept type) { + public Procedure(Reference patient, Enumeration status, CodeableConcept type) { super(); this.patient = patient; + this.status = status; this.type = type; } @@ -564,6 +941,16 @@ public class Procedure extends DomainResource { return t; } + // syntactic sugar + public Procedure addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + /** * @return {@link #patient} (The person on whom the procedure was performed.) */ @@ -608,6 +995,75 @@ public class Procedure extends DomainResource { return this; } + /** + * @return {@link #status} (A code specifying the state of the procedure record. Generally this will be in-progress or completed state.). 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 Procedure.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ProcedureStatusEnumFactory()); // 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} (A code specifying the state of the procedure record. Generally this will be in-progress or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Procedure setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return A code specifying the state of the procedure record. Generally this will be in-progress or completed state. + */ + public ProcedureStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value A code specifying the state of the procedure record. Generally this will be in-progress or completed state. + */ + public Procedure setStatus(ProcedureStatus value) { + if (this.status == null) + this.status = new Enumeration(new ProcedureStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #category} (A code that classifies the procedure for searching, sorting and display purposes.) + */ + public CodeableConcept getCategory() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.category"); + else if (Configuration.doAutoCreate()) + this.category = new CodeableConcept(); // cc + return this.category; + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (A code that classifies the procedure for searching, sorting and display purposes.) + */ + public Procedure setCategory(CodeableConcept value) { + this.category = value; + return this; + } + /** * @return {@link #type} (The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded.) */ @@ -635,16 +1091,16 @@ public class Procedure extends DomainResource { /** * @return {@link #bodySite} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) */ - public List getBodySite() { + public List getBodySite() { if (this.bodySite == null) - this.bodySite = new ArrayList(); + this.bodySite = new ArrayList(); return this.bodySite; } public boolean hasBodySite() { if (this.bodySite == null) return false; - for (CodeableConcept item : this.bodySite) + for (ProcedureBodySiteComponent item : this.bodySite) if (!item.isEmpty()) return true; return false; @@ -654,14 +1110,24 @@ public class Procedure extends DomainResource { * @return {@link #bodySite} (Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.) */ // syntactic sugar - public CodeableConcept addBodySite() { //3 - CodeableConcept t = new CodeableConcept(); + public ProcedureBodySiteComponent addBodySite() { //3 + ProcedureBodySiteComponent t = new ProcedureBodySiteComponent(); if (this.bodySite == null) - this.bodySite = new ArrayList(); + this.bodySite = new ArrayList(); this.bodySite.add(t); return t; } + // syntactic sugar + public Procedure addBodySite(ProcedureBodySiteComponent t) { //3 + if (t == null) + return this; + if (this.bodySite == null) + this.bodySite = new ArrayList(); + this.bodySite.add(t); + return this; + } + /** * @return {@link #indication} (The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.) */ @@ -692,6 +1158,16 @@ public class Procedure extends DomainResource { return t; } + // syntactic sugar + public Procedure addIndication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.indication == null) + this.indication = new ArrayList(); + this.indication.add(t); + return this; + } + /** * @return {@link #performer} (Limited to 'real' people rather than equipment.) */ @@ -722,27 +1198,50 @@ public class Procedure extends DomainResource { return t; } - /** - * @return {@link #date} (The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) - */ - public Period getDate() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Procedure.date"); - else if (Configuration.doAutoCreate()) - this.date = new Period(); // cc - return this.date; - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); + // syntactic sugar + public Procedure addPerformer(ProcedurePerformerComponent t) { //3 + if (t == null) + return this; + if (this.performer == null) + this.performer = new ArrayList(); + this.performer.add(t); + return this; } /** - * @param value {@link #date} (The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) */ - public Procedure setDate(Period value) { - this.date = value; + public Type getPerformed() { + return this.performed; + } + + /** + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public DateTimeType getPerformedDateTimeType() throws Exception { + if (!(this.performed instanceof DateTimeType)) + throw new Exception("Type mismatch: the type DateTimeType was expected, but "+this.performed.getClass().getName()+" was encountered"); + return (DateTimeType) this.performed; + } + + /** + * @return {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public Period getPerformedPeriod() throws Exception { + if (!(this.performed instanceof Period)) + throw new Exception("Type mismatch: the type Period was expected, but "+this.performed.getClass().getName()+" was encountered"); + return (Period) this.performed; + } + + public boolean hasPerformed() { + return this.performed != null && !this.performed.isEmpty(); + } + + /** + * @param value {@link #performed} (The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.) + */ + public Procedure setPerformed(Type value) { + this.performed = value; return this; } @@ -791,54 +1290,73 @@ public class Procedure extends DomainResource { } /** - * @return {@link #outcome} (What was the outcome of the procedure - did it resolve reasons why the procedure was performed?.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + * @return {@link #location} (The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.) */ - public StringType getOutcomeElement() { + public Reference getLocation() { + if (this.location == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.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 procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Procedure setLocation(Reference value) { + this.location = value; + return this; + } + + /** + * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Location getLocationTarget() { + if (this.locationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Procedure.location"); + else if (Configuration.doAutoCreate()) + this.locationTarget = new Location(); // aa + return this.locationTarget; + } + + /** + * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.) + */ + public Procedure setLocationTarget(Location value) { + this.locationTarget = value; + return this; + } + + /** + * @return {@link #outcome} (What was the outcome of the procedure - did it resolve reasons why the procedure was performed?) + */ + public CodeableConcept getOutcome() { if (this.outcome == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Procedure.outcome"); else if (Configuration.doAutoCreate()) - this.outcome = new StringType(); // bb + this.outcome = new CodeableConcept(); // cc return this.outcome; } - public boolean hasOutcomeElement() { - return this.outcome != null && !this.outcome.isEmpty(); - } - public boolean hasOutcome() { return this.outcome != null && !this.outcome.isEmpty(); } /** - * @param value {@link #outcome} (What was the outcome of the procedure - did it resolve reasons why the procedure was performed?.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value + * @param value {@link #outcome} (What was the outcome of the procedure - did it resolve reasons why the procedure was performed?) */ - public Procedure setOutcomeElement(StringType value) { + public Procedure setOutcome(CodeableConcept value) { this.outcome = value; return this; } - /** - * @return What was the outcome of the procedure - did it resolve reasons why the procedure was performed?. - */ - public String getOutcome() { - return this.outcome == null ? null : this.outcome.getValue(); - } - - /** - * @param value What was the outcome of the procedure - did it resolve reasons why the procedure was performed?. - */ - public Procedure setOutcome(String value) { - if (Utilities.noString(value)) - this.outcome = null; - else { - if (this.outcome == null) - this.outcome = new StringType(); - this.outcome.setValue(value); - } - return this; - } - /** * @return {@link #report} (This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies.) */ @@ -869,6 +1387,16 @@ public class Procedure extends DomainResource { return t; } + // syntactic sugar + public Procedure addReport(Reference t) { //3 + if (t == null) + return this; + if (this.report == null) + this.report = new ArrayList(); + this.report.add(t); + return this; + } + /** * @return {@link #report} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies.) */ @@ -920,52 +1448,53 @@ public class Procedure extends DomainResource { return t; } - /** - * @return {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.). This is the underlying object with id, value and extensions. The accessor "getFollowUp" gives direct access to the value - */ - public StringType getFollowUpElement() { - if (this.followUp == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Procedure.followUp"); - else if (Configuration.doAutoCreate()) - this.followUp = new StringType(); // bb - return this.followUp; - } - - public boolean hasFollowUpElement() { - return this.followUp != null && !this.followUp.isEmpty(); - } - - public boolean hasFollowUp() { - return this.followUp != null && !this.followUp.isEmpty(); - } - - /** - * @param value {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.). This is the underlying object with id, value and extensions. The accessor "getFollowUp" gives direct access to the value - */ - public Procedure setFollowUpElement(StringType value) { - this.followUp = value; + // syntactic sugar + public Procedure addComplication(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.complication == null) + this.complication = new ArrayList(); + this.complication.add(t); return this; } /** - * @return If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used. + * @return {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.) */ - public String getFollowUp() { - return this.followUp == null ? null : this.followUp.getValue(); + public List getFollowUp() { + if (this.followUp == null) + this.followUp = new ArrayList(); + return this.followUp; + } + + public boolean hasFollowUp() { + if (this.followUp == null) + return false; + for (CodeableConcept item : this.followUp) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used. + * @return {@link #followUp} (If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.) */ - public Procedure setFollowUp(String value) { - if (Utilities.noString(value)) - this.followUp = null; - else { - if (this.followUp == null) - this.followUp = new StringType(); - this.followUp.setValue(value); - } + // syntactic sugar + public CodeableConcept addFollowUp() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.followUp == null) + this.followUp = new ArrayList(); + this.followUp.add(t); + return t; + } + + // syntactic sugar + public Procedure addFollowUp(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.followUp == null) + this.followUp = new ArrayList(); + this.followUp.add(t); return this; } @@ -999,6 +1528,16 @@ public class Procedure extends DomainResource { return t; } + // syntactic sugar + public Procedure addRelatedItem(ProcedureRelatedItemComponent t) { //3 + if (t == null) + return this; + if (this.relatedItem == null) + this.relatedItem = new ArrayList(); + this.relatedItem.add(t); + return this; + } + /** * @return {@link #notes} (Any other notes about the procedure - e.g. the operative notes.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value */ @@ -1048,22 +1587,116 @@ public class Procedure extends DomainResource { return this; } + /** + * @return {@link #device} (A device change during the procedure.) + */ + public List getDevice() { + if (this.device == null) + this.device = new ArrayList(); + return this.device; + } + + public boolean hasDevice() { + if (this.device == null) + return false; + for (ProcedureDeviceComponent item : this.device) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #device} (A device change during the procedure.) + */ + // syntactic sugar + public ProcedureDeviceComponent addDevice() { //3 + ProcedureDeviceComponent t = new ProcedureDeviceComponent(); + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return t; + } + + // syntactic sugar + public Procedure addDevice(ProcedureDeviceComponent t) { //3 + if (t == null) + return this; + if (this.device == null) + this.device = new ArrayList(); + this.device.add(t); + return this; + } + + /** + * @return {@link #used} (Identifies medications, devices and other substance used as part of the procedure.) + */ + public List getUsed() { + if (this.used == null) + this.used = new ArrayList(); + return this.used; + } + + public boolean hasUsed() { + if (this.used == null) + return false; + for (Reference item : this.used) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #used} (Identifies medications, devices and other substance used as part of the procedure.) + */ + // syntactic sugar + public Reference addUsed() { //3 + Reference t = new Reference(); + if (this.used == null) + this.used = new ArrayList(); + this.used.add(t); + return t; + } + + // syntactic sugar + public Procedure addUsed(Reference t) { //3 + if (t == null) + return this; + if (this.used == null) + this.used = new ArrayList(); + this.used.add(t); + return this; + } + + /** + * @return {@link #used} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies medications, devices and other substance used as part of the procedure.) + */ + public List getUsedTarget() { + if (this.usedTarget == null) + this.usedTarget = new ArrayList(); + return this.usedTarget; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this procedure that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("patient", "Reference(Patient)", "The person on whom the procedure was performed.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("status", "code", "A code specifying the state of the procedure record. Generally this will be in-progress or completed state.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("category", "CodeableConcept", "A code that classifies the procedure for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category)); childrenList.add(new Property("type", "CodeableConcept", "The specific procedure that is performed. Use text if the exact nature of the procedure can't be coded.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("bodySite", "CodeableConcept", "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.", 0, java.lang.Integer.MAX_VALUE, bodySite)); + childrenList.add(new Property("bodySite", "", "Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion.", 0, java.lang.Integer.MAX_VALUE, bodySite)); childrenList.add(new Property("indication", "CodeableConcept", "The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text.", 0, java.lang.Integer.MAX_VALUE, indication)); childrenList.add(new Property("performer", "", "Limited to 'real' people rather than equipment.", 0, java.lang.Integer.MAX_VALUE, performer)); - childrenList.add(new Property("date", "Period", "The dates over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("performed[x]", "dateTime|Period", "The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, java.lang.Integer.MAX_VALUE, performed)); childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter during which the procedure was performed.", 0, java.lang.Integer.MAX_VALUE, encounter)); - childrenList.add(new Property("outcome", "string", "What was the outcome of the procedure - did it resolve reasons why the procedure was performed?.", 0, java.lang.Integer.MAX_VALUE, outcome)); + childrenList.add(new Property("location", "Reference(Location)", "The location where the procedure actually happened. e.g. a newborn at home, a tracheostomy at a restaurant.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("outcome", "CodeableConcept", "What was the outcome of the procedure - did it resolve reasons why the procedure was performed?", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("report", "Reference(DiagnosticReport)", "This could be a histology result. There could potentially be multiple reports - e.g. if this was a procedure that made multiple biopsies.", 0, java.lang.Integer.MAX_VALUE, report)); childrenList.add(new Property("complication", "CodeableConcept", "Any complications that occurred during the procedure, or in the immediate post-operative period. These are generally tracked separately from the notes, which typically will describe the procedure itself rather than any 'post procedure' issues.", 0, java.lang.Integer.MAX_VALUE, complication)); - childrenList.add(new Property("followUp", "string", "If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.", 0, java.lang.Integer.MAX_VALUE, followUp)); + childrenList.add(new Property("followUp", "CodeableConcept", "If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or potentially could be more complex in which case the CarePlan resource can be used.", 0, java.lang.Integer.MAX_VALUE, followUp)); childrenList.add(new Property("relatedItem", "", "Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure.", 0, java.lang.Integer.MAX_VALUE, relatedItem)); childrenList.add(new Property("notes", "string", "Any other notes about the procedure - e.g. the operative notes.", 0, java.lang.Integer.MAX_VALUE, notes)); + childrenList.add(new Property("device", "", "A device change during the procedure.", 0, java.lang.Integer.MAX_VALUE, device)); + childrenList.add(new Property("used", "Reference(Device|Medication|Substance)", "Identifies medications, devices and other substance used as part of the procedure.", 0, java.lang.Integer.MAX_VALUE, used)); } public Procedure copy() { @@ -1075,10 +1708,12 @@ public class Procedure extends DomainResource { dst.identifier.add(i.copy()); }; dst.patient = patient == null ? null : patient.copy(); + dst.status = status == null ? null : status.copy(); + dst.category = category == null ? null : category.copy(); dst.type = type == null ? null : type.copy(); if (bodySite != null) { - dst.bodySite = new ArrayList(); - for (CodeableConcept i : bodySite) + dst.bodySite = new ArrayList(); + for (ProcedureBodySiteComponent i : bodySite) dst.bodySite.add(i.copy()); }; if (indication != null) { @@ -1091,8 +1726,9 @@ public class Procedure extends DomainResource { for (ProcedurePerformerComponent i : performer) dst.performer.add(i.copy()); }; - dst.date = date == null ? null : date.copy(); + dst.performed = performed == null ? null : performed.copy(); dst.encounter = encounter == null ? null : encounter.copy(); + dst.location = location == null ? null : location.copy(); dst.outcome = outcome == null ? null : outcome.copy(); if (report != null) { dst.report = new ArrayList(); @@ -1104,13 +1740,27 @@ public class Procedure extends DomainResource { for (CodeableConcept i : complication) dst.complication.add(i.copy()); }; - dst.followUp = followUp == null ? null : followUp.copy(); + if (followUp != null) { + dst.followUp = new ArrayList(); + for (CodeableConcept i : followUp) + dst.followUp.add(i.copy()); + }; if (relatedItem != null) { dst.relatedItem = new ArrayList(); for (ProcedureRelatedItemComponent i : relatedItem) dst.relatedItem.add(i.copy()); }; dst.notes = notes == null ? null : notes.copy(); + if (device != null) { + dst.device = new ArrayList(); + for (ProcedureDeviceComponent i : device) + dst.device.add(i.copy()); + }; + if (used != null) { + dst.used = new ArrayList(); + for (Reference i : used) + dst.used.add(i.copy()); + }; return dst; } @@ -1125,11 +1775,13 @@ public class Procedure extends DomainResource { if (!(other instanceof Procedure)) return false; Procedure o = (Procedure) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(type, o.type, true) - && compareDeep(bodySite, o.bodySite, true) && compareDeep(indication, o.indication, true) && compareDeep(performer, o.performer, true) - && compareDeep(date, o.date, true) && compareDeep(encounter, o.encounter, true) && compareDeep(outcome, o.outcome, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(patient, o.patient, true) && compareDeep(status, o.status, true) + && compareDeep(category, o.category, true) && compareDeep(type, o.type, true) && compareDeep(bodySite, o.bodySite, true) + && compareDeep(indication, o.indication, true) && compareDeep(performer, o.performer, true) && compareDeep(performed, o.performed, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(location, o.location, true) && compareDeep(outcome, o.outcome, true) && compareDeep(report, o.report, true) && compareDeep(complication, o.complication, true) && compareDeep(followUp, o.followUp, true) - && compareDeep(relatedItem, o.relatedItem, true) && compareDeep(notes, o.notes, true); + && compareDeep(relatedItem, o.relatedItem, true) && compareDeep(notes, o.notes, true) && compareDeep(device, o.device, true) + && compareDeep(used, o.used, true); } @Override @@ -1139,17 +1791,19 @@ public class Procedure extends DomainResource { if (!(other instanceof Procedure)) return false; Procedure o = (Procedure) other; - return compareValues(outcome, o.outcome, true) && compareValues(followUp, o.followUp, true) && compareValues(notes, o.notes, true) - ; + return compareValues(status, o.status, true) && compareValues(notes, o.notes, true); } public boolean isEmpty() { return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (type == null || type.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (indication == null || indication.isEmpty()) - && (performer == null || performer.isEmpty()) && (date == null || date.isEmpty()) && (encounter == null || encounter.isEmpty()) + && (status == null || status.isEmpty()) && (category == null || category.isEmpty()) && (type == null || type.isEmpty()) + && (bodySite == null || bodySite.isEmpty()) && (indication == null || indication.isEmpty()) + && (performer == null || performer.isEmpty()) && (performed == null || performed.isEmpty()) + && (encounter == null || encounter.isEmpty()) && (location == null || location.isEmpty()) && (outcome == null || outcome.isEmpty()) && (report == null || report.isEmpty()) && (complication == null || complication.isEmpty()) && (followUp == null || followUp.isEmpty()) && (relatedItem == null || relatedItem.isEmpty()) - && (notes == null || notes.isEmpty()); + && (notes == null || notes.isEmpty()) && (device == null || device.isEmpty()) && (used == null || used.isEmpty()) + ; } @Override @@ -1157,10 +1811,16 @@ public class Procedure extends DomainResource { return ResourceType.Procedure; } - @SearchParamDefinition(name="date", path="Procedure.date", description="The date the procedure was performed on", type="date" ) + @SearchParamDefinition(name="date", path="Procedure.performed[x]", description="Date/Period the procedure was performed", type="date" ) public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "patient", path = "Procedure.patient", description = "The identity of a patient to list procedures for", type = "reference") + @SearchParamDefinition(name="performer", path="Procedure.performer.person", description="The reference to the practitioner", type="reference" ) + public static final String SP_PERFORMER = "performer"; + @SearchParamDefinition(name="patient", path="Procedure.patient", description="The identity of a patient to list procedures for", type="reference" ) public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="location", path="Procedure.location", description="Where the procedure happened", type="reference" ) + public static final String SP_LOCATION = "location"; + @SearchParamDefinition(name="encounter", path="Procedure.encounter", description="The encounter when procedure performed", type="reference" ) + public static final String SP_ENCOUNTER = "encounter"; @SearchParamDefinition(name="type", path="Procedure.type", description="Type of procedure", type="token" ) public static final String SP_TYPE = "type"; diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcessRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcessRequest.java new file mode 100644 index 00000000000..8d2ee73ec60 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProcessRequest.java @@ -0,0 +1,1171 @@ +package org.hl7.fhir.instance.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, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.annotations.ResourceDef; +import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; +import org.hl7.fhir.instance.model.annotations.Block; +import org.hl7.fhir.instance.model.annotations.Child; +import org.hl7.fhir.instance.model.annotations.Description; +/** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ +@ResourceDef(name="ProcessRequest", profile="http://hl7.org/fhir/Profile/ProcessRequest") +public class ProcessRequest extends DomainResource { + + public enum Actionlist { + /** + * Cancel, Reverse or nullify the target resource. + */ + CANCEL, + /** + * Check for previously un-read/ not-retrieved resources. + */ + POLL, + /** + * Re-process the target resource. + */ + REPROCESS, + /** + * Retrieve the processing status of the target resource. + */ + STATUS, + /** + * added to help the parsers + */ + NULL; + public static Actionlist fromCode(String codeString) throws Exception { + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return CANCEL; + if ("poll".equals(codeString)) + return POLL; + if ("reprocess".equals(codeString)) + return REPROCESS; + if ("status".equals(codeString)) + return STATUS; + throw new Exception("Unknown Actionlist code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CANCEL: return "cancel"; + case POLL: return "poll"; + case REPROCESS: return "reprocess"; + case STATUS: return "status"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CANCEL: return ""; + case POLL: return ""; + case REPROCESS: return ""; + case STATUS: return ""; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CANCEL: return "Cancel, Reverse or nullify the target resource."; + case POLL: return "Check for previously un-read/ not-retrieved resources."; + case REPROCESS: return "Re-process the target resource."; + case STATUS: return "Retrieve the processing status of the target resource."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CANCEL: return "Cancel, Reverse or Nullify"; + case POLL: return "Poll"; + case REPROCESS: return "Re-Process"; + case STATUS: return "Status Check"; + default: return "?"; + } + } + } + + public static class ActionlistEnumFactory implements EnumFactory { + public Actionlist fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("cancel".equals(codeString)) + return Actionlist.CANCEL; + if ("poll".equals(codeString)) + return Actionlist.POLL; + if ("reprocess".equals(codeString)) + return Actionlist.REPROCESS; + if ("status".equals(codeString)) + return Actionlist.STATUS; + throw new IllegalArgumentException("Unknown Actionlist code '"+codeString+"'"); + } + public String toCode(Actionlist code) { + if (code == Actionlist.CANCEL) + return "cancel"; + if (code == Actionlist.POLL) + return "poll"; + if (code == Actionlist.REPROCESS) + return "reprocess"; + if (code == Actionlist.STATUS) + return "status"; + return "?"; + } + } + + @Block() + public static class ItemsComponent extends BackboneElement { + /** + * A service line number. + */ + @Child(name ="sequenceLinkId", type={IntegerType.class}, order=1, min=1, max=1) + @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) + protected IntegerType sequenceLinkId; + + private static final long serialVersionUID = -1598360600L; + + public ItemsComponent() { + super(); + } + + public ItemsComponent(IntegerType sequenceLinkId) { + super(); + this.sequenceLinkId = sequenceLinkId; + } + + /** + * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public IntegerType getSequenceLinkIdElement() { + if (this.sequenceLinkId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); + else if (Configuration.doAutoCreate()) + this.sequenceLinkId = new IntegerType(); // bb + return this.sequenceLinkId; + } + + public boolean hasSequenceLinkIdElement() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + public boolean hasSequenceLinkId() { + return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); + } + + /** + * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value + */ + public ItemsComponent setSequenceLinkIdElement(IntegerType value) { + this.sequenceLinkId = value; + return this; + } + + /** + * @return A service line number. + */ + public int getSequenceLinkId() { + return this.sequenceLinkId == null || this.sequenceLinkId.isEmpty() ? 0 : this.sequenceLinkId.getValue(); + } + + /** + * @param value A service line number. + */ + public ItemsComponent setSequenceLinkId(int value) { + if (this.sequenceLinkId == null) + this.sequenceLinkId = new IntegerType(); + this.sequenceLinkId.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequenceLinkId", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); + } + + public ItemsComponent copy() { + ItemsComponent dst = new ItemsComponent(); + copyValues(dst); + dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareDeep(sequenceLinkId, o.sequenceLinkId, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ItemsComponent)) + return false; + ItemsComponent o = (ItemsComponent) other; + return compareValues(sequenceLinkId, o.sequenceLinkId, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()); + } + + } + + /** + * The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + @Child(name ="action", type={CodeType.class}, order=0, min=1, max=1) + @Description(shortDefinition="cancel | poll | reprocess | status", formalDefinition="The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest." ) + protected Enumeration action; + + /** + * The ProcessRequest Business Identifier. + */ + @Child(name ="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Business Identifier", formalDefinition="The ProcessRequest Business Identifier." ) + protected List identifier; + + /** + * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. + */ + @Child(name ="ruleset", type={Coding.class}, order=2, min=0, max=1) + @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) + protected Coding ruleset; + + /** + * The style (standard) and version of the original material which was converted into this resource. + */ + @Child(name ="originalRuleset", type={Coding.class}, order=3, min=0, max=1) + @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) + protected Coding originalRuleset; + + /** + * The date when this resource was created. + */ + @Child(name ="created", type={DateTimeType.class}, order=4, min=0, max=1) + @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) + protected DateTimeType created; + + /** + * The organization which is target of the request. + */ + @Child(name ="target", type={Organization.class}, order=5, min=0, max=1) + @Description(shortDefinition="Target of the request", formalDefinition="The organization which is target of the request." ) + protected Reference target; + + /** + * The actual object that is the target of the reference (The organization which is target of the request.) + */ + protected Organization targetTarget; + + /** + * The practitioner who is responsible for the action specified in thise request. + */ + @Child(name ="provider", type={Practitioner.class}, order=6, min=0, max=1) + @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the action specified in thise request." ) + protected Reference provider; + + /** + * The actual object that is the target of the reference (The practitioner who is responsible for the action specified in thise request.) + */ + protected Practitioner providerTarget; + + /** + * The organization which is responsible for the action speccified in thise request. + */ + @Child(name ="organization", type={Organization.class}, order=7, min=0, max=1) + @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the action speccified in thise request." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization which is responsible for the action speccified in thise request.) + */ + protected Organization organizationTarget; + + /** + * Reference of resource which is the target or subject of this action. + */ + @Child(name ="request", type={}, order=8, min=0, max=1) + @Description(shortDefinition="Request reference", formalDefinition="Reference of resource which is the target or subject of this action." ) + protected Reference request; + + /** + * The actual object that is the target of the reference (Reference of resource which is the target or subject of this action.) + */ + protected Resource requestTarget; + + /** + * Reference of a prior response to resource which is the target or subject of this action. + */ + @Child(name ="response", type={}, order=9, min=0, max=1) + @Description(shortDefinition="Response reference", formalDefinition="Reference of a prior response to resource which is the target or subject of this action." ) + protected Reference response; + + /** + * The actual object that is the target of the reference (Reference of a prior response to resource which is the target or subject of this action.) + */ + protected Resource responseTarget; + + /** + * If true remove all history excluding audit. + */ + @Child(name ="nullify", type={BooleanType.class}, order=10, min=0, max=1) + @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) + protected BooleanType nullify; + + /** + * A reference to supply which authenticates the process. + */ + @Child(name ="reference", type={StringType.class}, order=11, min=0, max=1) + @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticates the process." ) + protected StringType reference; + + /** + * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. + */ + @Child(name ="item", type={}, order=12, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) + protected List item; + + /** + * Names of resource types to include. + */ + @Child(name ="include", type={StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Resource type(s) to include", formalDefinition="Names of resource types to include." ) + protected List include; + + /** + * Names of resource types to exclude. + */ + @Child(name ="exclude", type={StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Resource type(s) to exclude", formalDefinition="Names of resource types to exclude." ) + protected List exclude; + + /** + * A period of time during which the fulfilling resources would have been created. + */ + @Child(name ="period", type={Period.class}, order=15, min=0, max=1) + @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) + protected Period period; + + private static final long serialVersionUID = -1852083956L; + + public ProcessRequest() { + super(); + } + + public ProcessRequest(Enumeration action) { + super(); + this.action = action; + } + + /** + * @return {@link #action} (The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public Enumeration getActionElement() { + if (this.action == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.action"); + else if (Configuration.doAutoCreate()) + this.action = new Enumeration(new ActionlistEnumFactory()); // bb + return this.action; + } + + public boolean hasActionElement() { + return this.action != null && !this.action.isEmpty(); + } + + public boolean hasAction() { + return this.action != null && !this.action.isEmpty(); + } + + /** + * @param value {@link #action} (The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value + */ + public ProcessRequest setActionElement(Enumeration value) { + this.action = value; + return this; + } + + /** + * @return The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + public Actionlist getAction() { + return this.action == null ? null : this.action.getValue(); + } + + /** + * @param value The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest. + */ + public ProcessRequest setAction(Actionlist value) { + if (this.action == null) + this.action = new Enumeration(new ActionlistEnumFactory()); + this.action.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (The ProcessRequest Business Identifier.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (The ProcessRequest Business Identifier.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public ProcessRequest addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public Coding getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new Coding(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) + */ + public ProcessRequest setRuleset(Coding value) { + this.ruleset = value; + return this; + } + + /** + * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public Coding getOriginalRuleset() { + if (this.originalRuleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.originalRuleset"); + else if (Configuration.doAutoCreate()) + this.originalRuleset = new Coding(); // cc + return this.originalRuleset; + } + + public boolean hasOriginalRuleset() { + return this.originalRuleset != null && !this.originalRuleset.isEmpty(); + } + + /** + * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) + */ + public ProcessRequest setOriginalRuleset(Coding value) { + this.originalRuleset = value; + return this; + } + + /** + * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public ProcessRequest setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date when this resource was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date when this resource was created. + */ + public ProcessRequest 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 #target} (The organization which is target of the request.) + */ + public Reference getTarget() { + if (this.target == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.target"); + else if (Configuration.doAutoCreate()) + this.target = new Reference(); // cc + return this.target; + } + + public boolean hasTarget() { + return this.target != null && !this.target.isEmpty(); + } + + /** + * @param value {@link #target} (The organization which is target of the request.) + */ + public ProcessRequest setTarget(Reference value) { + this.target = value; + return this; + } + + /** + * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is target of the request.) + */ + public Organization getTargetTarget() { + if (this.targetTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.target"); + else if (Configuration.doAutoCreate()) + this.targetTarget = new Organization(); // aa + return this.targetTarget; + } + + /** + * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is target of the request.) + */ + public ProcessRequest setTargetTarget(Organization value) { + this.targetTarget = value; + return this; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public Reference getProvider() { + if (this.provider == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.provider"); + else if (Configuration.doAutoCreate()) + this.provider = new Reference(); // cc + return this.provider; + } + + public boolean hasProvider() { + return this.provider != null && !this.provider.isEmpty(); + } + + /** + * @param value {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public ProcessRequest setProvider(Reference value) { + this.provider = value; + return this; + } + + /** + * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) + */ + public Practitioner getProviderTarget() { + if (this.providerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.provider"); + else if (Configuration.doAutoCreate()) + this.providerTarget = new Practitioner(); // aa + return this.providerTarget; + } + + /** + * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) + */ + public ProcessRequest setProviderTarget(Practitioner value) { + this.providerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public ProcessRequest setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) + */ + public ProcessRequest setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public Reference getRequest() { + if (this.request == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.request"); + else if (Configuration.doAutoCreate()) + this.request = new Reference(); // cc + return this.request; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + /** + * @param value {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public ProcessRequest setRequest(Reference value) { + this.request = value; + return this; + } + + /** + * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) + */ + public Resource getRequestTarget() { + return this.requestTarget; + } + + /** + * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) + */ + public ProcessRequest setRequestTarget(Resource value) { + this.requestTarget = value; + return this; + } + + /** + * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Reference getResponse() { + if (this.response == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.response"); + else if (Configuration.doAutoCreate()) + this.response = new Reference(); // cc + return this.response; + } + + public boolean hasResponse() { + return this.response != null && !this.response.isEmpty(); + } + + /** + * @param value {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public ProcessRequest setResponse(Reference value) { + this.response = value; + return this; + } + + /** + * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Resource getResponseTarget() { + return this.responseTarget; + } + + /** + * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) + */ + public ProcessRequest setResponseTarget(Resource value) { + this.responseTarget = value; + return this; + } + + /** + * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value + */ + public BooleanType getNullifyElement() { + if (this.nullify == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.nullify"); + else if (Configuration.doAutoCreate()) + this.nullify = new BooleanType(); // bb + return this.nullify; + } + + public boolean hasNullifyElement() { + return this.nullify != null && !this.nullify.isEmpty(); + } + + public boolean hasNullify() { + return this.nullify != null && !this.nullify.isEmpty(); + } + + /** + * @param value {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value + */ + public ProcessRequest setNullifyElement(BooleanType value) { + this.nullify = value; + return this; + } + + /** + * @return If true remove all history excluding audit. + */ + public boolean getNullify() { + return this.nullify == null || this.nullify.isEmpty() ? false : this.nullify.getValue(); + } + + /** + * @param value If true remove all history excluding audit. + */ + public ProcessRequest setNullify(boolean value) { + if (this.nullify == null) + this.nullify = new BooleanType(); + this.nullify.setValue(value); + return this; + } + + /** + * @return {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public StringType getReferenceElement() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new StringType(); // bb + return this.reference; + } + + public boolean hasReferenceElement() { + return this.reference != null && !this.reference.isEmpty(); + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (A reference to supply which authenticates the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value + */ + public ProcessRequest setReferenceElement(StringType value) { + this.reference = value; + return this; + } + + /** + * @return A reference to supply which authenticates the process. + */ + public String getReference() { + return this.reference == null ? null : this.reference.getValue(); + } + + /** + * @param value A reference to supply which authenticates the process. + */ + public ProcessRequest setReference(String value) { + if (Utilities.noString(value)) + this.reference = null; + else { + if (this.reference == null) + this.reference = new StringType(); + this.reference.setValue(value); + } + return this; + } + + /** + * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) + */ + public List getItem() { + if (this.item == null) + this.item = new ArrayList(); + return this.item; + } + + public boolean hasItem() { + if (this.item == null) + return false; + for (ItemsComponent item : this.item) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) + */ + // syntactic sugar + public ItemsComponent addItem() { //3 + ItemsComponent t = new ItemsComponent(); + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return t; + } + + // syntactic sugar + public ProcessRequest addItem(ItemsComponent t) { //3 + if (t == null) + return this; + if (this.item == null) + this.item = new ArrayList(); + this.item.add(t); + return this; + } + + /** + * @return {@link #include} (Names of resource types to include.) + */ + public List getInclude() { + if (this.include == null) + this.include = new ArrayList(); + return this.include; + } + + public boolean hasInclude() { + if (this.include == null) + return false; + for (StringType item : this.include) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #include} (Names of resource types to include.) + */ + // syntactic sugar + public StringType addIncludeElement() {//2 + StringType t = new StringType(); + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return t; + } + + /** + * @param value {@link #include} (Names of resource types to include.) + */ + public ProcessRequest addInclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.include == null) + this.include = new ArrayList(); + this.include.add(t); + return this; + } + + /** + * @param value {@link #include} (Names of resource types to include.) + */ + public boolean hasInclude(String value) { + if (this.include == null) + return false; + for (StringType v : this.include) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #exclude} (Names of resource types to exclude.) + */ + public List getExclude() { + if (this.exclude == null) + this.exclude = new ArrayList(); + return this.exclude; + } + + public boolean hasExclude() { + if (this.exclude == null) + return false; + for (StringType item : this.exclude) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #exclude} (Names of resource types to exclude.) + */ + // syntactic sugar + public StringType addExcludeElement() {//2 + StringType t = new StringType(); + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return t; + } + + /** + * @param value {@link #exclude} (Names of resource types to exclude.) + */ + public ProcessRequest addExclude(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.exclude == null) + this.exclude = new ArrayList(); + this.exclude.add(t); + return this; + } + + /** + * @param value {@link #exclude} (Names of resource types to exclude.) + */ + public boolean hasExclude(String value) { + if (this.exclude == null) + return false; + for (StringType v : this.exclude) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #period} (A period of time during which the fulfilling resources would have been created.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcessRequest.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} (A period of time during which the fulfilling resources would have been created.) + */ + public ProcessRequest setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("action", "code", "The type of procesing action being requested, for example Reversal, Readjudication, StatusRequest,PendedRequest.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("identifier", "Identifier", "The ProcessRequest Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); + childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); + childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("target", "Reference(Organization)", "The organization which is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the action specified in thise request.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the action speccified in thise request.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("request", "Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response", "Reference(Any)", "Reference of a prior response to resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); + childrenList.add(new Property("reference", "string", "A reference to supply which authenticates the process.", 0, java.lang.Integer.MAX_VALUE, reference)); + childrenList.add(new Property("item", "", "List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("include", "string", "Names of resource types to include.", 0, java.lang.Integer.MAX_VALUE, include)); + childrenList.add(new Property("exclude", "string", "Names of resource types to exclude.", 0, java.lang.Integer.MAX_VALUE, exclude)); + childrenList.add(new Property("period", "Period", "A period of time during which the fulfilling resources would have been created.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + public ProcessRequest copy() { + ProcessRequest dst = new ProcessRequest(); + copyValues(dst); + dst.action = action == null ? null : action.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.ruleset = ruleset == null ? null : ruleset.copy(); + dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); + dst.created = created == null ? null : created.copy(); + dst.target = target == null ? null : target.copy(); + dst.provider = provider == null ? null : provider.copy(); + dst.organization = organization == null ? null : organization.copy(); + dst.request = request == null ? null : request.copy(); + dst.response = response == null ? null : response.copy(); + dst.nullify = nullify == null ? null : nullify.copy(); + dst.reference = reference == null ? null : reference.copy(); + if (item != null) { + dst.item = new ArrayList(); + for (ItemsComponent i : item) + dst.item.add(i.copy()); + }; + if (include != null) { + dst.include = new ArrayList(); + for (StringType i : include) + dst.include.add(i.copy()); + }; + if (exclude != null) { + dst.exclude = new ArrayList(); + for (StringType i : exclude) + dst.exclude.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + return dst; + } + + protected ProcessRequest typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcessRequest)) + return false; + ProcessRequest o = (ProcessRequest) other; + return compareDeep(action, o.action, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) + && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) + && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) && compareDeep(nullify, o.nullify, true) + && compareDeep(reference, o.reference, true) && compareDeep(item, o.item, true) && compareDeep(include, o.include, true) + && compareDeep(exclude, o.exclude, true) && compareDeep(period, o.period, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcessRequest)) + return false; + ProcessRequest o = (ProcessRequest) other; + return compareValues(action, o.action, true) && compareValues(created, o.created, true) && compareValues(nullify, o.nullify, true) + && compareValues(reference, o.reference, true) && compareValues(include, o.include, true) && compareValues(exclude, o.exclude, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && (action == null || action.isEmpty()) && (identifier == null || identifier.isEmpty()) + && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) + && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) + && (organization == null || organization.isEmpty()) && (request == null || request.isEmpty()) + && (response == null || response.isEmpty()) && (nullify == null || nullify.isEmpty()) && (reference == null || reference.isEmpty()) + && (item == null || item.isEmpty()) && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) + && (period == null || period.isEmpty()); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ProcessRequest; + } + + @SearchParamDefinition(name="identifier", path="ProcessRequest.identifier", description="The business identifier of the ProcessRequest", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + @SearchParamDefinition(name="provider", path="ProcessRequest.provider", description="The provider who renerated this request", type="reference" ) + public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="organization", path="ProcessRequest.organization", description="The organization who generated this request", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="action", path="ProcessRequest.action", description="The action requested by this resource", type="token" ) + public static final String SP_ACTION = "action"; + +} + diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java deleted file mode 100644 index c5f903ac0b5..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ProfessionalClaim.java +++ /dev/null @@ -1,3952 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import java.math.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. - */ -@ResourceDef(name="ProfessionalClaim", profile="http://hl7.org/fhir/Profile/ProfessionalClaim") -public class ProfessionalClaim extends DomainResource { - - public enum UseLink { - /** - * The treatment is complete and this represents a Claim for the services. - */ - COMPLETE, - /** - * The treatment is proposed and this represents a Pre-authorization for the services. - */ - PROPOSED, - /** - * The treatment is proposed and this represents a Pre-determination for the services. - */ - EXPLORATORY, - /** - * A locally defined or otherwise resolved status. - */ - OTHER, - /** - * added to help the parsers - */ - NULL; - public static UseLink fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return COMPLETE; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("exploratory".equals(codeString)) - return EXPLORATORY; - if ("other".equals(codeString)) - return OTHER; - throw new Exception("Unknown UseLink code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case COMPLETE: return ""; - case PROPOSED: return ""; - case EXPLORATORY: return ""; - case OTHER: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; - case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; - case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; - case OTHER: return "A locally defined or otherwise resolved status."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - } - - public static class UseLinkEnumFactory implements EnumFactory { - public UseLink fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return UseLink.COMPLETE; - if ("proposed".equals(codeString)) - return UseLink.PROPOSED; - if ("exploratory".equals(codeString)) - return UseLink.EXPLORATORY; - if ("other".equals(codeString)) - return UseLink.OTHER; - throw new IllegalArgumentException("Unknown UseLink code '"+codeString+"'"); - } - public String toCode(UseLink code) { - if (code == UseLink.COMPLETE) - return "complete"; - if (code == UseLink.PROPOSED) - return "proposed"; - if (code == UseLink.EXPLORATORY) - return "exploratory"; - if (code == UseLink.OTHER) - return "other"; - return "?"; - } - } - - @Block() - public static class PayeeComponent extends BackboneElement { - /** - * Party to be reimbursed: Subscriber, provider, other. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) - protected Coding type; - - /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; - - public PayeeComponent() { - super(); - } - - /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public PayeeComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); - } - - public PayeeComponent copy() { - PayeeComponent dst = new PayeeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; - } - - } - - @Block() - public static class DiagnosisComponent extends BackboneElement { - /** - * Sequence of diagnosis. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis." ) - protected IntegerType sequence; - - /** - * The diagnosis. - */ - @Child(name="diagnosis", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) - protected Coding diagnosis; - - private static final long serialVersionUID = -935927954L; - - public DiagnosisComponent() { - super(); - } - - public DiagnosisComponent(IntegerType sequence, Coding diagnosis) { - super(); - this.sequence = sequence; - this.diagnosis = diagnosis; - } - - /** - * @return {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb - return this.sequence; - } - - public boolean hasSequenceElement() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - public boolean hasSequence() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - /** - * @param value {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DiagnosisComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return Sequence of diagnosis. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value Sequence of diagnosis. - */ - public DiagnosisComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #diagnosis} (The diagnosis.) - */ - public Coding getDiagnosis() { - if (this.diagnosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); - else if (Configuration.doAutoCreate()) - this.diagnosis = new Coding(); // cc - return this.diagnosis; - } - - public boolean hasDiagnosis() { - return this.diagnosis != null && !this.diagnosis.isEmpty(); - } - - /** - * @param value {@link #diagnosis} (The diagnosis.) - */ - public DiagnosisComponent setDiagnosis(Coding value) { - this.diagnosis = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "Sequence of diagnosis.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - } - - public DiagnosisComponent copy() { - DiagnosisComponent dst = new DiagnosisComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareValues(sequence, o.sequence, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; - } - - } - - @Block() - public static class CoverageComponent extends BackboneElement { - /** - * A service line item. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) - protected IntegerType sequence; - - /** - * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) - protected BooleanType focal; - - /** - * Reference to the program or plan identification, underwriter or payor. - */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) - @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The contract number of a business agreement which describes the terms and conditions. - */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) - protected StringType businessArrangement; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - - /** - * A list of references from the Insurer to which these services pertain. - */ - @Child(name="preauthref", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) - protected List preauthref; - - /** - * The Coverages adjudication details. - */ - @Child(name="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) - @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) - protected Reference claimResponse; - - /** - * The actual object that is the target of the reference (The Coverages adjudication details.) - */ - protected ClaimResponse claimResponseTarget; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name="originalRuleset", type={Coding.class}, order=8, min=0, max=1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - private static final long serialVersionUID = 450222500L; - - public CoverageComponent() { - super(); - } - - public CoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { - super(); - this.sequence = sequence; - this.focal = focal; - this.coverage = coverage; - this.relationship = relationship; - } - - /** - * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public CoverageComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line item. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line item. - */ - public CoverageComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public BooleanType getFocalElement() { - if (this.focal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.focal"); - else if (Configuration.doAutoCreate()) - this.focal = new BooleanType(); // bb - return this.focal; - } - - public boolean hasFocalElement() { - return this.focal != null && !this.focal.isEmpty(); - } - - public boolean hasFocal() { - return this.focal != null && !this.focal.isEmpty(); - } - - /** - * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public CoverageComponent setFocalElement(BooleanType value) { - this.focal = value; - return this; - } - - /** - * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); - } - - /** - * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public CoverageComponent setFocal(boolean value) { - if (this.focal == null) - this.focal = new BooleanType(); - this.focal.setValue(value); - return this; - } - - /** - * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** - * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public StringType getBusinessArrangementElement() { - if (this.businessArrangement == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); - else if (Configuration.doAutoCreate()) - this.businessArrangement = new StringType(); // bb - return this.businessArrangement; - } - - public boolean hasBusinessArrangementElement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - public boolean hasBusinessArrangement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - /** - * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public CoverageComponent setBusinessArrangementElement(StringType value) { - this.businessArrangement = value; - return this; - } - - /** - * @return The contract number of a business agreement which describes the terms and conditions. - */ - public String getBusinessArrangement() { - return this.businessArrangement == null ? null : this.businessArrangement.getValue(); - } - - /** - * @param value The contract number of a business agreement which describes the terms and conditions. - */ - public CoverageComponent setBusinessArrangement(String value) { - if (Utilities.noString(value)) - this.businessArrangement = null; - else { - if (this.businessArrangement == null) - this.businessArrangement = new StringType(); - this.businessArrangement.setValue(value); - } - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public List getPreauthref() { - if (this.preauthref == null) - this.preauthref = new ArrayList(); - return this.preauthref; - } - - public boolean hasPreauthref() { - if (this.preauthref == null) - return false; - for (StringType item : this.preauthref) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - // syntactic sugar - public StringType addPreauthrefElement() {//2 - StringType t = new StringType(); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return t; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public CoverageComponent addPreauthref(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return this; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public boolean hasPreauthref(String value) { - if (this.preauthref == null) - return false; - for (StringType v : this.preauthref) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #claimResponse} (The Coverages adjudication details.) - */ - public Reference getClaimResponse() { - if (this.claimResponse == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponse = new Reference(); // cc - return this.claimResponse; - } - - public boolean hasClaimResponse() { - return this.claimResponse != null && !this.claimResponse.isEmpty(); - } - - /** - * @param value {@link #claimResponse} (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponse(Reference value) { - this.claimResponse = value; - return this; - } - - /** - * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public ClaimResponse getClaimResponseTarget() { - if (this.claimResponseTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponseTarget = new ClaimResponse(); // aa - return this.claimResponseTarget; - } - - /** - * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponseTarget(ClaimResponse value) { - this.claimResponseTarget = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public CoverageComponent setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("preauthref", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preauthref)); - childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - } - - public CoverageComponent copy() { - CoverageComponent dst = new CoverageComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.focal = focal == null ? null : focal.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - if (preauthref != null) { - dst.preauthref = new ArrayList(); - for (StringType i : preauthref) - dst.preauthref.add(i.copy()); - }; - dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preauthref, o.preauthref, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - && compareValues(preauthref, o.preauthref, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preauthref == null || preauthref.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; - } - - } - - @Block() - public static class ItemsComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name="provider", type={Practitioner.class}, order=3, min=0, max=1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * Diagnosis applicable for this service or product line. - */ - @Child(name="diagnosisLinkId", type={IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) - protected List diagnosisLinkId; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name="serviceDate", type={DateType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateType serviceDate; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) - @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=12, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Physical service site on the patient (limb, tooth, etc). - */ - @Child(name="bodySite", type={Coding.class}, order=13, min=0, max=1) - @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) - protected Coding bodySite; - - /** - * A region or surface of the site, eg. limb region or tooth surface(s). - */ - @Child(name="subsite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) - protected List subsite; - - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - - /** - * Second tier of goods and services. - */ - @Child(name="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) - protected List detail; - - private static final long serialVersionUID = -1140048455L; - - public ItemsComponent() { - super(); - } - - public ItemsComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public ItemsComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public ItemsComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public ItemsComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public List getDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - return this.diagnosisLinkId; - } - - public boolean hasDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType item : this.diagnosisLinkId) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - // syntactic sugar - public IntegerType addDiagnosisLinkIdElement() {//2 - IntegerType t = new IntegerType(); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return t; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public ItemsComponent addDiagnosisLinkId(int value) { //1 - IntegerType t = new IntegerType(); - t.setValue(value); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return this; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public boolean hasDiagnosisLinkId(int value) { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType v : this.diagnosisLinkId) - if (v.equals(value)) // integer - return true; - return false; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public ItemsComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public DateType getServiceDateElement() { - if (this.serviceDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.serviceDate"); - else if (Configuration.doAutoCreate()) - this.serviceDate = new DateType(); // bb - return this.serviceDate; - } - - public boolean hasServiceDateElement() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - public boolean hasServiceDate() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - /** - * @param value {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public ItemsComponent setServiceDateElement(DateType value) { - this.serviceDate = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getServiceDate() { - return this.serviceDate == null ? null : this.serviceDate.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public ItemsComponent setServiceDate(Date value) { - if (value == null) - this.serviceDate = null; - else { - if (this.serviceDate == null) - this.serviceDate = new DateType(); - this.serviceDate.setValue(value); - } - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public ItemsComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public ItemsComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public ItemsComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public ItemsComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public ItemsComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public ItemsComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public ItemsComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public Coding getBodySite() { - if (this.bodySite == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.bodySite"); - else if (Configuration.doAutoCreate()) - this.bodySite = new Coding(); // cc - return this.bodySite; - } - - public boolean hasBodySite() { - return this.bodySite != null && !this.bodySite.isEmpty(); - } - - /** - * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public ItemsComponent setBodySite(Coding value) { - this.bodySite = value; - return this; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - public List getSubsite() { - if (this.subsite == null) - this.subsite = new ArrayList(); - return this.subsite; - } - - public boolean hasSubsite() { - if (this.subsite == null) - return false; - for (Coding item : this.subsite) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - // syntactic sugar - public Coding addSubsite() { //3 - Coding t = new Coding(); - if (this.subsite == null) - this.subsite = new ArrayList(); - this.subsite.add(t); - return t; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (DetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - // syntactic sugar - public DetailComponent addDetail() { //3 - DetailComponent t = new DetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("diagnosisLinkId", "integer", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); - childrenList.add(new Property("subsite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subsite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); - childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public ItemsComponent copy() { - ItemsComponent dst = new ItemsComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - if (diagnosisLinkId != null) { - dst.diagnosisLinkId = new ArrayList(); - for (IntegerType i : diagnosisLinkId) - dst.diagnosisLinkId.add(i.copy()); - }; - dst.service = service == null ? null : service.copy(); - dst.serviceDate = serviceDate == null ? null : serviceDate.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - dst.bodySite = bodySite == null ? null : bodySite.copy(); - if (subsite != null) { - dst.subsite = new ArrayList(); - for (Coding i : subsite) - dst.subsite.add(i.copy()); - }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; - if (detail != null) { - dst.detail = new ArrayList(); - for (DetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) - && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) - && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subsite, o.subsite, true) - && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) - && compareValues(serviceDate, o.serviceDate, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subsite == null || subsite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()); - } - - } - - @Block() - public static class DetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Third tier of goods and services. - */ - @Child(name="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) - protected List subDetail; - - private static final long serialVersionUID = -342502025L; - - public DetailComponent() { - super(); - } - - public DetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public DetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public DetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public DetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public DetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public DetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public DetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public DetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public DetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public DetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - public List getSubDetail() { - if (this.subDetail == null) - this.subDetail = new ArrayList(); - return this.subDetail; - } - - public boolean hasSubDetail() { - if (this.subDetail == null) - return false; - for (SubDetailComponent item : this.subDetail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - // syntactic sugar - public SubDetailComponent addSubDetail() { //3 - SubDetailComponent t = new SubDetailComponent(); - if (this.subDetail == null) - this.subDetail = new ArrayList(); - this.subDetail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); - } - - public DetailComponent copy() { - DetailComponent dst = new DetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - if (subDetail != null) { - dst.subDetail = new ArrayList(); - for (SubDetailComponent i : subDetail) - dst.subDetail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(subDetail, o.subDetail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); - } - - } - - @Block() - public static class SubDetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an additional service or product or charge." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an additional service or product or charge." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - private static final long serialVersionUID = 122809194L; - - public SubDetailComponent() { - super(); - } - - public SubDetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public SubDetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public SubDetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public SubDetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (The fee for an additional service or product or charge.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public SubDetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public SubDetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public SubDetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public SubDetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public SubDetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public SubDetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - } - - public SubDetailComponent copy() { - SubDetailComponent dst = new SubDetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()); - } - - } - - /** - * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected List identifier; - - /** - * The version of the specification on which this instance relies. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) - protected Coding ruleset; - - /** - * The version of the specification from which the original instance was created. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) - protected Coding originalRuleset; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateTimeType created; - - /** - * Insurer Identifier, typical BIN number (6 digit). - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) - */ - protected Organization targetTarget; - - /** - * The provider which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Organization organizationTarget; - - /** - * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) - protected Enumeration use; - - /** - * Immediate (STAT), best effort (NORMAL), deferred (DEFER). - */ - @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) - protected Coding priority; - - /** - * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. - */ - @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) - protected Coding fundsReserve; - - /** - * Person who created the invoice/claim/pre-determination or pre-authorization. - */ - @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; - - /** - * Facility where the services were provided. - */ - @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; - - /** - * The party to be reimbursed for the services. - */ - @Child(name = "payee", type = {}, order = 12, min = 0, max = 1) - @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) - protected PayeeComponent payee; - - /** - * The referral resource which lists the date, practitioner, reason and other supporting information. - */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 13, min = 0, max = 1) - @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; - - /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - protected ReferralRequest referralTarget; - - /** - * Ordered list of patient diagnosis for which care is sought. - */ - @Child(name = "diagnosis", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) - protected List diagnosis; - - /** - * List of patient conditions for which care is sought. - */ - @Child(name = "condition", type = {Coding.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) - protected List condition; - - /** - * Patient Resource. - */ - @Child(name = "patient", type = {Patient.class}, order = 16, min = 1, max = 1) - @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; - - /** - * Financial instrument by which payment information for health care. - */ - @Child(name = "coverage", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected List coverage; - - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order = 19, min = 0, max = 1) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - - /** - * Date of an accident which these services are addressing. - */ - @Child(name = "accident", type = {DateType.class}, order = 20, min = 0, max = 1) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) - protected DateType accident; - - /** - * Type of accident: work, auto, etc. - */ - @Child(name = "accidentType", type = {Coding.class}, order = 21, min = 0, max = 1) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) - protected Coding accidentType; - - /** - * A list of intervention and exception codes which may influence the adjudication of the claim. - */ - @Child(name = "interventionException", type = {Coding.class}, order = 22, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) - protected List interventionException; - - /** - * First tier of goods and services. - */ - @Child(name = "item", type = {}, order = 23, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) - protected List item; - - /** - * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. - */ - @Child(name = "additionalMaterials", type = {Coding.class}, order = 24, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) - protected List additionalMaterials; - - private static final long serialVersionUID = 1113876752L; - - public ProfessionalClaim() { - super(); - } - - public ProfessionalClaim(Reference patient) { - super(); - this.patient = patient; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public ProfessionalClaim setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public ProfessionalClaim setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). 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 ProfessionalClaim.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 when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public ProfessionalClaim setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public ProfessionalClaim 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 #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public ProfessionalClaim setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public ProfessionalClaim setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public ProfessionalClaim setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public ProfessionalClaim setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public ProfessionalClaim setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public ProfessionalClaim setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public Enumeration getUseElement() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.use"); - else if (Configuration.doAutoCreate()) - this.use = new Enumeration(new UseLinkEnumFactory()); // bb - return this.use; - } - - public boolean hasUseElement() { - return this.use != null && !this.use.isEmpty(); - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public ProfessionalClaim setUseElement(Enumeration value) { - this.use = value; - return this; - } - - /** - * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public UseLink getUse() { - return this.use == null ? null : this.use.getValue(); - } - - /** - * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public ProfessionalClaim setUse(UseLink value) { - if (value == null) - this.use = null; - else { - if (this.use == null) - this.use = new Enumeration(new UseLinkEnumFactory()); - this.use.setValue(value); - } - return this; - } - - /** - * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public Coding getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new Coding(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public ProfessionalClaim setPriority(Coding value) { - this.priority = value; - return this; - } - - /** - * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public Coding getFundsReserve() { - if (this.fundsReserve == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.fundsReserve"); - else if (Configuration.doAutoCreate()) - this.fundsReserve = new Coding(); // cc - return this.fundsReserve; - } - - public boolean hasFundsReserve() { - return this.fundsReserve != null && !this.fundsReserve.isEmpty(); - } - - /** - * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public ProfessionalClaim setFundsReserve(Coding value) { - this.fundsReserve = value; - return this; - } - - /** - * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc - return this.enterer; - } - - public boolean hasEnterer() { - return this.enterer != null && !this.enterer.isEmpty(); - } - - /** - * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public ProfessionalClaim setEnterer(Reference value) { - this.enterer = value; - return this; - } - - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public ProfessionalClaim setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - - /** - * @return {@link #facility} (Facility where the services were provided.) - */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc - return this.facility; - } - - public boolean hasFacility() { - return this.facility != null && !this.facility.isEmpty(); - } - - /** - * @param value {@link #facility} (Facility where the services were provided.) - */ - public ProfessionalClaim setFacility(Reference value) { - this.facility = value; - return this; - } - - /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; - } - - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public ProfessionalClaim setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #payee} (The party to be reimbursed for the services.) - */ - public PayeeComponent getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new PayeeComponent(); // cc - return this.payee; - } - - public boolean hasPayee() { - return this.payee != null && !this.payee.isEmpty(); - } - - /** - * @param value {@link #payee} (The party to be reimbursed for the services.) - */ - public ProfessionalClaim setPayee(PayeeComponent value) { - this.payee = value; - return this; - } - - /** - * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc - return this.referral; - } - - public boolean hasReferral() { - return this.referral != null && !this.referral.isEmpty(); - } - - /** - * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ProfessionalClaim setReferral(Reference value) { - this.referral = value; - return this; - } - - /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; - } - - /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ProfessionalClaim setReferralTarget(ReferralRequest value) { - this.referralTarget = value; - return this; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (DiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - // syntactic sugar - public DiagnosisComponent addDiagnosis() { //3 - DiagnosisComponent t = new DiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (Coding item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - // syntactic sugar - public Coding addCondition() { //3 - Coding t = new Coding(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - /** - * @return {@link #patient} (Patient Resource.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Patient Resource.) - */ - public ProfessionalClaim setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public ProfessionalClaim setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public List getCoverage() { - if (this.coverage == null) - this.coverage = new ArrayList(); - return this.coverage; - } - - public boolean hasCoverage() { - if (this.coverage == null) - return false; - for (CoverageComponent item : this.coverage) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - // syntactic sugar - public CoverageComponent addCoverage() { //3 - CoverageComponent t = new CoverageComponent(); - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return t; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public ProfessionalClaim setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public ProfessionalClaim setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - - /** - * @return {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public DateType getAccidentElement() { - if (this.accident == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.accident"); - else if (Configuration.doAutoCreate()) - this.accident = new DateType(); // bb - return this.accident; - } - - public boolean hasAccidentElement() { - return this.accident != null && !this.accident.isEmpty(); - } - - public boolean hasAccident() { - return this.accident != null && !this.accident.isEmpty(); - } - - /** - * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public ProfessionalClaim setAccidentElement(DateType value) { - this.accident = value; - return this; - } - - /** - * @return Date of an accident which these services are addressing. - */ - public Date getAccident() { - return this.accident == null ? null : this.accident.getValue(); - } - - /** - * @param value Date of an accident which these services are addressing. - */ - public ProfessionalClaim setAccident(Date value) { - if (value == null) - this.accident = null; - else { - if (this.accident == null) - this.accident = new DateType(); - this.accident.setValue(value); - } - return this; - } - - /** - * @return {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public Coding getAccidentType() { - if (this.accidentType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfessionalClaim.accidentType"); - else if (Configuration.doAutoCreate()) - this.accidentType = new Coding(); // cc - return this.accidentType; - } - - public boolean hasAccidentType() { - return this.accidentType != null && !this.accidentType.isEmpty(); - } - - /** - * @param value {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public ProfessionalClaim setAccidentType(Coding value) { - this.accidentType = value; - return this; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - public List getInterventionException() { - if (this.interventionException == null) - this.interventionException = new ArrayList(); - return this.interventionException; - } - - public boolean hasInterventionException() { - if (this.interventionException == null) - return false; - for (Coding item : this.interventionException) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - // syntactic sugar - public Coding addInterventionException() { //3 - Coding t = new Coding(); - if (this.interventionException == null) - this.interventionException = new ArrayList(); - this.interventionException.add(t); - return t; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (ItemsComponent item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - // syntactic sugar - public ItemsComponent addItem() { //3 - ItemsComponent t = new ItemsComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - public List getAdditionalMaterials() { - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - return this.additionalMaterials; - } - - public boolean hasAdditionalMaterials() { - if (this.additionalMaterials == null) - return false; - for (Coding item : this.additionalMaterials) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - // syntactic sugar - public Coding addAdditionalMaterials() { //3 - Coding t = new Coding(); - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); - childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); - childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - childrenList.add(new Property("condition", "Coding", "List of patient conditions for which care is sought.", 0, java.lang.Integer.MAX_VALUE, condition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); - childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); - childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); - } - - public ProfessionalClaim copy() { - ProfessionalClaim dst = new ProfessionalClaim(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.use = use == null ? null : use.copy(); - dst.priority = priority == null ? null : priority.copy(); - dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); - dst.enterer = enterer == null ? null : enterer.copy(); - dst.facility = facility == null ? null : facility.copy(); - dst.payee = payee == null ? null : payee.copy(); - dst.referral = referral == null ? null : referral.copy(); - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (DiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (condition != null) { - dst.condition = new ArrayList(); - for (Coding i : condition) - dst.condition.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - if (coverage != null) { - dst.coverage = new ArrayList(); - for (CoverageComponent i : coverage) - dst.coverage.add(i.copy()); - }; - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); - dst.accident = accident == null ? null : accident.copy(); - dst.accidentType = accidentType == null ? null : accidentType.copy(); - if (interventionException != null) { - dst.interventionException = new ArrayList(); - for (Coding i : interventionException) - dst.interventionException.add(i.copy()); - }; - if (item != null) { - dst.item = new ArrayList(); - for (ItemsComponent i : item) - dst.item.add(i.copy()); - }; - if (additionalMaterials != null) { - dst.additionalMaterials = new ArrayList(); - for (Coding i : additionalMaterials) - dst.additionalMaterials.add(i.copy()); - }; - return dst; - } - - protected ProfessionalClaim typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ProfessionalClaim)) - return false; - ProfessionalClaim o = (ProfessionalClaim) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) - && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) && compareDeep(accident, o.accident, true) - && compareDeep(accidentType, o.accidentType, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(item, o.item, true) && compareDeep(additionalMaterials, o.additionalMaterials, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ProfessionalClaim)) - return false; - ProfessionalClaim o = (ProfessionalClaim) other; - return compareValues(created, o.created, true) && compareValues(use, o.use, true) && compareValues(school, o.school, true) - && compareValues(accident, o.accident, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (payee == null || payee.isEmpty()) - && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) - && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) - && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.ProfessionalClaim; - } - - @SearchParamDefinition(name = "identifier", path = "ProfessionalClaim.identifier", description = "The primary identifier of the financial resource", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "use", path = "ProfessionalClaim.use", description = "The kind of financial resource", type = "token") - public static final String SP_USE = "use"; - @SearchParamDefinition(name="patient", path="ProfessionalClaim.patient", description="Patient", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="priority", path="ProfessionalClaim.priority", description="Processing priority requested", type="token" ) - public static final String SP_PRIORITY = "priority"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java deleted file mode 100644 index af0e1650957..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Profile.java +++ /dev/null @@ -1,1513 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions. - */ -@ResourceDef(name="Profile", profile="http://hl7.org/fhir/Profile/Profile") -public class Profile extends DomainResource { - - public enum ResourceProfileStatus { - /** - * This profile is still under development. - */ - DRAFT, - /** - * This profile is ready for normal use. - */ - ACTIVE, - /** - * This profile has been deprecated, withdrawn or superseded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static ResourceProfileStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This profile is still under development."; - case ACTIVE: return "This profile is ready for normal use."; - case RETIRED: return "This profile has been deprecated, withdrawn or superseded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - } - - public static class ResourceProfileStatusEnumFactory implements EnumFactory { - public ResourceProfileStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return ResourceProfileStatus.DRAFT; - if ("active".equals(codeString)) - return ResourceProfileStatus.ACTIVE; - if ("retired".equals(codeString)) - return ResourceProfileStatus.RETIRED; - throw new IllegalArgumentException("Unknown ResourceProfileStatus code '"+codeString+"'"); - } - public String toCode(ResourceProfileStatus code) { - if (code == ResourceProfileStatus.DRAFT) - return "draft"; - if (code == ResourceProfileStatus.ACTIVE) - return "active"; - if (code == ResourceProfileStatus.RETIRED) - return "retired"; - return "?"; - } - } - - @Block() - public static class ProfileMappingComponent extends BackboneElement { - /** - * An Internal id that is used to identify this mapping set when specific mappings are made. - */ - @Child(name="identity", type={IdType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made." ) - protected IdType identity; - - /** - * A URI that identifies the specification that this mapping is expressed to. - */ - @Child(name="uri", type={UriType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="A URI that identifies the specification that this mapping is expressed to." ) - protected UriType uri; - - /** - * A name for the specification that is being mapped to. - */ - @Child(name="name", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) - protected StringType name; - - /** - * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Versions, Issues, Scope limitations etc", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) - protected StringType comments; - - private static final long serialVersionUID = 299630820L; - - public ProfileMappingComponent() { - super(); - } - - public ProfileMappingComponent(IdType identity) { - super(); - this.identity = identity; - } - - /** - * @return {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value - */ - public IdType getIdentityElement() { - if (this.identity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfileMappingComponent.identity"); - else if (Configuration.doAutoCreate()) - this.identity = new IdType(); // bb - return this.identity; - } - - public boolean hasIdentityElement() { - return this.identity != null && !this.identity.isEmpty(); - } - - public boolean hasIdentity() { - return this.identity != null && !this.identity.isEmpty(); - } - - /** - * @param value {@link #identity} (An Internal id that is used to identify this mapping set when specific mappings are made.). This is the underlying object with id, value and extensions. The accessor "getIdentity" gives direct access to the value - */ - public ProfileMappingComponent setIdentityElement(IdType value) { - this.identity = value; - return this; - } - - /** - * @return An Internal id that is used to identify this mapping set when specific mappings are made. - */ - public String getIdentity() { - return this.identity == null ? null : this.identity.getValue(); - } - - /** - * @param value An Internal id that is used to identify this mapping set when specific mappings are made. - */ - public ProfileMappingComponent setIdentity(String value) { - if (this.identity == null) - this.identity = new IdType(); - this.identity.setValue(value); - return this; - } - - /** - * @return {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public UriType getUriElement() { - if (this.uri == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfileMappingComponent.uri"); - else if (Configuration.doAutoCreate()) - this.uri = new UriType(); // bb - return this.uri; - } - - public boolean hasUriElement() { - return this.uri != null && !this.uri.isEmpty(); - } - - public boolean hasUri() { - return this.uri != null && !this.uri.isEmpty(); - } - - /** - * @param value {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public ProfileMappingComponent setUriElement(UriType value) { - this.uri = value; - return this; - } - - /** - * @return A URI that identifies the specification that this mapping is expressed to. - */ - public String getUri() { - return this.uri == null ? null : this.uri.getValue(); - } - - /** - * @param value A URI that identifies the specification that this mapping is expressed to. - */ - public ProfileMappingComponent setUri(String value) { - if (Utilities.noString(value)) - this.uri = null; - else { - if (this.uri == null) - this.uri = new UriType(); - this.uri.setValue(value); - } - return this; - } - - /** - * @return {@link #name} (A name for the specification that is being mapped to.). 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 ProfileMappingComponent.name"); - else if (Configuration.doAutoCreate()) - this.name = new StringType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (A name for the specification that is being mapped to.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public ProfileMappingComponent setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return A name for the specification that is being mapped to. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value A name for the specification that is being mapped to. - */ - public ProfileMappingComponent 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 #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value - */ - public StringType getCommentsElement() { - if (this.comments == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProfileMappingComponent.comments"); - else if (Configuration.doAutoCreate()) - this.comments = new StringType(); // bb - return this.comments; - } - - public boolean hasCommentsElement() { - return this.comments != null && !this.comments.isEmpty(); - } - - public boolean hasComments() { - return this.comments != null && !this.comments.isEmpty(); - } - - /** - * @param value {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value - */ - public ProfileMappingComponent setCommentsElement(StringType value) { - this.comments = value; - return this; - } - - /** - * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - public String getComments() { - return this.comments == null ? null : this.comments.getValue(); - } - - /** - * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. - */ - public ProfileMappingComponent setComments(String value) { - if (Utilities.noString(value)) - this.comments = null; - else { - if (this.comments == null) - this.comments = new StringType(); - this.comments.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identity", "id", "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, java.lang.Integer.MAX_VALUE, identity)); - childrenList.add(new Property("uri", "uri", "A URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); - childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); - } - - public ProfileMappingComponent copy() { - ProfileMappingComponent dst = new ProfileMappingComponent(); - copyValues(dst); - dst.identity = identity == null ? null : identity.copy(); - dst.uri = uri == null ? null : uri.copy(); - dst.name = name == null ? null : name.copy(); - dst.comments = comments == null ? null : comments.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ProfileMappingComponent)) - return false; - ProfileMappingComponent o = (ProfileMappingComponent) other; - return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) - && compareDeep(comments, o.comments, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ProfileMappingComponent)) - return false; - ProfileMappingComponent o = (ProfileMappingComponent) other; - return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) - && compareValues(comments, o.comments, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) - && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); - } - - } - - @Block() - public static class ConstraintComponent extends BackboneElement { - /** - * Captures constraints on each element within the resource. - */ - @Child(name="element", type={ElementDefinition.class}, order=1, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Definition of elements in the resource (if no profile)", formalDefinition="Captures constraints on each element within the resource." ) - protected List element; - - private static final long serialVersionUID = 53896641L; - - public ConstraintComponent() { - super(); - } - - /** - * @return {@link #element} (Captures constraints on each element within the resource.) - */ - public List getElement() { - if (this.element == null) - this.element = new ArrayList(); - return this.element; - } - - public boolean hasElement() { - if (this.element == null) - return false; - for (ElementDefinition item : this.element) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #element} (Captures constraints on each element within the resource.) - */ - // syntactic sugar - public ElementDefinition addElement() { //3 - ElementDefinition t = new ElementDefinition(); - if (this.element == null) - this.element = new ArrayList(); - this.element.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("element", "ElementDefinition", "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); - } - - public ConstraintComponent copy() { - ConstraintComponent dst = new ConstraintComponent(); - copyValues(dst); - if (element != null) { - dst.element = new ArrayList(); - for (ElementDefinition i : element) - dst.element.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ConstraintComponent)) - return false; - ConstraintComponent o = (ConstraintComponent) other; - return compareDeep(element, o.element, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ConstraintComponent)) - return false; - ConstraintComponent o = (ConstraintComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (element == null || element.isEmpty()); - } - - } - - /** - * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. - */ - @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) - @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) - protected UriType url; - - /** - * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). - */ - @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) - protected List identifier; - - /** - * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. - */ - @Child(name = "version", type = {StringType.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) - protected StringType version; - - /** - * A free text natural language name identifying the Profile. - */ - @Child(name = "name", type = {StringType.class}, order = 3, min = 1, max = 1) - @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) - protected StringType name; - - /** - * Details of the individual or organization who accepts responsibility for publishing the profile. - */ - @Child(name = "publisher", type = {StringType.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) - protected StringType publisher; - - /** - * Contact details to assist a user in finding and communicating with the publisher. - */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) - protected List telecom; - - /** - * A free text natural language description of the profile and its use. - */ - @Child(name = "description", type = {StringType.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) - protected StringType description; - - /** - * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. - */ - @Child(name = "code", type = {Coding.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) - protected List code; - - /** - * The status of the profile. - */ - @Child(name = "status", type = {CodeType.class}, order = 8, min = 1, max = 1) - @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) - protected Enumeration status; - - /** - * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - @Child(name = "experimental", type = {BooleanType.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) - protected BooleanType experimental; - - /** - * The date that this version of the profile was published. - */ - @Child(name = "date", type = {DateTimeType.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) - protected DateTimeType date; - - /** - * The Scope and Usage that this profile was created to meet. - */ - @Child(name = "requirements", type = {StringType.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) - protected StringType requirements; - - /** - * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. - */ - @Child(name = "fhirVersion", type = {IdType.class}, order = 12, min = 0, max = 1) - @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) - protected IdType fhirVersion; - - /** - * An external specification that the content is mapped to. - */ - @Child(name = "mapping", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) - protected List mapping; - - /** - * The Resource or Data type being described. - */ - @Child(name = "type", type = {CodeType.class}, order = 14, min = 1, max = 1) - @Description(shortDefinition="The Resource or Data Type being described", formalDefinition="The Resource or Data type being described." ) - protected CodeType type; - - /** - * The structure that is the base on which this set of constraints is derived from. - */ - @Child(name = "base", type = {UriType.class}, order = 15, min = 0, max = 1) - @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) - protected UriType base; - - /** - * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. - */ - @Child(name = "snapshot", type = {}, order = 16, min = 0, max = 1) - @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) - protected ConstraintComponent snapshot; - - /** - * A differential view is expressed relative to the base profile - a statement of differences that it applies. - */ - @Child(name = "differential", type = {ConstraintComponent.class}, order = 17, min = 0, max = 1) - @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) - protected ConstraintComponent differential; - - private static final long serialVersionUID = -1737882057L; - - public Profile() { - super(); - } - - public Profile(UriType url, StringType name, Enumeration status, CodeType type) { - super(); - this.url = url; - this.name = name; - this.status = status; - this.type = type; - } - - /** - * @return {@link #url} (The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value - */ - public UriType getUrlElement() { - if (this.url == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.url"); - else if (Configuration.doAutoCreate()) - this.url = new UriType(); // bb - return this.url; - } - - public boolean hasUrlElement() { - return this.url != null && !this.url.isEmpty(); - } - - public boolean hasUrl() { - return this.url != null && !this.url.isEmpty(); - } - - /** - * @param value {@link #url} (The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value - */ - public Profile setUrlElement(UriType value) { - this.url = value; - return this; - } - - /** - * @return The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. - */ - public String getUrl() { - return this.url == null ? null : this.url.getValue(); - } - - /** - * @param value The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. - */ - public Profile setUrl(String value) { - if (this.url == null) - this.url = new UriType(); - this.url.setValue(value); - return this; - } - - /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public Profile setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. - */ - public Profile setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #name} (A free text natural language name identifying the Profile.). 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 Profile.name"); - else if (Configuration.doAutoCreate()) - this.name = new StringType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public Profile setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return A free text natural language name identifying the Profile. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value A free text natural language name identifying the Profile. - */ - public Profile setName(String value) { - if (this.name == null) - this.name = new StringType(); - this.name.setValue(value); - return this; - } - - /** - * @return {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value - */ - public StringType getPublisherElement() { - if (this.publisher == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.publisher"); - else if (Configuration.doAutoCreate()) - this.publisher = new StringType(); // bb - return this.publisher; - } - - public boolean hasPublisherElement() { - return this.publisher != null && !this.publisher.isEmpty(); - } - - public boolean hasPublisher() { - return this.publisher != null && !this.publisher.isEmpty(); - } - - /** - * @param value {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value - */ - public Profile setPublisherElement(StringType value) { - this.publisher = value; - return this; - } - - /** - * @return Details of the individual or organization who accepts responsibility for publishing the profile. - */ - public String getPublisher() { - return this.publisher == null ? null : this.publisher.getValue(); - } - - /** - * @param value Details of the individual or organization who accepts responsibility for publishing the profile. - */ - public Profile setPublisher(String value) { - if (Utilities.noString(value)) - this.publisher = null; - else { - if (this.publisher == null) - this.publisher = new StringType(); - this.publisher.setValue(value); - } - return this; - } - - /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) - */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; - } - - public boolean hasTelecom() { - if (this.telecom == null) - return false; - for (ContactPoint item : this.telecom) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) - */ - // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); - return t; - } - - /** - * @return {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public Profile setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A free text natural language description of the profile and its use. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A free text natural language description of the profile and its use. - */ - public Profile 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 #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) - */ - public List getCode() { - if (this.code == null) - this.code = new ArrayList(); - return this.code; - } - - public boolean hasCode() { - if (this.code == null) - return false; - for (Coding item : this.code) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) - */ - // syntactic sugar - public Coding addCode() { //3 - Coding t = new Coding(); - if (this.code == null) - this.code = new ArrayList(); - this.code.add(t); - return t; - } - - /** - * @return {@link #status} (The status of the profile.). 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 Profile.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); // 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 profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Profile setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The status of the profile. - */ - public ResourceProfileStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The status of the profile. - */ - public Profile setStatus(ResourceProfileStatus value) { - if (this.status == null) - this.status = new Enumeration(new ResourceProfileStatusEnumFactory()); - this.status.setValue(value); - return this; - } - - /** - * @return {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value - */ - public BooleanType getExperimentalElement() { - if (this.experimental == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.experimental"); - else if (Configuration.doAutoCreate()) - this.experimental = new BooleanType(); // bb - return this.experimental; - } - - public boolean hasExperimentalElement() { - return this.experimental != null && !this.experimental.isEmpty(); - } - - public boolean hasExperimental() { - return this.experimental != null && !this.experimental.isEmpty(); - } - - /** - * @param value {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value - */ - public Profile setExperimentalElement(BooleanType value) { - this.experimental = value; - return this; - } - - /** - * @return This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); - } - - /** - * @param value This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. - */ - public Profile setExperimental(boolean value) { - if (this.experimental == null) - this.experimental = new BooleanType(); - this.experimental.setValue(value); - return this; - } - - /** - * @return {@link #date} (The date that this version of the profile was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; - } - - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); - } - - /** - * @param value {@link #date} (The date that this version of the profile was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public Profile setDateElement(DateTimeType value) { - this.date = value; - return this; - } - - /** - * @return The date that this version of the profile was published. - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The date that this version of the profile was published. - */ - public Profile setDate(Date value) { - if (value == null) - this.date = null; - else { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - } - return this; - } - - /** - * @return {@link #requirements} (The Scope and Usage that this profile was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public StringType getRequirementsElement() { - if (this.requirements == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.requirements"); - else if (Configuration.doAutoCreate()) - this.requirements = new StringType(); // bb - return this.requirements; - } - - public boolean hasRequirementsElement() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - public boolean hasRequirements() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - /** - * @param value {@link #requirements} (The Scope and Usage that this profile was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public Profile setRequirementsElement(StringType value) { - this.requirements = value; - return this; - } - - /** - * @return The Scope and Usage that this profile was created to meet. - */ - public String getRequirements() { - return this.requirements == null ? null : this.requirements.getValue(); - } - - /** - * @param value The Scope and Usage that this profile was created to meet. - */ - public Profile setRequirements(String value) { - if (Utilities.noString(value)) - this.requirements = null; - else { - if (this.requirements == null) - this.requirements = new StringType(); - this.requirements.setValue(value); - } - return this; - } - - /** - * @return {@link #fhirVersion} (The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value - */ - public IdType getFhirVersionElement() { - if (this.fhirVersion == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.fhirVersion"); - else if (Configuration.doAutoCreate()) - this.fhirVersion = new IdType(); // bb - return this.fhirVersion; - } - - public boolean hasFhirVersionElement() { - return this.fhirVersion != null && !this.fhirVersion.isEmpty(); - } - - public boolean hasFhirVersion() { - return this.fhirVersion != null && !this.fhirVersion.isEmpty(); - } - - /** - * @param value {@link #fhirVersion} (The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value - */ - public Profile setFhirVersionElement(IdType value) { - this.fhirVersion = value; - return this; - } - - /** - * @return The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. - */ - public String getFhirVersion() { - return this.fhirVersion == null ? null : this.fhirVersion.getValue(); - } - - /** - * @param value The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. - */ - public Profile setFhirVersion(String value) { - if (Utilities.noString(value)) - this.fhirVersion = null; - else { - if (this.fhirVersion == null) - this.fhirVersion = new IdType(); - this.fhirVersion.setValue(value); - } - return this; - } - - /** - * @return {@link #mapping} (An external specification that the content is mapped to.) - */ - public List getMapping() { - if (this.mapping == null) - this.mapping = new ArrayList(); - return this.mapping; - } - - public boolean hasMapping() { - if (this.mapping == null) - return false; - for (ProfileMappingComponent item : this.mapping) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #mapping} (An external specification that the content is mapped to.) - */ - // syntactic sugar - public ProfileMappingComponent addMapping() { //3 - ProfileMappingComponent t = new ProfileMappingComponent(); - if (this.mapping == null) - this.mapping = new ArrayList(); - this.mapping.add(t); - return t; - } - - /** - * @return {@link #type} (The Resource or Data type being described.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public CodeType getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeType(); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The Resource or Data type being described.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Profile setTypeElement(CodeType value) { - this.type = value; - return this; - } - - /** - * @return The Resource or Data type being described. - */ - public String getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value The Resource or Data type being described. - */ - public Profile setType(String value) { - if (this.type == null) - this.type = new CodeType(); - this.type.setValue(value); - return this; - } - - /** - * @return {@link #base} (The structure that is the base on which this set of constraints is derived from.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value - */ - public UriType getBaseElement() { - if (this.base == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.base"); - else if (Configuration.doAutoCreate()) - this.base = new UriType(); // bb - return this.base; - } - - public boolean hasBaseElement() { - return this.base != null && !this.base.isEmpty(); - } - - public boolean hasBase() { - return this.base != null && !this.base.isEmpty(); - } - - /** - * @param value {@link #base} (The structure that is the base on which this set of constraints is derived from.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value - */ - public Profile setBaseElement(UriType value) { - this.base = value; - return this; - } - - /** - * @return The structure that is the base on which this set of constraints is derived from. - */ - public String getBase() { - return this.base == null ? null : this.base.getValue(); - } - - /** - * @param value The structure that is the base on which this set of constraints is derived from. - */ - public Profile setBase(String value) { - if (Utilities.noString(value)) - this.base = null; - else { - if (this.base == null) - this.base = new UriType(); - this.base.setValue(value); - } - return this; - } - - /** - * @return {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.) - */ - public ConstraintComponent getSnapshot() { - if (this.snapshot == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.snapshot"); - else if (Configuration.doAutoCreate()) - this.snapshot = new ConstraintComponent(); // cc - return this.snapshot; - } - - public boolean hasSnapshot() { - return this.snapshot != null && !this.snapshot.isEmpty(); - } - - /** - * @param value {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.) - */ - public Profile setSnapshot(ConstraintComponent value) { - this.snapshot = value; - return this; - } - - /** - * @return {@link #differential} (A differential view is expressed relative to the base profile - a statement of differences that it applies.) - */ - public ConstraintComponent getDifferential() { - if (this.differential == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Profile.differential"); - else if (Configuration.doAutoCreate()) - this.differential = new ConstraintComponent(); // cc - return this.differential; - } - - public boolean hasDifferential() { - return this.differential != null && !this.differential.isEmpty(); - } - - /** - * @param value {@link #differential} (A differential view is expressed relative to the base profile - a statement of differences that it applies.) - */ - public Profile setDifferential(ConstraintComponent value) { - this.differential = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("url", "uri", "The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.", 0, java.lang.Integer.MAX_VALUE, url)); - childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("name", "string", "A free text natural language name identifying the Profile.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("publisher", "string", "Details of the individual or organization who accepts responsibility for publishing the profile.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); - childrenList.add(new Property("description", "string", "A free text natural language description of the profile and its use.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of templates.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("status", "code", "The status of the profile.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("experimental", "boolean", "This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); - childrenList.add(new Property("date", "dateTime", "The date that this version of the profile was published.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("requirements", "string", "The Scope and Usage that this profile was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); - childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); - childrenList.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, java.lang.Integer.MAX_VALUE, mapping)); - childrenList.add(new Property("type", "code", "The Resource or Data type being described.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("base", "uri", "The structure that is the base on which this set of constraints is derived from.", 0, java.lang.Integer.MAX_VALUE, base)); - childrenList.add(new Property("snapshot", "", "A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.", 0, java.lang.Integer.MAX_VALUE, snapshot)); - childrenList.add(new Property("differential", "@Profile.snapshot", "A differential view is expressed relative to the base profile - a statement of differences that it applies.", 0, java.lang.Integer.MAX_VALUE, differential)); - } - - public Profile copy() { - Profile dst = new Profile(); - copyValues(dst); - dst.url = url == null ? null : url.copy(); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); - dst.name = name == null ? null : name.copy(); - dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); - }; - dst.description = description == null ? null : description.copy(); - if (code != null) { - dst.code = new ArrayList(); - for (Coding i : code) - dst.code.add(i.copy()); - }; - dst.status = status == null ? null : status.copy(); - dst.experimental = experimental == null ? null : experimental.copy(); - dst.date = date == null ? null : date.copy(); - dst.requirements = requirements == null ? null : requirements.copy(); - dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); - if (mapping != null) { - dst.mapping = new ArrayList(); - for (ProfileMappingComponent i : mapping) - dst.mapping.add(i.copy()); - }; - dst.type = type == null ? null : type.copy(); - dst.base = base == null ? null : base.copy(); - dst.snapshot = snapshot == null ? null : snapshot.copy(); - dst.differential = differential == null ? null : differential.copy(); - return dst; - } - - protected Profile typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Profile)) - return false; - Profile o = (Profile) other; - return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) - && compareDeep(name, o.name, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(description, o.description, true) && compareDeep(code, o.code, true) && compareDeep(status, o.status, true) - && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(requirements, o.requirements, true) - && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(mapping, o.mapping, true) && compareDeep(type, o.type, true) - && compareDeep(base, o.base, true) && compareDeep(snapshot, o.snapshot, true) && compareDeep(differential, o.differential, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Profile)) - return false; - Profile o = (Profile) other; - return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) - && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) && compareValues(status, o.status, true) - && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(requirements, o.requirements, true) - && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(type, o.type, true) && compareValues(base, o.base, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (description == null || description.isEmpty()) - && (code == null || code.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (date == null || date.isEmpty()) && (requirements == null || requirements.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) - && (mapping == null || mapping.isEmpty()) && (type == null || type.isEmpty()) && (base == null || base.isEmpty()) - && (snapshot == null || snapshot.isEmpty()) && (differential == null || differential.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Profile; - } - - @SearchParamDefinition(name="date", path="Profile.date", description="The profile publication date", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name="identifier", path="Profile.identifier", description="The identifier of the profile", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "code", path = "Profile.code", description = "A code for the profile", type = "token") - public static final String SP_CODE = "code"; - @SearchParamDefinition(name = "valueset", path = "Profile.snapshot.element.binding.reference[x]", description = "A vocabulary binding code", type = "reference") - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name = "name", path = "Profile.name", description = "Name of the profile", type = "string") - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="Profile.publisher", description="Name of the publisher of the profile", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "description", path = "Profile.description", description = "Text search in the description of the profile", type = "string") - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name = "type", path = "Profile.type", description = "Type of resource that is constrained in the profile", type = "token") - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name="version", path="Profile.version", description="The version identifier of the profile", type="token" ) - public static final String SP_VERSION = "version"; - @SearchParamDefinition(name = "url", path = "Profile.url", description = "Literal URL used to reference this profile", type = "token") - public static final String SP_URL = "url"; - @SearchParamDefinition(name = "status", path = "Profile.status", description = "The current status of the profile", type = "token") - public static final String SP_STATUS = "status"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java deleted file mode 100644 index 912323d79a3..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Readjudicate.java +++ /dev/null @@ -1,759 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides the request and line items details for the claim which is to be re-adjudicated. - */ -@ResourceDef(name="Readjudicate", profile="http://hl7.org/fhir/Profile/Readjudicate") -public class Readjudicate extends DomainResource { - - @Block() - public static class ItemsComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequenceLinkId", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequenceLinkId; - - private static final long serialVersionUID = -1598360600L; - - public ItemsComponent() { - super(); - } - - public ItemsComponent(IntegerType sequenceLinkId) { - super(); - this.sequenceLinkId = sequenceLinkId; - } - - /** - * @return {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value - */ - public IntegerType getSequenceLinkIdElement() { - if (this.sequenceLinkId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.sequenceLinkId"); - else if (Configuration.doAutoCreate()) - this.sequenceLinkId = new IntegerType(); // bb - return this.sequenceLinkId; - } - - public boolean hasSequenceLinkIdElement() { - return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); - } - - public boolean hasSequenceLinkId() { - return this.sequenceLinkId != null && !this.sequenceLinkId.isEmpty(); - } - - /** - * @param value {@link #sequenceLinkId} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequenceLinkId" gives direct access to the value - */ - public ItemsComponent setSequenceLinkIdElement(IntegerType value) { - this.sequenceLinkId = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequenceLinkId() { - return this.sequenceLinkId == null ? 0 : this.sequenceLinkId.getValue(); - } - - /** - * @param value A service line number. - */ - public ItemsComponent setSequenceLinkId(int value) { - if (this.sequenceLinkId == null) - this.sequenceLinkId = new IntegerType(); - this.sequenceLinkId.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequenceLinkId", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequenceLinkId)); - } - - public ItemsComponent copy() { - ItemsComponent dst = new ItemsComponent(); - copyValues(dst); - dst.sequenceLinkId = sequenceLinkId == null ? null : sequenceLinkId.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareDeep(sequenceLinkId, o.sequenceLinkId, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareValues(sequenceLinkId, o.sequenceLinkId, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()); - } - - } - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when this resource was created. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) - protected DateTimeType created; - - /** - * The Insurer who is target of the request. - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; - - /** - * Reference of resource to reverse. - */ - @Child(name = "request", type = {}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource to reverse.) - */ - protected Resource requestTarget; - - /** - * Reference of response to resource to reverse. - */ - @Child(name = "response", type = {}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Reference of response to resource to reverse.) - */ - protected Resource responseTarget; - - /** - * A reference to supply which authenticated the process. - */ - @Child(name = "reference", type = {StringType.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Reference number/string", formalDefinition="A reference to supply which authenticated the process." ) - protected StringType reference; - - /** - * List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated. - */ - @Child(name = "item", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Items to re-adjudicate", formalDefinition="List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated." ) - protected List item; - - private static final long serialVersionUID = 445992972L; - - public Readjudicate() { - super(); - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Readjudicate setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Readjudicate setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateTimeType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public Readjudicate setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when this resource was created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when this resource was created. - */ - public Readjudicate 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 #target} (The Insurer who is target of the request.) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (The Insurer who is target of the request.) - */ - public Readjudicate setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Readjudicate setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Readjudicate setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Readjudicate setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Readjudicate setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Readjudicate setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #request} (Reference of resource to reverse.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.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} (Reference of resource to reverse.) - */ - public Readjudicate setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Readjudicate setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #response} (Reference of response to resource to reverse.) - */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc - return this.response; - } - - public boolean hasResponse() { - return this.response != null && !this.response.isEmpty(); - } - - /** - * @param value {@link #response} (Reference of response to resource to reverse.) - */ - public Readjudicate setResponse(Reference value) { - this.response = value; - return this; - } - - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Readjudicate setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - - /** - * @return {@link #reference} (A reference to supply which authenticated the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value - */ - public StringType getReferenceElement() { - if (this.reference == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Readjudicate.reference"); - else if (Configuration.doAutoCreate()) - this.reference = new StringType(); // bb - return this.reference; - } - - public boolean hasReferenceElement() { - return this.reference != null && !this.reference.isEmpty(); - } - - public boolean hasReference() { - return this.reference != null && !this.reference.isEmpty(); - } - - /** - * @param value {@link #reference} (A reference to supply which authenticated the process.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value - */ - public Readjudicate setReferenceElement(StringType value) { - this.reference = value; - return this; - } - - /** - * @return A reference to supply which authenticated the process. - */ - public String getReference() { - return this.reference == null ? null : this.reference.getValue(); - } - - /** - * @param value A reference to supply which authenticated the process. - */ - public Readjudicate setReference(String value) { - if (Utilities.noString(value)) - this.reference = null; - else { - if (this.reference == null) - this.reference = new StringType(); - this.reference.setValue(value); - } - return this; - } - - /** - * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (ItemsComponent item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.) - */ - // syntactic sugar - public ItemsComponent addItem() { //3 - ItemsComponent t = new ItemsComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); - childrenList.add(new Property("reference", "string", "A reference to supply which authenticated the process.", 0, java.lang.Integer.MAX_VALUE, reference)); - childrenList.add(new Property("item", "", "List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.", 0, java.lang.Integer.MAX_VALUE, item)); - } - - public Readjudicate copy() { - Readjudicate dst = new Readjudicate(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.request = request == null ? null : request.copy(); - dst.response = response == null ? null : response.copy(); - dst.reference = reference == null ? null : reference.copy(); - if (item != null) { - dst.item = new ArrayList(); - for (ItemsComponent i : item) - dst.item.add(i.copy()); - }; - return dst; - } - - protected Readjudicate typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Readjudicate)) - return false; - Readjudicate o = (Readjudicate) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) - && compareDeep(reference, o.reference, true) && compareDeep(item, o.item, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Readjudicate)) - return false; - Readjudicate o = (Readjudicate) other; - return compareValues(created, o.created, true) && compareValues(reference, o.reference, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (reference == null || reference.isEmpty()) - && (item == null || item.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Readjudicate; - } - - @SearchParamDefinition(name="identifier", path="Readjudicate.identifier", description="The business identifier of the Eligibility", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java index 5fd39d1680d..3e386c530d1 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceFactory.java @@ -38,24 +38,18 @@ public class ResourceFactory extends Factory { return new Appointment(); if ("ReferralRequest".equals(name)) return new ReferralRequest(); - if ("OralHealthClaim".equals(name)) - return new OralHealthClaim(); if ("DocumentManifest".equals(name)) return new DocumentManifest(); if ("Goal".equals(name)) return new Goal(); if ("EnrollmentRequest".equals(name)) return new EnrollmentRequest(); - if ("FamilyHistory".equals(name)) - return new FamilyHistory(); if ("Medication".equals(name)) return new Medication(); if ("Subscription".equals(name)) return new Subscription(); if ("DocumentReference".equals(name)) return new DocumentReference(); - if ("SecurityEvent".equals(name)) - return new SecurityEvent(); if ("Parameters".equals(name)) return new Parameters(); if ("Conformance".equals(name)) @@ -84,8 +78,6 @@ public class ResourceFactory extends Factory { return new Supply(); if ("ImagingStudy".equals(name)) return new ImagingStudy(); - if ("Profile".equals(name)) - return new Profile(); if ("DeviceComponent".equals(name)) return new DeviceComponent(); if ("Encounter".equals(name)) @@ -98,34 +90,20 @@ public class ResourceFactory extends Factory { return new Communication(); if ("OrderResponse".equals(name)) return new OrderResponse(); - if ("StatusResponse".equals(name)) - return new StatusResponse(); - if ("VisionClaim".equals(name)) - return new VisionClaim(); if ("DeviceUseStatement".equals(name)) return new DeviceUseStatement(); - if ("Reversal".equals(name)) - return new Reversal(); if ("MessageHeader".equals(name)) return new MessageHeader(); - if ("PharmacyClaim".equals(name)) - return new PharmacyClaim(); if ("ImmunizationRecommendation".equals(name)) return new ImmunizationRecommendation(); - if ("Other".equals(name)) - return new Other(); if ("BodySite".equals(name)) return new BodySite(); if ("Provenance".equals(name)) return new Provenance(); if ("Questionnaire".equals(name)) return new Questionnaire(); - if ("ProfessionalClaim".equals(name)) - return new ProfessionalClaim(); if ("ExplanationOfBenefit".equals(name)) return new ExplanationOfBenefit(); - if ("InstitutionalClaim".equals(name)) - return new InstitutionalClaim(); if ("Specimen".equals(name)) return new Specimen(); if ("AllergyIntolerance".equals(name)) @@ -182,12 +160,8 @@ public class ResourceFactory extends Factory { return new MedicationStatement(); if ("CommunicationRequest".equals(name)) return new CommunicationRequest(); - if ("PendedRequest".equals(name)) - return new PendedRequest(); if ("Basic".equals(name)) return new Basic(); - if ("StatusRequest".equals(name)) - return new StatusRequest(); if ("ClaimResponse".equals(name)) return new ClaimResponse(); if ("EligibilityRequest".equals(name)) @@ -200,16 +174,10 @@ public class ResourceFactory extends Factory { return new ImagingObjectSelection(); if ("HealthcareService".equals(name)) return new HealthcareService(); - if ("CarePlan2".equals(name)) - return new CarePlan2(); if ("DataElement".equals(name)) return new DataElement(); - if ("ClinicalAssessment".equals(name)) - return new ClinicalAssessment(); if ("QuestionnaireAnswers".equals(name)) return new QuestionnaireAnswers(); - if ("Readjudicate".equals(name)) - return new Readjudicate(); if ("NutritionOrder".equals(name)) return new NutritionOrder(); if ("PaymentReconciliation".equals(name)) @@ -226,16 +194,10 @@ public class ResourceFactory extends Factory { return new Patient(); if ("Coverage".equals(name)) return new Coverage(); - if ("ExtensionDefinition".equals(name)) - return new ExtensionDefinition(); if ("NamingSystem".equals(name)) return new NamingSystem(); if ("Schedule".equals(name)) return new Schedule(); - if ("SupportingDocumentation".equals(name)) - return new SupportingDocumentation(); - if ("Alert".equals(name)) - return new Alert(); if ("Location".equals(name)) return new Location(); else diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java index 92b3d700f8c..c508f0fefb4 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ResourceType.java @@ -1,109 +1,97 @@ package org.hl7.fhir.instance.model; -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 public enum ResourceType { Appointment, ReferralRequest, - OralHealthClaim, - DocumentManifest, - Goal, - EnrollmentRequest, - FamilyHistory, - Medication, - Subscription, - DocumentReference, - SecurityEvent, - Conformance, - RelatedPerson, - Practitioner, - Slot, - Contraindication, - Contract, - Person, - RiskAssessment, - Group, - PaymentNotice, - Organization, - Supply, - ImagingStudy, - Profile, - DeviceComponent, - Encounter, - Substance, - SearchParameter, - Communication, - OrderResponse, - StatusResponse, - VisionClaim, - DeviceUseStatement, - Reversal, - MessageHeader, - PharmacyClaim, - ImmunizationRecommendation, - Other, - BodySite, Provenance, Questionnaire, - ProfessionalClaim, ExplanationOfBenefit, - InstitutionalClaim, + DocumentManifest, Specimen, AllergyIntolerance, CarePlan, + Goal, StructureDefinition, + EnrollmentRequest, EpisodeOfCare, MedicationPrescription, OperationOutcome, + Medication, Procedure, List, ConceptMap, + Subscription, ValueSet, OperationDefinition, + DocumentReference, Order, Immunization, Device, VisionPrescription, Media, + Conformance, ProcedureRequest, EligibilityResponse, DeviceUseRequest, DeviceMetric, + Flag, + RelatedPerson, + Practitioner, AppointmentResponse, Observation, MedicationAdministration, + Slot, + Contraindication, EnrollmentResponse, Binary, MedicationStatement, + Contract, + Person, CommunicationRequest, - PendedRequest, + RiskAssessment, Basic, - StatusRequest, + Group, + PaymentNotice, + Organization, ClaimResponse, EligibilityRequest, + ProcessRequest, MedicationDispense, + Supply, DiagnosticReport, + ImagingStudy, ImagingObjectSelection, HealthcareService, - CarePlan2, DataElement, - ClinicalAssessment, + DeviceComponent, + FamilyMemberHistory, QuestionnaireAnswers, - Readjudicate, NutritionOrder, + Encounter, + Substance, + AuditEvent, + SearchParameter, PaymentReconciliation, + Communication, Condition, Composition, Bundle, DiagnosticOrder, Patient, + OrderResponse, Coverage, - ExtensionDefinition, + DeviceUseStatement, + ProcessResponse, NamingSystem, Schedule, - SupportingDocumentation, - Alert, + ClinicalImpression, + MessageHeader, + Claim, + ImmunizationRecommendation, Location, + BodySite, Parameters; @@ -111,206 +99,182 @@ public enum ResourceType { switch (this) { case Appointment: return "appointment"; - case ReferralRequest: - return "referralrequest"; - case OralHealthClaim: - return "oralhealthclaim"; - case DocumentManifest: - return "documentmanifest"; - case Goal: - return "goal"; - case EnrollmentRequest: - return "enrollmentrequest"; - case FamilyHistory: - return "familyhistory"; - case Medication: - return "medication"; - case Subscription: - return "subscription"; - case DocumentReference: - return "documentreference"; - case SecurityEvent: - return "securityevent"; - case Conformance: - return "conformance"; - case RelatedPerson: - return "relatedperson"; - case Practitioner: - return "practitioner"; - case Slot: - return "slot"; - case Contraindication: - return "contraindication"; - case Contract: - return "contract"; - case Person: - return "person"; - case RiskAssessment: - return "riskassessment"; - case Group: - return "group"; - case PaymentNotice: - return "paymentnotice"; - case Organization: - return "organization"; - case Supply: - return "supply"; - case ImagingStudy: - return "imagingstudy"; - case Profile: - return "profile"; - case DeviceComponent: - return "devicecomponent"; - case Encounter: - return "encounter"; - case Substance: - return "substance"; - case SearchParameter: - return "searchparameter"; - case Communication: - return "communication"; - case OrderResponse: - return "orderresponse"; - case StatusResponse: - return "statusresponse"; - case VisionClaim: - return "visionclaim"; - case DeviceUseStatement: - return "deviceusestatement"; - case Reversal: - return "reversal"; - case MessageHeader: - return "messageheader"; - case PharmacyClaim: - return "pharmacyclaim"; - case ImmunizationRecommendation: - return "immunizationrecommendation"; - case Other: - return "other"; - case BodySite: - return "bodysite"; - case Provenance: - return "provenance"; - case Questionnaire: - return "questionnaire"; - case ProfessionalClaim: - return "professionalclaim"; + case ReferralRequest: + return "referralrequest"; + case Provenance: + return "provenance"; + case Questionnaire: + return "questionnaire"; case ExplanationOfBenefit: return "explanationofbenefit"; - case InstitutionalClaim: - return "institutionalclaim"; - case Specimen: - return "specimen"; - case AllergyIntolerance: - return "allergyintolerance"; - case CarePlan: - return "careplan"; - case StructureDefinition: - return "structuredefinition"; - case EpisodeOfCare: - return "episodeofcare"; + case DocumentManifest: + return "documentmanifest"; + case Specimen: + return "specimen"; + case AllergyIntolerance: + return "allergyintolerance"; + case CarePlan: + return "careplan"; + case Goal: + return "goal"; + case StructureDefinition: + return "structuredefinition"; + case EnrollmentRequest: + return "enrollmentrequest"; + case EpisodeOfCare: + return "episodeofcare"; case MedicationPrescription: return "medicationprescription"; case OperationOutcome: return "operationoutcome"; - case Procedure: - return "procedure"; - case List: - return "list"; - case ConceptMap: - return "conceptmap"; - case ValueSet: - return "valueset"; - case OperationDefinition: - return "operationdefinition"; - case Order: - return "order"; + case Medication: + return "medication"; + case Procedure: + return "procedure"; + case List: + return "list"; + case ConceptMap: + return "conceptmap"; + case Subscription: + return "subscription"; + case ValueSet: + return "valueset"; + case OperationDefinition: + return "operationdefinition"; + case DocumentReference: + return "documentreference"; + case Order: + return "order"; case Immunization: return "immunization"; case Device: return "device"; - case VisionPrescription: - return "visionprescription"; - case Media: - return "media"; - case ProcedureRequest: - return "procedurerequest"; - case EligibilityResponse: - return "eligibilityresponse"; - case DeviceUseRequest: - return "deviceuserequest"; - case DeviceMetric: - return "devicemetric"; - case AppointmentResponse: - return "appointmentresponse"; - case Observation: - return "observation"; + case VisionPrescription: + return "visionprescription"; + case Media: + return "media"; + case Conformance: + return "conformance"; + case ProcedureRequest: + return "procedurerequest"; + case EligibilityResponse: + return "eligibilityresponse"; + case DeviceUseRequest: + return "deviceuserequest"; + case DeviceMetric: + return "devicemetric"; + case Flag: + return "flag"; + case RelatedPerson: + return "relatedperson"; + case Practitioner: + return "practitioner"; + case AppointmentResponse: + return "appointmentresponse"; + case Observation: + return "observation"; case MedicationAdministration: return "medicationadministration"; - case EnrollmentResponse: - return "enrollmentresponse"; - case Binary: - return "binary"; - case MedicationStatement: - return "medicationstatement"; - case CommunicationRequest: - return "communicationrequest"; - case PendedRequest: - return "pendedrequest"; + case Slot: + return "slot"; + case Contraindication: + return "contraindication"; + case EnrollmentResponse: + return "enrollmentresponse"; + case Binary: + return "binary"; + case MedicationStatement: + return "medicationstatement"; + case Contract: + return "contract"; + case Person: + return "person"; + case CommunicationRequest: + return "communicationrequest"; + case RiskAssessment: + return "riskassessment"; case Basic: return "basic"; - case StatusRequest: - return "statusrequest"; - case ClaimResponse: - return "claimresponse"; - case EligibilityRequest: - return "eligibilityrequest"; - case MedicationDispense: - return "medicationdispense"; - case DiagnosticReport: - return "diagnosticreport"; - case ImagingObjectSelection: - return "imagingobjectselection"; - case HealthcareService: - return "healthcareservice"; - case CarePlan2: - return "careplan2"; - case DataElement: - return "dataelement"; - case ClinicalAssessment: - return "clinicalassessment"; - case QuestionnaireAnswers: - return "questionnaireanswers"; - case Readjudicate: - return "readjudicate"; - case NutritionOrder: - return "nutritionorder"; - case PaymentReconciliation: - return "paymentreconciliation"; - case Condition: - return "condition"; - case Composition: - return "composition"; - case Bundle: - return "bundle"; + case Group: + return "group"; + case PaymentNotice: + return "paymentnotice"; + case Organization: + return "organization"; + case ClaimResponse: + return "claimresponse"; + case EligibilityRequest: + return "eligibilityrequest"; + case ProcessRequest: + return "processrequest"; + case MedicationDispense: + return "medicationdispense"; + case Supply: + return "supply"; + case DiagnosticReport: + return "diagnosticreport"; + case ImagingStudy: + return "imagingstudy"; + case ImagingObjectSelection: + return "imagingobjectselection"; + case HealthcareService: + return "healthcareservice"; + case DataElement: + return "dataelement"; + case DeviceComponent: + return "devicecomponent"; + case FamilyMemberHistory: + return "familymemberhistory"; + case QuestionnaireAnswers: + return "questionnaireanswers"; + case NutritionOrder: + return "nutritionorder"; + case Encounter: + return "encounter"; + case Substance: + return "substance"; + case AuditEvent: + return "auditevent"; + case SearchParameter: + return "searchparameter"; + case PaymentReconciliation: + return "paymentreconciliation"; + case Communication: + return "communication"; + case Condition: + return "condition"; + case Composition: + return "composition"; + case Bundle: + return "bundle"; case DiagnosticOrder: return "diagnosticorder"; - case Patient: - return "patient"; - case Coverage: - return "coverage"; - case ExtensionDefinition: - return "extensiondefinition"; - case NamingSystem: - return "namingsystem"; - case Schedule: - return "schedule"; - case SupportingDocumentation: - return "supportingdocumentation"; - case Alert: - return "alert"; - case Location: - return "location"; + case Patient: + return "patient"; + case OrderResponse: + return "orderresponse"; + case Coverage: + return "coverage"; + case DeviceUseStatement: + return "deviceusestatement"; + case ProcessResponse: + return "processresponse"; + case NamingSystem: + return "namingsystem"; + case Schedule: + return "schedule"; + case ClinicalImpression: + return "clinicalimpression"; + case MessageHeader: + return "messageheader"; + case Claim: + return "claim"; + case ImmunizationRecommendation: + return "immunizationrecommendation"; + case Location: + return "location"; + case BodySite: + return "bodysite"; case Parameters: return "parameters"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java deleted file mode 100644 index 6344b855186..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Reversal.java +++ /dev/null @@ -1,1250 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides the request and response details for the request for which all actions are to be reversed or terminated. - */ -@ResourceDef(name="Reversal", profile="http://hl7.org/fhir/Profile/Reversal") -public class Reversal extends DomainResource { - - @Block() - public static class PayeeComponent extends BackboneElement { - /** - * Party to be reimbursed: Subscriber, provider, other. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="Payee Type", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) - protected Coding type; - - /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; - - public PayeeComponent() { - super(); - } - - /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public PayeeComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); - } - - public PayeeComponent copy() { - PayeeComponent dst = new PayeeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; - } - - } - - @Block() - public static class ReversalCoverageComponent extends BackboneElement { - /** - * A service line item. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line item." ) - protected IntegerType sequence; - - /** - * The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against. - */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against." ) - protected BooleanType focal; - - /** - * Reference to the program or plan identification, underwriter or payor. - */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) - @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The contract number of a business agreement which describes the terms and conditions. - */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) - protected StringType businessArrangement; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - - private static final long serialVersionUID = 735358731L; - - public ReversalCoverageComponent() { - super(); - } - - public ReversalCoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { - super(); - this.sequence = sequence; - this.focal = focal; - this.coverage = coverage; - this.relationship = relationship; - } - - /** - * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public ReversalCoverageComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line item. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line item. - */ - public ReversalCoverageComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public BooleanType getFocalElement() { - if (this.focal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.focal"); - else if (Configuration.doAutoCreate()) - this.focal = new BooleanType(); // bb - return this.focal; - } - - public boolean hasFocalElement() { - return this.focal != null && !this.focal.isEmpty(); - } - - public boolean hasFocal() { - return this.focal != null && !this.focal.isEmpty(); - } - - /** - * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public ReversalCoverageComponent setFocalElement(BooleanType value) { - this.focal = value; - return this; - } - - /** - * @return The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against. - */ - public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); - } - - /** - * @param value The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against. - */ - public ReversalCoverageComponent setFocal(boolean value) { - if (this.focal == null) - this.focal = new BooleanType(); - this.focal.setValue(value); - return this; - } - - /** - * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.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} (Reference to the program or plan identification, underwriter or payor.) - */ - public ReversalCoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public ReversalCoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public StringType getBusinessArrangementElement() { - if (this.businessArrangement == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.businessArrangement"); - else if (Configuration.doAutoCreate()) - this.businessArrangement = new StringType(); // bb - return this.businessArrangement; - } - - public boolean hasBusinessArrangementElement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - public boolean hasBusinessArrangement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - /** - * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public ReversalCoverageComponent setBusinessArrangementElement(StringType value) { - this.businessArrangement = value; - return this; - } - - /** - * @return The contract number of a business agreement which describes the terms and conditions. - */ - public String getBusinessArrangement() { - return this.businessArrangement == null ? null : this.businessArrangement.getValue(); - } - - /** - * @param value The contract number of a business agreement which describes the terms and conditions. - */ - public ReversalCoverageComponent setBusinessArrangement(String value) { - if (Utilities.noString(value)) - this.businessArrangement = null; - else { - if (this.businessArrangement == null) - this.businessArrangement = new StringType(); - this.businessArrangement.setValue(value); - } - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReversalCoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public ReversalCoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication, that is the Coverage to which the claim is to be adjudicated against.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - } - - public ReversalCoverageComponent copy() { - ReversalCoverageComponent dst = new ReversalCoverageComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.focal = focal == null ? null : focal.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ReversalCoverageComponent)) - return false; - ReversalCoverageComponent o = (ReversalCoverageComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ReversalCoverageComponent)) - return false; - ReversalCoverageComponent o = (ReversalCoverageComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()); - } - - } - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when this resource was created. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) - protected DateTimeType created; - - /** - * The Insurer who is target of the request. - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; - - /** - * Reference of resource to reverse. - */ - @Child(name = "request", type = {OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class, SupportingDocumentation.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource to reverse.) - */ - protected Resource requestTarget; - - /** - * Reference of response to resource to reverse. - */ - @Child(name = "response", type = {ClaimResponse.class, StatusResponse.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Reference of response to resource to reverse.) - */ - protected Resource responseTarget; - - /** - * Payee information supplied for matching purposes. - */ - @Child(name = "payee", type = {}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Payee", formalDefinition="Payee information supplied for matching purposes." ) - protected PayeeComponent payee; - - /** - * Financial instrument by which payment information for health care. - */ - @Child(name = "coverage", type = {}, order = 10, min = 1, max = 1) - @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected ReversalCoverageComponent coverage; - - /** - * If true remove all history excluding audit. - */ - @Child(name = "nullify", type = {BooleanType.class}, order = 11, min = 1, max = 1) - @Description(shortDefinition="Nullify", formalDefinition="If true remove all history excluding audit." ) - protected BooleanType nullify; - - private static final long serialVersionUID = 1077326413L; - - public Reversal() { - super(); - } - - public Reversal(ReversalCoverageComponent coverage, BooleanType nullify) { - super(); - this.coverage = coverage; - this.nullify = nullify; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Reversal setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Reversal setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateTimeType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public Reversal setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when this resource was created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when this resource was created. - */ - public Reversal 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 #target} (The Insurer who is target of the request.) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (The Insurer who is target of the request.) - */ - public Reversal setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Reversal setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reversal setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reversal setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reversal setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Reversal setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #request} (Reference of resource to reverse.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.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} (Reference of resource to reverse.) - */ - public Reversal setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Reversal setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #response} (Reference of response to resource to reverse.) - */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc - return this.response; - } - - public boolean hasResponse() { - return this.response != null && !this.response.isEmpty(); - } - - /** - * @param value {@link #response} (Reference of response to resource to reverse.) - */ - public Reversal setResponse(Reference value) { - this.response = value; - return this; - } - - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Reversal setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - - /** - * @return {@link #payee} (Payee information supplied for matching purposes.) - */ - public PayeeComponent getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new PayeeComponent(); // cc - return this.payee; - } - - public boolean hasPayee() { - return this.payee != null && !this.payee.isEmpty(); - } - - /** - * @param value {@link #payee} (Payee information supplied for matching purposes.) - */ - public Reversal setPayee(PayeeComponent value) { - this.payee = value; - return this; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public ReversalCoverageComponent getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new ReversalCoverageComponent(); // cc - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** - * @param value {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public Reversal setCoverage(ReversalCoverageComponent value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value - */ - public BooleanType getNullifyElement() { - if (this.nullify == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Reversal.nullify"); - else if (Configuration.doAutoCreate()) - this.nullify = new BooleanType(); // bb - return this.nullify; - } - - public boolean hasNullifyElement() { - return this.nullify != null && !this.nullify.isEmpty(); - } - - public boolean hasNullify() { - return this.nullify != null && !this.nullify.isEmpty(); - } - - /** - * @param value {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value - */ - public Reversal setNullifyElement(BooleanType value) { - this.nullify = value; - return this; - } - - /** - * @return If true remove all history excluding audit. - */ - public boolean getNullify() { - return this.nullify == null ? false : this.nullify.getValue(); - } - - /** - * @param value If true remove all history excluding audit. - */ - public Reversal setNullify(boolean value) { - if (this.nullify == null) - this.nullify = new BooleanType(); - this.nullify.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(OralHealthClaim|PharmacyClaim|VisionClaim|ProfessionalClaim|InstitutionalClaim|SupportingDocumentation)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(ClaimResponse|StatusResponse)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); - childrenList.add(new Property("payee", "", "Payee information supplied for matching purposes.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); - } - - public Reversal copy() { - Reversal dst = new Reversal(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.request = request == null ? null : request.copy(); - dst.response = response == null ? null : response.copy(); - dst.payee = payee == null ? null : payee.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.nullify = nullify == null ? null : nullify.copy(); - return dst; - } - - protected Reversal typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof Reversal)) - return false; - Reversal o = (Reversal) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) - && compareDeep(payee, o.payee, true) && compareDeep(coverage, o.coverage, true) && compareDeep(nullify, o.nullify, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof Reversal)) - return false; - Reversal o = (Reversal) other; - return compareValues(created, o.created, true) && compareValues(nullify, o.nullify, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (payee == null || payee.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (nullify == null || nullify.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.Reversal; - } - - @SearchParamDefinition(name="identifier", path="Reversal.identifier", description="The business identifier of the Eligibility", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java deleted file mode 100644 index e99a1972cba..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SecurityEvent.java +++ /dev/null @@ -1,3245 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. - */ -@ResourceDef(name="SecurityEvent", profile="http://hl7.org/fhir/Profile/SecurityEvent") -public class SecurityEvent extends DomainResource { - - public enum SecurityEventAction { - /** - * Create a new database object, such as Placing an Order. - */ - C, - /** - * Display or print data, such as a Doctor Census. - */ - R, - /** - * Update data, such as Revise Patient Information. - */ - U, - /** - * Delete items, such as a doctor master file record. - */ - D, - /** - * Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation. - */ - E, - /** - * added to help the parsers - */ - NULL; - public static SecurityEventAction fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("C".equals(codeString)) - return C; - if ("R".equals(codeString)) - return R; - if ("U".equals(codeString)) - return U; - if ("D".equals(codeString)) - return D; - if ("E".equals(codeString)) - return E; - throw new Exception("Unknown SecurityEventAction code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case C: return "C"; - case R: return "R"; - case U: return "U"; - case D: return "D"; - case E: return "E"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case C: return ""; - case R: return ""; - case U: return ""; - case D: return ""; - case E: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case C: return "Create a new database object, such as Placing an Order."; - case R: return "Display or print data, such as a Doctor Census."; - case U: return "Update data, such as Revise Patient Information."; - case D: return "Delete items, such as a doctor master file record."; - case E: return "Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case C: return "Create"; - case R: return "Read/View/Print"; - case U: return "Update"; - case D: return "Delete"; - case E: return "Execute"; - default: return "?"; - } - } - } - - public static class SecurityEventActionEnumFactory implements EnumFactory { - public SecurityEventAction fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("C".equals(codeString)) - return SecurityEventAction.C; - if ("R".equals(codeString)) - return SecurityEventAction.R; - if ("U".equals(codeString)) - return SecurityEventAction.U; - if ("D".equals(codeString)) - return SecurityEventAction.D; - if ("E".equals(codeString)) - return SecurityEventAction.E; - throw new IllegalArgumentException("Unknown SecurityEventAction code '"+codeString+"'"); - } - public String toCode(SecurityEventAction code) { - if (code == SecurityEventAction.C) - return "C"; - if (code == SecurityEventAction.R) - return "R"; - if (code == SecurityEventAction.U) - return "U"; - if (code == SecurityEventAction.D) - return "D"; - if (code == SecurityEventAction.E) - return "E"; - return "?"; - } - } - - public enum SecurityEventOutcome { - /** - * The operation completed successfully (whether with warnings or not). - */ - _0, - /** - * The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response). - */ - _4, - /** - * The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response). - */ - _8, - /** - * An error of such magnitude occurred that the system is not longer available for use (i.e. the system died). - */ - _12, - /** - * added to help the parsers - */ - NULL; - public static SecurityEventOutcome fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("0".equals(codeString)) - return _0; - if ("4".equals(codeString)) - return _4; - if ("8".equals(codeString)) - return _8; - if ("12".equals(codeString)) - return _12; - throw new Exception("Unknown SecurityEventOutcome code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case _0: return "0"; - case _4: return "4"; - case _8: return "8"; - case _12: return "12"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case _0: return ""; - case _4: return ""; - case _8: return ""; - case _12: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case _0: return "The operation completed successfully (whether with warnings or not)."; - case _4: return "The action was not successful due to some kind of catered for error (often equivalent to an HTTP 400 response)."; - case _8: return "The action was not successful due to some kind of unexpected error (often equivalent to an HTTP 500 response)."; - case _12: return "An error of such magnitude occurred that the system is not longer available for use (i.e. the system died)."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case _0: return "Success"; - case _4: return "Minor failure"; - case _8: return "Serious failure"; - case _12: return "Major failure"; - default: return "?"; - } - } - } - - public static class SecurityEventOutcomeEnumFactory implements EnumFactory { - public SecurityEventOutcome fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("0".equals(codeString)) - return SecurityEventOutcome._0; - if ("4".equals(codeString)) - return SecurityEventOutcome._4; - if ("8".equals(codeString)) - return SecurityEventOutcome._8; - if ("12".equals(codeString)) - return SecurityEventOutcome._12; - throw new IllegalArgumentException("Unknown SecurityEventOutcome code '"+codeString+"'"); - } - public String toCode(SecurityEventOutcome code) { - if (code == SecurityEventOutcome._0) - return "0"; - if (code == SecurityEventOutcome._4) - return "4"; - if (code == SecurityEventOutcome._8) - return "8"; - if (code == SecurityEventOutcome._12) - return "12"; - return "?"; - } - } - - public enum NetworkType { - /** - * Machine Name, including DNS name. - */ - _1, - /** - * IP Address. - */ - _2, - /** - * Telephone Number. - */ - _3, - /** - * Email address. - */ - _4, - /** - * URI (User directory, HTTP-PUT, ftp, etc.). - */ - _5, - /** - * added to help the parsers - */ - NULL; - public static NetworkType fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return _1; - if ("2".equals(codeString)) - return _2; - if ("3".equals(codeString)) - return _3; - if ("4".equals(codeString)) - return _4; - if ("5".equals(codeString)) - return _5; - throw new Exception("Unknown NetworkType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - case _5: return "5"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case _1: return ""; - case _2: return ""; - case _3: return ""; - case _4: return ""; - case _5: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case _1: return "Machine Name, including DNS name."; - case _2: return "IP Address."; - case _3: return "Telephone Number."; - case _4: return "Email address."; - case _5: return "URI (User directory, HTTP-PUT, ftp, etc.)."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - case _5: return "5"; - default: return "?"; - } - } - } - - public static class NetworkTypeEnumFactory implements EnumFactory { - public NetworkType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return NetworkType._1; - if ("2".equals(codeString)) - return NetworkType._2; - if ("3".equals(codeString)) - return NetworkType._3; - if ("4".equals(codeString)) - return NetworkType._4; - if ("5".equals(codeString)) - return NetworkType._5; - throw new IllegalArgumentException("Unknown NetworkType code '"+codeString+"'"); - } - public String toCode(NetworkType code) { - if (code == NetworkType._1) - return "1"; - if (code == NetworkType._2) - return "2"; - if (code == NetworkType._3) - return "3"; - if (code == NetworkType._4) - return "4"; - if (code == NetworkType._5) - return "5"; - return "?"; - } - } - - public enum ObjectType { - /** - * Person. - */ - _1, - /** - * System Object. - */ - _2, - /** - * Organization. - */ - _3, - /** - * Other. - */ - _4, - /** - * added to help the parsers - */ - NULL; - public static ObjectType fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return _1; - if ("2".equals(codeString)) - return _2; - if ("3".equals(codeString)) - return _3; - if ("4".equals(codeString)) - return _4; - throw new Exception("Unknown ObjectType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case _1: return ""; - case _2: return ""; - case _3: return ""; - case _4: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case _1: return "Person."; - case _2: return "System Object."; - case _3: return "Organization."; - case _4: return "Other."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - default: return "?"; - } - } - } - - public static class ObjectTypeEnumFactory implements EnumFactory { - public ObjectType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return ObjectType._1; - if ("2".equals(codeString)) - return ObjectType._2; - if ("3".equals(codeString)) - return ObjectType._3; - if ("4".equals(codeString)) - return ObjectType._4; - throw new IllegalArgumentException("Unknown ObjectType code '"+codeString+"'"); - } - public String toCode(ObjectType code) { - if (code == ObjectType._1) - return "1"; - if (code == ObjectType._2) - return "2"; - if (code == ObjectType._3) - return "3"; - if (code == ObjectType._4) - return "4"; - return "?"; - } - } - - public enum ObjectRole { - /** - * This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal. - */ - _1, - /** - * This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location. - */ - _2, - /** - * This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere. - */ - _3, - /** - * A logical object related to the event. (Deprecated). - */ - _4, - /** - * This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc. - */ - _5, - /** - * A human participant not otherwise identified by some other category. - */ - _6, - /** - * (deprecated). - */ - _7, - /** - * Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work. - */ - _8, - /** - * A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place. - */ - _9, - /** - * Insurance company, or any other organization who accepts responsibility for paying for the healthcare event. - */ - _10, - /** - * A person or active system object involved in the event with a security role. - */ - _11, - /** - * A person or system object involved in the event with the authority to modify security roles of other objects. - */ - _12, - /** - * A passive object, such as a role table, that is relevant to the event. - */ - _13, - /** - * (deprecated) Relevant to certain RBAC security methodologies. - */ - _14, - /** - * Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note, the distinction between practitioners and the doctor that actually provided the care to the patient. - */ - _15, - /** - * The source or destination for data transfer, when it does not match some other role. - */ - _16, - /** - * A source or destination for data transfer, that acts as an archive, database, or similar role. - */ - _17, - /** - * An object that holds schedule information. This could be an appointment book, availability information, etc. - */ - _18, - /** - * An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal. - */ - _19, - /** - * An order, task, work item, procedure step, or other description of work to be performed. E.g., a particular instance of an MPPS. - */ - _20, - /** - * A list of jobs or a system that provides lists of jobs. E.g., an MWL SCP. - */ - _21, - /** - * (Deprecated). - */ - _22, - /** - * An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects. - */ - _23, - /** - * The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important. - */ - _24, - /** - * added to help the parsers - */ - NULL; - public static ObjectRole fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return _1; - if ("2".equals(codeString)) - return _2; - if ("3".equals(codeString)) - return _3; - if ("4".equals(codeString)) - return _4; - if ("5".equals(codeString)) - return _5; - if ("6".equals(codeString)) - return _6; - if ("7".equals(codeString)) - return _7; - if ("8".equals(codeString)) - return _8; - if ("9".equals(codeString)) - return _9; - if ("10".equals(codeString)) - return _10; - if ("11".equals(codeString)) - return _11; - if ("12".equals(codeString)) - return _12; - if ("13".equals(codeString)) - return _13; - if ("14".equals(codeString)) - return _14; - if ("15".equals(codeString)) - return _15; - if ("16".equals(codeString)) - return _16; - if ("17".equals(codeString)) - return _17; - if ("18".equals(codeString)) - return _18; - if ("19".equals(codeString)) - return _19; - if ("20".equals(codeString)) - return _20; - if ("21".equals(codeString)) - return _21; - if ("22".equals(codeString)) - return _22; - if ("23".equals(codeString)) - return _23; - if ("24".equals(codeString)) - return _24; - throw new Exception("Unknown ObjectRole code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - case _5: return "5"; - case _6: return "6"; - case _7: return "7"; - case _8: return "8"; - case _9: return "9"; - case _10: return "10"; - case _11: return "11"; - case _12: return "12"; - case _13: return "13"; - case _14: return "14"; - case _15: return "15"; - case _16: return "16"; - case _17: return "17"; - case _18: return "18"; - case _19: return "19"; - case _20: return "20"; - case _21: return "21"; - case _22: return "22"; - case _23: return "23"; - case _24: return "24"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case _1: return ""; - case _2: return ""; - case _3: return ""; - case _4: return ""; - case _5: return ""; - case _6: return ""; - case _7: return ""; - case _8: return ""; - case _9: return ""; - case _10: return ""; - case _11: return ""; - case _12: return ""; - case _13: return ""; - case _14: return ""; - case _15: return ""; - case _16: return ""; - case _17: return ""; - case _18: return ""; - case _19: return ""; - case _20: return ""; - case _21: return ""; - case _22: return ""; - case _23: return ""; - case _24: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case _1: return "This object is the patient that is the subject of care related to this event. It is identifiable by patient ID or equivalent. The patient may be either human or animal."; - case _2: return "This is a location identified as related to the event. This is usually the location where the event took place. Note that for shipping, the usual events are arrival at a location or departure from a location."; - case _3: return "This object is any kind of persistent document created as a result of the event. This could be a paper report, film, electronic report, DICOM Study, etc. Issues related to medical records life cycle management are conveyed elsewhere."; - case _4: return "A logical object related to the event. (Deprecated)."; - case _5: return "This is any configurable file used to control creation of documents. Examples include the objects maintained by the HL7 Master File transactions, Value Sets, etc."; - case _6: return "A human participant not otherwise identified by some other category."; - case _7: return "(deprecated)."; - case _8: return "Typically a licensed person who is providing or performing care related to the event, generally a physician. The key distinction between doctor and practitioner is with regards to their role, not the licensing. The doctor is the human who actually performed the work. The practitioner is the human or organization that is responsible for the work."; - case _9: return "A person or system that is being notified as part of the event. This is relevant in situations where automated systems provide notifications to other parties when an event took place."; - case _10: return "Insurance company, or any other organization who accepts responsibility for paying for the healthcare event."; - case _11: return "A person or active system object involved in the event with a security role."; - case _12: return "A person or system object involved in the event with the authority to modify security roles of other objects."; - case _13: return "A passive object, such as a role table, that is relevant to the event."; - case _14: return "(deprecated) Relevant to certain RBAC security methodologies."; - case _15: return "Any person or organization responsible for providing care. This encompasses all forms of care, licensed or otherwise, and all sorts of teams and care groups. Note, the distinction between practitioners and the doctor that actually provided the care to the patient."; - case _16: return "The source or destination for data transfer, when it does not match some other role."; - case _17: return "A source or destination for data transfer, that acts as an archive, database, or similar role."; - case _18: return "An object that holds schedule information. This could be an appointment book, availability information, etc."; - case _19: return "An organization or person that is the recipient of services. This could be an organization that is buying services for a patient, or a person that is buying services for an animal."; - case _20: return "An order, task, work item, procedure step, or other description of work to be performed. E.g., a particular instance of an MPPS."; - case _21: return "A list of jobs or a system that provides lists of jobs. E.g., an MWL SCP."; - case _22: return "(Deprecated)."; - case _23: return "An object that specifies or controls the routing or delivery of items. For example, a distribution list is the routing criteria for mail. The items delivered may be documents, jobs, or other objects."; - case _24: return "The contents of a query. This is used to capture the contents of any kind of query. For security surveillance purposes knowing the queries being made is very important."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case _1: return "Patient"; - case _2: return "Location"; - case _3: return "Report"; - case _4: return "DomainResource"; - case _5: return "Master file"; - case _6: return "User"; - case _7: return "List"; - case _8: return "Doctor"; - case _9: return "Subscriber"; - case _10: return "Guarantor"; - case _11: return "Security User Entity"; - case _12: return "Security User Group"; - case _13: return "Security Resource"; - case _14: return "Security Granularity Definition"; - case _15: return "Practitioner"; - case _16: return "Data Destination"; - case _17: return "Data Repository"; - case _18: return "Schedule"; - case _19: return "Customer"; - case _20: return "Job"; - case _21: return "Job Stream"; - case _22: return "Table"; - case _23: return "Routing Criteria"; - case _24: return "Query"; - default: return "?"; - } - } - } - - public static class ObjectRoleEnumFactory implements EnumFactory { - public ObjectRole fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return ObjectRole._1; - if ("2".equals(codeString)) - return ObjectRole._2; - if ("3".equals(codeString)) - return ObjectRole._3; - if ("4".equals(codeString)) - return ObjectRole._4; - if ("5".equals(codeString)) - return ObjectRole._5; - if ("6".equals(codeString)) - return ObjectRole._6; - if ("7".equals(codeString)) - return ObjectRole._7; - if ("8".equals(codeString)) - return ObjectRole._8; - if ("9".equals(codeString)) - return ObjectRole._9; - if ("10".equals(codeString)) - return ObjectRole._10; - if ("11".equals(codeString)) - return ObjectRole._11; - if ("12".equals(codeString)) - return ObjectRole._12; - if ("13".equals(codeString)) - return ObjectRole._13; - if ("14".equals(codeString)) - return ObjectRole._14; - if ("15".equals(codeString)) - return ObjectRole._15; - if ("16".equals(codeString)) - return ObjectRole._16; - if ("17".equals(codeString)) - return ObjectRole._17; - if ("18".equals(codeString)) - return ObjectRole._18; - if ("19".equals(codeString)) - return ObjectRole._19; - if ("20".equals(codeString)) - return ObjectRole._20; - if ("21".equals(codeString)) - return ObjectRole._21; - if ("22".equals(codeString)) - return ObjectRole._22; - if ("23".equals(codeString)) - return ObjectRole._23; - if ("24".equals(codeString)) - return ObjectRole._24; - throw new IllegalArgumentException("Unknown ObjectRole code '"+codeString+"'"); - } - public String toCode(ObjectRole code) { - if (code == ObjectRole._1) - return "1"; - if (code == ObjectRole._2) - return "2"; - if (code == ObjectRole._3) - return "3"; - if (code == ObjectRole._4) - return "4"; - if (code == ObjectRole._5) - return "5"; - if (code == ObjectRole._6) - return "6"; - if (code == ObjectRole._7) - return "7"; - if (code == ObjectRole._8) - return "8"; - if (code == ObjectRole._9) - return "9"; - if (code == ObjectRole._10) - return "10"; - if (code == ObjectRole._11) - return "11"; - if (code == ObjectRole._12) - return "12"; - if (code == ObjectRole._13) - return "13"; - if (code == ObjectRole._14) - return "14"; - if (code == ObjectRole._15) - return "15"; - if (code == ObjectRole._16) - return "16"; - if (code == ObjectRole._17) - return "17"; - if (code == ObjectRole._18) - return "18"; - if (code == ObjectRole._19) - return "19"; - if (code == ObjectRole._20) - return "20"; - if (code == ObjectRole._21) - return "21"; - if (code == ObjectRole._22) - return "22"; - if (code == ObjectRole._23) - return "23"; - if (code == ObjectRole._24) - return "24"; - return "?"; - } - } - - public enum ObjectLifecycle { - /** - * Origination / Creation. - */ - _1, - /** - * Import / Copy from original. - */ - _2, - /** - * Amendment. - */ - _3, - /** - * Verification. - */ - _4, - /** - * Translation. - */ - _5, - /** - * Access / Use. - */ - _6, - /** - * De-identification. - */ - _7, - /** - * Aggregation, summarization, derivation. - */ - _8, - /** - * Report. - */ - _9, - /** - * Export / Copy to target. - */ - _10, - /** - * Disclosure. - */ - _11, - /** - * Receipt of disclosure. - */ - _12, - /** - * Archiving. - */ - _13, - /** - * Logical deletion. - */ - _14, - /** - * Permanent erasure / Physical destruction. - */ - _15, - /** - * added to help the parsers - */ - NULL; - public static ObjectLifecycle fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return _1; - if ("2".equals(codeString)) - return _2; - if ("3".equals(codeString)) - return _3; - if ("4".equals(codeString)) - return _4; - if ("5".equals(codeString)) - return _5; - if ("6".equals(codeString)) - return _6; - if ("7".equals(codeString)) - return _7; - if ("8".equals(codeString)) - return _8; - if ("9".equals(codeString)) - return _9; - if ("10".equals(codeString)) - return _10; - if ("11".equals(codeString)) - return _11; - if ("12".equals(codeString)) - return _12; - if ("13".equals(codeString)) - return _13; - if ("14".equals(codeString)) - return _14; - if ("15".equals(codeString)) - return _15; - throw new Exception("Unknown ObjectLifecycle code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - case _5: return "5"; - case _6: return "6"; - case _7: return "7"; - case _8: return "8"; - case _9: return "9"; - case _10: return "10"; - case _11: return "11"; - case _12: return "12"; - case _13: return "13"; - case _14: return "14"; - case _15: return "15"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case _1: return ""; - case _2: return ""; - case _3: return ""; - case _4: return ""; - case _5: return ""; - case _6: return ""; - case _7: return ""; - case _8: return ""; - case _9: return ""; - case _10: return ""; - case _11: return ""; - case _12: return ""; - case _13: return ""; - case _14: return ""; - case _15: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case _1: return "Origination / Creation."; - case _2: return "Import / Copy from original."; - case _3: return "Amendment."; - case _4: return "Verification."; - case _5: return "Translation."; - case _6: return "Access / Use."; - case _7: return "De-identification."; - case _8: return "Aggregation, summarization, derivation."; - case _9: return "Report."; - case _10: return "Export / Copy to target."; - case _11: return "Disclosure."; - case _12: return "Receipt of disclosure."; - case _13: return "Archiving."; - case _14: return "Logical deletion."; - case _15: return "Permanent erasure / Physical destruction."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case _1: return "1"; - case _2: return "2"; - case _3: return "3"; - case _4: return "4"; - case _5: return "5"; - case _6: return "6"; - case _7: return "7"; - case _8: return "8"; - case _9: return "9"; - case _10: return "10"; - case _11: return "11"; - case _12: return "12"; - case _13: return "13"; - case _14: return "14"; - case _15: return "15"; - default: return "?"; - } - } - } - - public static class ObjectLifecycleEnumFactory implements EnumFactory { - public ObjectLifecycle fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("1".equals(codeString)) - return ObjectLifecycle._1; - if ("2".equals(codeString)) - return ObjectLifecycle._2; - if ("3".equals(codeString)) - return ObjectLifecycle._3; - if ("4".equals(codeString)) - return ObjectLifecycle._4; - if ("5".equals(codeString)) - return ObjectLifecycle._5; - if ("6".equals(codeString)) - return ObjectLifecycle._6; - if ("7".equals(codeString)) - return ObjectLifecycle._7; - if ("8".equals(codeString)) - return ObjectLifecycle._8; - if ("9".equals(codeString)) - return ObjectLifecycle._9; - if ("10".equals(codeString)) - return ObjectLifecycle._10; - if ("11".equals(codeString)) - return ObjectLifecycle._11; - if ("12".equals(codeString)) - return ObjectLifecycle._12; - if ("13".equals(codeString)) - return ObjectLifecycle._13; - if ("14".equals(codeString)) - return ObjectLifecycle._14; - if ("15".equals(codeString)) - return ObjectLifecycle._15; - throw new IllegalArgumentException("Unknown ObjectLifecycle code '"+codeString+"'"); - } - public String toCode(ObjectLifecycle code) { - if (code == ObjectLifecycle._1) - return "1"; - if (code == ObjectLifecycle._2) - return "2"; - if (code == ObjectLifecycle._3) - return "3"; - if (code == ObjectLifecycle._4) - return "4"; - if (code == ObjectLifecycle._5) - return "5"; - if (code == ObjectLifecycle._6) - return "6"; - if (code == ObjectLifecycle._7) - return "7"; - if (code == ObjectLifecycle._8) - return "8"; - if (code == ObjectLifecycle._9) - return "9"; - if (code == ObjectLifecycle._10) - return "10"; - if (code == ObjectLifecycle._11) - return "11"; - if (code == ObjectLifecycle._12) - return "12"; - if (code == ObjectLifecycle._13) - return "13"; - if (code == ObjectLifecycle._14) - return "14"; - if (code == ObjectLifecycle._15) - return "15"; - return "?"; - } - } - - @Block() - public static class SecurityEventEventComponent extends BackboneElement { - /** - * Identifier for a family of the event. - */ - @Child(name="type", type={CodeableConcept.class}, order=1, min=1, max=1) - @Description(shortDefinition="Type/identifier of event", formalDefinition="Identifier for a family of the event." ) - protected CodeableConcept type; - - /** - * Identifier for the category of event. - */ - @Child(name="subtype", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="More specific type/id for the event", formalDefinition="Identifier for the category of event." ) - protected List subtype; - - /** - * Indicator for type of action performed during the event that generated the audit. - */ - @Child(name="action", type={CodeType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Type of action performed during the event", formalDefinition="Indicator for type of action performed during the event that generated the audit." ) - protected Enumeration action; - - /** - * The time when the event occurred on the source. - */ - @Child(name="dateTime", type={InstantType.class}, order=4, min=1, max=1) - @Description(shortDefinition="Time when the event occurred on source", formalDefinition="The time when the event occurred on the source." ) - protected InstantType dateTime; - - /** - * Indicates whether the event succeeded or failed. - */ - @Child(name="outcome", type={CodeType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Whether the event succeeded or failed", formalDefinition="Indicates whether the event succeeded or failed." ) - protected Enumeration outcome; - - /** - * A free text description of the outcome of the event. - */ - @Child(name="outcomeDesc", type={StringType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Description of the event outcome", formalDefinition="A free text description of the outcome of the event." ) - protected StringType outcomeDesc; - - private static final long serialVersionUID = 1351587588L; - - public SecurityEventEventComponent() { - super(); - } - - public SecurityEventEventComponent(CodeableConcept type, InstantType dateTime) { - super(); - this.type = type; - this.dateTime = dateTime; - } - - /** - * @return {@link #type} (Identifier for a family of the event.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventEventComponent.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} (Identifier for a family of the event.) - */ - public SecurityEventEventComponent setType(CodeableConcept value) { - this.type = value; - return this; - } - - /** - * @return {@link #subtype} (Identifier for the category of event.) - */ - public List getSubtype() { - if (this.subtype == null) - this.subtype = new ArrayList(); - return this.subtype; - } - - public boolean hasSubtype() { - if (this.subtype == null) - return false; - for (CodeableConcept item : this.subtype) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subtype} (Identifier for the category of event.) - */ - // syntactic sugar - public CodeableConcept addSubtype() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.subtype == null) - this.subtype = new ArrayList(); - this.subtype.add(t); - return t; - } - - /** - * @return {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value - */ - public Enumeration getActionElement() { - if (this.action == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventEventComponent.action"); - else if (Configuration.doAutoCreate()) - this.action = new Enumeration(new SecurityEventActionEnumFactory()); // bb - return this.action; - } - - public boolean hasActionElement() { - return this.action != null && !this.action.isEmpty(); - } - - public boolean hasAction() { - return this.action != null && !this.action.isEmpty(); - } - - /** - * @param value {@link #action} (Indicator for type of action performed during the event that generated the audit.). This is the underlying object with id, value and extensions. The accessor "getAction" gives direct access to the value - */ - public SecurityEventEventComponent setActionElement(Enumeration value) { - this.action = value; - return this; - } - - /** - * @return Indicator for type of action performed during the event that generated the audit. - */ - public SecurityEventAction getAction() { - return this.action == null ? null : this.action.getValue(); - } - - /** - * @param value Indicator for type of action performed during the event that generated the audit. - */ - public SecurityEventEventComponent setAction(SecurityEventAction value) { - if (value == null) - this.action = null; - else { - if (this.action == null) - this.action = new Enumeration(new SecurityEventActionEnumFactory()); - this.action.setValue(value); - } - return this; - } - - /** - * @return {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value - */ - public InstantType getDateTimeElement() { - if (this.dateTime == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventEventComponent.dateTime"); - else if (Configuration.doAutoCreate()) - this.dateTime = new InstantType(); // bb - return this.dateTime; - } - - public boolean hasDateTimeElement() { - return this.dateTime != null && !this.dateTime.isEmpty(); - } - - public boolean hasDateTime() { - return this.dateTime != null && !this.dateTime.isEmpty(); - } - - /** - * @param value {@link #dateTime} (The time when the event occurred on the source.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value - */ - public SecurityEventEventComponent setDateTimeElement(InstantType value) { - this.dateTime = value; - return this; - } - - /** - * @return The time when the event occurred on the source. - */ - public Date getDateTime() { - return this.dateTime == null ? null : this.dateTime.getValue(); - } - - /** - * @param value The time when the event occurred on the source. - */ - public SecurityEventEventComponent setDateTime(Date value) { - if (this.dateTime == null) - this.dateTime = new InstantType(); - this.dateTime.setValue(value); - return this; - } - - /** - * @return {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value - */ - public Enumeration getOutcomeElement() { - if (this.outcome == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventEventComponent.outcome"); - else if (Configuration.doAutoCreate()) - this.outcome = new Enumeration(new SecurityEventOutcomeEnumFactory()); // bb - return this.outcome; - } - - public boolean hasOutcomeElement() { - return this.outcome != null && !this.outcome.isEmpty(); - } - - public boolean hasOutcome() { - return this.outcome != null && !this.outcome.isEmpty(); - } - - /** - * @param value {@link #outcome} (Indicates whether the event succeeded or failed.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value - */ - public SecurityEventEventComponent setOutcomeElement(Enumeration value) { - this.outcome = value; - return this; - } - - /** - * @return Indicates whether the event succeeded or failed. - */ - public SecurityEventOutcome getOutcome() { - return this.outcome == null ? null : this.outcome.getValue(); - } - - /** - * @param value Indicates whether the event succeeded or failed. - */ - public SecurityEventEventComponent setOutcome(SecurityEventOutcome value) { - if (value == null) - this.outcome = null; - else { - if (this.outcome == null) - this.outcome = new Enumeration(new SecurityEventOutcomeEnumFactory()); - this.outcome.setValue(value); - } - return this; - } - - /** - * @return {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value - */ - public StringType getOutcomeDescElement() { - if (this.outcomeDesc == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventEventComponent.outcomeDesc"); - else if (Configuration.doAutoCreate()) - this.outcomeDesc = new StringType(); // bb - return this.outcomeDesc; - } - - public boolean hasOutcomeDescElement() { - return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); - } - - public boolean hasOutcomeDesc() { - return this.outcomeDesc != null && !this.outcomeDesc.isEmpty(); - } - - /** - * @param value {@link #outcomeDesc} (A free text description of the outcome of the event.). This is the underlying object with id, value and extensions. The accessor "getOutcomeDesc" gives direct access to the value - */ - public SecurityEventEventComponent setOutcomeDescElement(StringType value) { - this.outcomeDesc = value; - return this; - } - - /** - * @return A free text description of the outcome of the event. - */ - public String getOutcomeDesc() { - return this.outcomeDesc == null ? null : this.outcomeDesc.getValue(); - } - - /** - * @param value A free text description of the outcome of the event. - */ - public SecurityEventEventComponent setOutcomeDesc(String value) { - if (Utilities.noString(value)) - this.outcomeDesc = null; - else { - if (this.outcomeDesc == null) - this.outcomeDesc = new StringType(); - this.outcomeDesc.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "CodeableConcept", "Identifier for a family of the event.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("subtype", "CodeableConcept", "Identifier for the category of event.", 0, java.lang.Integer.MAX_VALUE, subtype)); - childrenList.add(new Property("action", "code", "Indicator for type of action performed during the event that generated the audit.", 0, java.lang.Integer.MAX_VALUE, action)); - childrenList.add(new Property("dateTime", "instant", "The time when the event occurred on the source.", 0, java.lang.Integer.MAX_VALUE, dateTime)); - childrenList.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, java.lang.Integer.MAX_VALUE, outcome)); - childrenList.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, java.lang.Integer.MAX_VALUE, outcomeDesc)); - } - - public SecurityEventEventComponent copy() { - SecurityEventEventComponent dst = new SecurityEventEventComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - if (subtype != null) { - dst.subtype = new ArrayList(); - for (CodeableConcept i : subtype) - dst.subtype.add(i.copy()); - }; - dst.action = action == null ? null : action.copy(); - dst.dateTime = dateTime == null ? null : dateTime.copy(); - dst.outcome = outcome == null ? null : outcome.copy(); - dst.outcomeDesc = outcomeDesc == null ? null : outcomeDesc.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventEventComponent)) - return false; - SecurityEventEventComponent o = (SecurityEventEventComponent) other; - return compareDeep(type, o.type, true) && compareDeep(subtype, o.subtype, true) && compareDeep(action, o.action, true) - && compareDeep(dateTime, o.dateTime, true) && compareDeep(outcome, o.outcome, true) && compareDeep(outcomeDesc, o.outcomeDesc, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventEventComponent)) - return false; - SecurityEventEventComponent o = (SecurityEventEventComponent) other; - return compareValues(action, o.action, true) && compareValues(dateTime, o.dateTime, true) && compareValues(outcome, o.outcome, true) - && compareValues(outcomeDesc, o.outcomeDesc, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty()) - && (action == null || action.isEmpty()) && (dateTime == null || dateTime.isEmpty()) && (outcome == null || outcome.isEmpty()) - && (outcomeDesc == null || outcomeDesc.isEmpty()); - } - - } - - @Block() - public static class SecurityEventParticipantComponent extends BackboneElement { - /** - * Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context. - */ - @Child(name="role", type={CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="User roles (e.g. local RBAC codes)", formalDefinition="Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context." ) - protected List role; - - /** - * Direct reference to a resource that identifies the participant. - */ - @Child(name="reference", type={Practitioner.class, Patient.class, Device.class}, order=2, min=0, max=1) - @Description(shortDefinition="Direct reference to resource", formalDefinition="Direct reference to a resource that identifies the participant." ) - protected Reference reference; - - /** - * The actual object that is the target of the reference (Direct reference to a resource that identifies the participant.) - */ - protected Resource referenceTarget; - - /** - * Unique identifier for the user actively participating in the event. - */ - @Child(name="userId", type={StringType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Unique identifier for the user", formalDefinition="Unique identifier for the user actively participating in the event." ) - protected StringType userId; - - /** - * Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available. - */ - @Child(name="altId", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Alternative User id e.g. authentication", formalDefinition="Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available." ) - protected StringType altId; - - /** - * Human-meaningful name for the user. - */ - @Child(name="name", type={StringType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Human-meaningful name for the user", formalDefinition="Human-meaningful name for the user." ) - protected StringType name; - - /** - * Indicator that the user is or is not the requestor, or initiator, for the event being audited. - */ - @Child(name="requestor", type={BooleanType.class}, order=6, min=1, max=1) - @Description(shortDefinition="Whether user is initiator", formalDefinition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." ) - protected BooleanType requestor; - - /** - * Type of media involved. Used when the event is about exporting/importing onto media. - */ - @Child(name="media", type={Coding.class}, order=7, min=0, max=1) - @Description(shortDefinition="Type of media", formalDefinition="Type of media involved. Used when the event is about exporting/importing onto media." ) - protected Coding media; - - /** - * Logical network location for application activity, if the activity has a network location. - */ - @Child(name="network", type={}, order=8, min=0, max=1) - @Description(shortDefinition="Logical network location for application activity", formalDefinition="Logical network location for application activity, if the activity has a network location." ) - protected SecurityEventParticipantNetworkComponent network; - - private static final long serialVersionUID = 594416195L; - - public SecurityEventParticipantComponent() { - super(); - } - - public SecurityEventParticipantComponent(BooleanType requestor) { - super(); - this.requestor = requestor; - } - - /** - * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) - */ - public List getRole() { - if (this.role == null) - this.role = new ArrayList(); - return this.role; - } - - public boolean hasRole() { - if (this.role == null) - return false; - for (CodeableConcept item : this.role) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) - */ - // syntactic sugar - public CodeableConcept addRole() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.role == null) - this.role = new ArrayList(); - this.role.add(t); - return t; - } - - /** - * @return {@link #reference} (Direct reference to a resource that identifies the participant.) - */ - public Reference getReference() { - if (this.reference == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.reference"); - else if (Configuration.doAutoCreate()) - this.reference = new Reference(); // cc - return this.reference; - } - - public boolean hasReference() { - return this.reference != null && !this.reference.isEmpty(); - } - - /** - * @param value {@link #reference} (Direct reference to a resource that identifies the participant.) - */ - public SecurityEventParticipantComponent setReference(Reference value) { - this.reference = value; - return this; - } - - /** - * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) - */ - public Resource getReferenceTarget() { - return this.referenceTarget; - } - - /** - * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Direct reference to a resource that identifies the participant.) - */ - public SecurityEventParticipantComponent setReferenceTarget(Resource value) { - this.referenceTarget = value; - return this; - } - - /** - * @return {@link #userId} (Unique identifier for the user actively participating in the event.). This is the underlying object with id, value and extensions. The accessor "getUserId" gives direct access to the value - */ - public StringType getUserIdElement() { - if (this.userId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.userId"); - else if (Configuration.doAutoCreate()) - this.userId = new StringType(); // bb - return this.userId; - } - - public boolean hasUserIdElement() { - return this.userId != null && !this.userId.isEmpty(); - } - - public boolean hasUserId() { - return this.userId != null && !this.userId.isEmpty(); - } - - /** - * @param value {@link #userId} (Unique identifier for the user actively participating in the event.). This is the underlying object with id, value and extensions. The accessor "getUserId" gives direct access to the value - */ - public SecurityEventParticipantComponent setUserIdElement(StringType value) { - this.userId = value; - return this; - } - - /** - * @return Unique identifier for the user actively participating in the event. - */ - public String getUserId() { - return this.userId == null ? null : this.userId.getValue(); - } - - /** - * @param value Unique identifier for the user actively participating in the event. - */ - public SecurityEventParticipantComponent setUserId(String value) { - if (Utilities.noString(value)) - this.userId = null; - else { - if (this.userId == null) - this.userId = new StringType(); - this.userId.setValue(value); - } - return this; - } - - /** - * @return {@link #altId} (Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value - */ - public StringType getAltIdElement() { - if (this.altId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.altId"); - else if (Configuration.doAutoCreate()) - this.altId = new StringType(); // bb - return this.altId; - } - - public boolean hasAltIdElement() { - return this.altId != null && !this.altId.isEmpty(); - } - - public boolean hasAltId() { - return this.altId != null && !this.altId.isEmpty(); - } - - /** - * @param value {@link #altId} (Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available.). This is the underlying object with id, value and extensions. The accessor "getAltId" gives direct access to the value - */ - public SecurityEventParticipantComponent setAltIdElement(StringType value) { - this.altId = value; - return this; - } - - /** - * @return Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available. - */ - public String getAltId() { - return this.altId == null ? null : this.altId.getValue(); - } - - /** - * @param value Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available. - */ - public SecurityEventParticipantComponent setAltId(String value) { - if (Utilities.noString(value)) - this.altId = null; - else { - if (this.altId == null) - this.altId = new StringType(); - this.altId.setValue(value); - } - return this; - } - - /** - * @return {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public StringType getNameElement() { - if (this.name == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.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} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public SecurityEventParticipantComponent setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return Human-meaningful name for the user. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value Human-meaningful name for the user. - */ - public SecurityEventParticipantComponent 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 #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value - */ - public BooleanType getRequestorElement() { - if (this.requestor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.requestor"); - else if (Configuration.doAutoCreate()) - this.requestor = new BooleanType(); // bb - return this.requestor; - } - - public boolean hasRequestorElement() { - return this.requestor != null && !this.requestor.isEmpty(); - } - - public boolean hasRequestor() { - return this.requestor != null && !this.requestor.isEmpty(); - } - - /** - * @param value {@link #requestor} (Indicator that the user is or is not the requestor, or initiator, for the event being audited.). This is the underlying object with id, value and extensions. The accessor "getRequestor" gives direct access to the value - */ - public SecurityEventParticipantComponent setRequestorElement(BooleanType value) { - this.requestor = value; - return this; - } - - /** - * @return Indicator that the user is or is not the requestor, or initiator, for the event being audited. - */ - public boolean getRequestor() { - return this.requestor == null ? false : this.requestor.getValue(); - } - - /** - * @param value Indicator that the user is or is not the requestor, or initiator, for the event being audited. - */ - public SecurityEventParticipantComponent setRequestor(boolean value) { - if (this.requestor == null) - this.requestor = new BooleanType(); - this.requestor.setValue(value); - return this; - } - - /** - * @return {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) - */ - public Coding getMedia() { - if (this.media == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.media"); - else if (Configuration.doAutoCreate()) - this.media = new Coding(); // cc - return this.media; - } - - public boolean hasMedia() { - return this.media != null && !this.media.isEmpty(); - } - - /** - * @param value {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) - */ - public SecurityEventParticipantComponent setMedia(Coding value) { - this.media = value; - return this; - } - - /** - * @return {@link #network} (Logical network location for application activity, if the activity has a network location.) - */ - public SecurityEventParticipantNetworkComponent getNetwork() { - if (this.network == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantComponent.network"); - else if (Configuration.doAutoCreate()) - this.network = new SecurityEventParticipantNetworkComponent(); // cc - return this.network; - } - - public boolean hasNetwork() { - return this.network != null && !this.network.isEmpty(); - } - - /** - * @param value {@link #network} (Logical network location for application activity, if the activity has a network location.) - */ - public SecurityEventParticipantComponent setNetwork(SecurityEventParticipantNetworkComponent value) { - this.network = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("role", "CodeableConcept", "Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("reference", "Reference(Practitioner|Patient|Device)", "Direct reference to a resource that identifies the participant.", 0, java.lang.Integer.MAX_VALUE, reference)); - childrenList.add(new Property("userId", "string", "Unique identifier for the user actively participating in the event.", 0, java.lang.Integer.MAX_VALUE, userId)); - childrenList.add(new Property("altId", "string", "Alternative Participant Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g., single sign-on), if available.", 0, java.lang.Integer.MAX_VALUE, altId)); - childrenList.add(new Property("name", "string", "Human-meaningful name for the user.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, java.lang.Integer.MAX_VALUE, requestor)); - childrenList.add(new Property("media", "Coding", "Type of media involved. Used when the event is about exporting/importing onto media.", 0, java.lang.Integer.MAX_VALUE, media)); - childrenList.add(new Property("network", "", "Logical network location for application activity, if the activity has a network location.", 0, java.lang.Integer.MAX_VALUE, network)); - } - - public SecurityEventParticipantComponent copy() { - SecurityEventParticipantComponent dst = new SecurityEventParticipantComponent(); - copyValues(dst); - if (role != null) { - dst.role = new ArrayList(); - for (CodeableConcept i : role) - dst.role.add(i.copy()); - }; - dst.reference = reference == null ? null : reference.copy(); - dst.userId = userId == null ? null : userId.copy(); - dst.altId = altId == null ? null : altId.copy(); - dst.name = name == null ? null : name.copy(); - dst.requestor = requestor == null ? null : requestor.copy(); - dst.media = media == null ? null : media.copy(); - dst.network = network == null ? null : network.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventParticipantComponent)) - return false; - SecurityEventParticipantComponent o = (SecurityEventParticipantComponent) other; - return compareDeep(role, o.role, true) && compareDeep(reference, o.reference, true) && compareDeep(userId, o.userId, true) - && compareDeep(altId, o.altId, true) && compareDeep(name, o.name, true) && compareDeep(requestor, o.requestor, true) - && compareDeep(media, o.media, true) && compareDeep(network, o.network, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventParticipantComponent)) - return false; - SecurityEventParticipantComponent o = (SecurityEventParticipantComponent) other; - return compareValues(userId, o.userId, true) && compareValues(altId, o.altId, true) && compareValues(name, o.name, true) - && compareValues(requestor, o.requestor, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (reference == null || reference.isEmpty()) - && (userId == null || userId.isEmpty()) && (altId == null || altId.isEmpty()) && (name == null || name.isEmpty()) - && (requestor == null || requestor.isEmpty()) && (media == null || media.isEmpty()) && (network == null || network.isEmpty()) - ; - } - - } - - @Block() - public static class SecurityEventParticipantNetworkComponent extends BackboneElement { - /** - * An identifier for the network access point of the user device for the audit event. - */ - @Child(name="identifier", type={StringType.class}, order=1, min=0, max=1) - @Description(shortDefinition="Identifier for the network access point of the user device", formalDefinition="An identifier for the network access point of the user device for the audit event." ) - protected StringType identifier; - - /** - * An identifier for the type of network access point that originated the audit event. - */ - @Child(name="type", type={CodeType.class}, order=2, min=0, max=1) - @Description(shortDefinition="The type of network access point", formalDefinition="An identifier for the type of network access point that originated the audit event." ) - protected Enumeration type; - - private static final long serialVersionUID = -1946856025L; - - public SecurityEventParticipantNetworkComponent() { - super(); - } - - /** - * @return {@link #identifier} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value - */ - public StringType getIdentifierElement() { - if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantNetworkComponent.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new StringType(); // bb - return this.identifier; - } - - public boolean hasIdentifierElement() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - /** - * @param value {@link #identifier} (An identifier for the network access point of the user device for the audit event.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value - */ - public SecurityEventParticipantNetworkComponent setIdentifierElement(StringType value) { - this.identifier = value; - return this; - } - - /** - * @return An identifier for the network access point of the user device for the audit event. - */ - public String getIdentifier() { - return this.identifier == null ? null : this.identifier.getValue(); - } - - /** - * @param value An identifier for the network access point of the user device for the audit event. - */ - public SecurityEventParticipantNetworkComponent setIdentifier(String value) { - if (Utilities.noString(value)) - this.identifier = null; - else { - if (this.identifier == null) - this.identifier = new StringType(); - this.identifier.setValue(value); - } - return this; - } - - /** - * @return {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Enumeration getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventParticipantNetworkComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new NetworkTypeEnumFactory()); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (An identifier for the type of network access point that originated the audit event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public SecurityEventParticipantNetworkComponent setTypeElement(Enumeration value) { - this.type = value; - return this; - } - - /** - * @return An identifier for the type of network access point that originated the audit event. - */ - public NetworkType getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value An identifier for the type of network access point that originated the audit event. - */ - public SecurityEventParticipantNetworkComponent setType(NetworkType value) { - if (value == null) - this.type = null; - else { - if (this.type == null) - this.type = new Enumeration(new NetworkTypeEnumFactory()); - this.type.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "string", "An identifier for the network access point of the user device for the audit event.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("type", "code", "An identifier for the type of network access point that originated the audit event.", 0, java.lang.Integer.MAX_VALUE, type)); - } - - public SecurityEventParticipantNetworkComponent copy() { - SecurityEventParticipantNetworkComponent dst = new SecurityEventParticipantNetworkComponent(); - copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); - dst.type = type == null ? null : type.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventParticipantNetworkComponent)) - return false; - SecurityEventParticipantNetworkComponent o = (SecurityEventParticipantNetworkComponent) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventParticipantNetworkComponent)) - return false; - SecurityEventParticipantNetworkComponent o = (SecurityEventParticipantNetworkComponent) other; - return compareValues(identifier, o.identifier, true) && compareValues(type, o.type, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - ; - } - - } - - @Block() - public static class SecurityEventSourceComponent extends BackboneElement { - /** - * Logical source location within the healthcare enterprise network. - */ - @Child(name="site", type={StringType.class}, order=1, min=0, max=1) - @Description(shortDefinition="Logical source location within the enterprise", formalDefinition="Logical source location within the healthcare enterprise network." ) - protected StringType site; - - /** - * Identifier of the source where the event originated. - */ - @Child(name="identifier", type={StringType.class}, order=2, min=1, max=1) - @Description(shortDefinition="The id of source where event originated", formalDefinition="Identifier of the source where the event originated." ) - protected StringType identifier; - - /** - * Code specifying the type of source where event originated. - */ - @Child(name="type", type={Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="The type of source where event originated", formalDefinition="Code specifying the type of source where event originated." ) - protected List type; - - private static final long serialVersionUID = -382040480L; - - public SecurityEventSourceComponent() { - super(); - } - - public SecurityEventSourceComponent(StringType identifier) { - super(); - this.identifier = identifier; - } - - /** - * @return {@link #site} (Logical source location within the healthcare enterprise network.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value - */ - public StringType getSiteElement() { - if (this.site == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventSourceComponent.site"); - else if (Configuration.doAutoCreate()) - this.site = new StringType(); // bb - return this.site; - } - - public boolean hasSiteElement() { - return this.site != null && !this.site.isEmpty(); - } - - public boolean hasSite() { - return this.site != null && !this.site.isEmpty(); - } - - /** - * @param value {@link #site} (Logical source location within the healthcare enterprise network.). This is the underlying object with id, value and extensions. The accessor "getSite" gives direct access to the value - */ - public SecurityEventSourceComponent setSiteElement(StringType value) { - this.site = value; - return this; - } - - /** - * @return Logical source location within the healthcare enterprise network. - */ - public String getSite() { - return this.site == null ? null : this.site.getValue(); - } - - /** - * @param value Logical source location within the healthcare enterprise network. - */ - public SecurityEventSourceComponent setSite(String value) { - if (Utilities.noString(value)) - this.site = null; - else { - if (this.site == null) - this.site = new StringType(); - this.site.setValue(value); - } - return this; - } - - /** - * @return {@link #identifier} (Identifier of the source where the event originated.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value - */ - public StringType getIdentifierElement() { - if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventSourceComponent.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new StringType(); // bb - return this.identifier; - } - - public boolean hasIdentifierElement() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - /** - * @param value {@link #identifier} (Identifier of the source where the event originated.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value - */ - public SecurityEventSourceComponent setIdentifierElement(StringType value) { - this.identifier = value; - return this; - } - - /** - * @return Identifier of the source where the event originated. - */ - public String getIdentifier() { - return this.identifier == null ? null : this.identifier.getValue(); - } - - /** - * @param value Identifier of the source where the event originated. - */ - public SecurityEventSourceComponent setIdentifier(String value) { - if (this.identifier == null) - this.identifier = new StringType(); - this.identifier.setValue(value); - return this; - } - - /** - * @return {@link #type} (Code specifying the type of source where event originated.) - */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; - } - - public boolean hasType() { - if (this.type == null) - return false; - for (Coding item : this.type) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #type} (Code specifying the type of source where event originated.) - */ - // syntactic sugar - public Coding addType() { //3 - Coding t = new Coding(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("site", "string", "Logical source location within the healthcare enterprise network.", 0, java.lang.Integer.MAX_VALUE, site)); - childrenList.add(new Property("identifier", "string", "Identifier of the source where the event originated.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("type", "Coding", "Code specifying the type of source where event originated.", 0, java.lang.Integer.MAX_VALUE, type)); - } - - public SecurityEventSourceComponent copy() { - SecurityEventSourceComponent dst = new SecurityEventSourceComponent(); - copyValues(dst); - dst.site = site == null ? null : site.copy(); - dst.identifier = identifier == null ? null : identifier.copy(); - if (type != null) { - dst.type = new ArrayList(); - for (Coding i : type) - dst.type.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventSourceComponent)) - return false; - SecurityEventSourceComponent o = (SecurityEventSourceComponent) other; - return compareDeep(site, o.site, true) && compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventSourceComponent)) - return false; - SecurityEventSourceComponent o = (SecurityEventSourceComponent) other; - return compareValues(site, o.site, true) && compareValues(identifier, o.identifier, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (site == null || site.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (type == null || type.isEmpty()); - } - - } - - @Block() - public static class SecurityEventObjectComponent extends BackboneElement { - /** - * Identifies a specific instance of the participant object. The reference should always be version specific. - */ - @Child(name="identifier", type={Identifier.class}, order=1, min=0, max=1) - @Description(shortDefinition="Specific instance of object (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) - protected Identifier identifier; - - /** - * Identifies a specific instance of the participant object. The reference should always be version specific. - */ - @Child(name="reference", type={}, order=2, min=0, max=1) - @Description(shortDefinition="Specific instance of resource (e.g. versioned)", formalDefinition="Identifies a specific instance of the participant object. The reference should always be version specific." ) - protected Reference reference; - - /** - * The actual object that is the target of the reference (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - protected Resource referenceTarget; - - /** - * Object type being audited. - */ - @Child(name="type", type={CodeType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Object type being audited", formalDefinition="Object type being audited." ) - protected Enumeration type; - - /** - * Code representing the functional application role of Participant Object being audited. - */ - @Child(name="role", type={CodeType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Functional application role of Object", formalDefinition="Code representing the functional application role of Participant Object being audited." ) - protected Enumeration role; - - /** - * Identifier for the data life-cycle stage for the participant object. - */ - @Child(name="lifecycle", type={CodeType.class}, order=5, min=0, max=1) - @Description(shortDefinition="Life-cycle stage for the object", formalDefinition="Identifier for the data life-cycle stage for the participant object." ) - protected Enumeration lifecycle; - - /** - * Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics. - */ - @Child(name="sensitivity", type={CodeableConcept.class}, order=6, min=0, max=1) - @Description(shortDefinition="Policy-defined sensitivity for the object", formalDefinition="Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics." ) - protected CodeableConcept sensitivity; - - /** - * An instance-specific descriptor of the Participant Object ID audited, such as a person's name. - */ - @Child(name="name", type={StringType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Instance-specific descriptor for Object", formalDefinition="An instance-specific descriptor of the Participant Object ID audited, such as a person's name." ) - protected StringType name; - - /** - * Text that describes the object in more detail. - */ - @Child(name="description", type={StringType.class}, order=8, min=0, max=1) - @Description(shortDefinition="Descriptive text", formalDefinition="Text that describes the object in more detail." ) - protected StringType description; - - /** - * The actual query for a query-type participant object. - */ - @Child(name="query", type={Base64BinaryType.class}, order=9, min=0, max=1) - @Description(shortDefinition="Actual query for object", formalDefinition="The actual query for a query-type participant object." ) - protected Base64BinaryType query; - - /** - * Additional Information about the Object. - */ - @Child(name="detail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional Information about the Object", formalDefinition="Additional Information about the Object." ) - protected List detail; - - private static final long serialVersionUID = -268126947L; - - public SecurityEventObjectComponent() { - super(); - } - - /** - * @return {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public Identifier getIdentifier() { - if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new Identifier(); // cc - return this.identifier; - } - - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - /** - * @param value {@link #identifier} (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public SecurityEventObjectComponent setIdentifier(Identifier value) { - this.identifier = value; - return this; - } - - /** - * @return {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public Reference getReference() { - if (this.reference == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.reference"); - else if (Configuration.doAutoCreate()) - this.reference = new Reference(); // cc - return this.reference; - } - - public boolean hasReference() { - return this.reference != null && !this.reference.isEmpty(); - } - - /** - * @param value {@link #reference} (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public SecurityEventObjectComponent setReference(Reference value) { - this.reference = value; - return this; - } - - /** - * @return {@link #reference} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public Resource getReferenceTarget() { - return this.referenceTarget; - } - - /** - * @param value {@link #reference} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies a specific instance of the participant object. The reference should always be version specific.) - */ - public SecurityEventObjectComponent setReferenceTarget(Resource value) { - this.referenceTarget = value; - return this; - } - - /** - * @return {@link #type} (Object type being audited.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Enumeration getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new ObjectTypeEnumFactory()); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Object type being audited.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public SecurityEventObjectComponent setTypeElement(Enumeration value) { - this.type = value; - return this; - } - - /** - * @return Object type being audited. - */ - public ObjectType getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value Object type being audited. - */ - public SecurityEventObjectComponent setType(ObjectType value) { - if (value == null) - this.type = null; - else { - if (this.type == null) - this.type = new Enumeration(new ObjectTypeEnumFactory()); - this.type.setValue(value); - } - return this; - } - - /** - * @return {@link #role} (Code representing the functional application role of Participant Object being audited.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value - */ - public Enumeration getRoleElement() { - if (this.role == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.role"); - else if (Configuration.doAutoCreate()) - this.role = new Enumeration(new ObjectRoleEnumFactory()); // bb - return this.role; - } - - public boolean hasRoleElement() { - return this.role != null && !this.role.isEmpty(); - } - - public boolean hasRole() { - return this.role != null && !this.role.isEmpty(); - } - - /** - * @param value {@link #role} (Code representing the functional application role of Participant Object being audited.). This is the underlying object with id, value and extensions. The accessor "getRole" gives direct access to the value - */ - public SecurityEventObjectComponent setRoleElement(Enumeration value) { - this.role = value; - return this; - } - - /** - * @return Code representing the functional application role of Participant Object being audited. - */ - public ObjectRole getRole() { - return this.role == null ? null : this.role.getValue(); - } - - /** - * @param value Code representing the functional application role of Participant Object being audited. - */ - public SecurityEventObjectComponent setRole(ObjectRole value) { - if (value == null) - this.role = null; - else { - if (this.role == null) - this.role = new Enumeration(new ObjectRoleEnumFactory()); - this.role.setValue(value); - } - return this; - } - - /** - * @return {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.). This is the underlying object with id, value and extensions. The accessor "getLifecycle" gives direct access to the value - */ - public Enumeration getLifecycleElement() { - if (this.lifecycle == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.lifecycle"); - else if (Configuration.doAutoCreate()) - this.lifecycle = new Enumeration(new ObjectLifecycleEnumFactory()); // bb - return this.lifecycle; - } - - public boolean hasLifecycleElement() { - return this.lifecycle != null && !this.lifecycle.isEmpty(); - } - - public boolean hasLifecycle() { - return this.lifecycle != null && !this.lifecycle.isEmpty(); - } - - /** - * @param value {@link #lifecycle} (Identifier for the data life-cycle stage for the participant object.). This is the underlying object with id, value and extensions. The accessor "getLifecycle" gives direct access to the value - */ - public SecurityEventObjectComponent setLifecycleElement(Enumeration value) { - this.lifecycle = value; - return this; - } - - /** - * @return Identifier for the data life-cycle stage for the participant object. - */ - public ObjectLifecycle getLifecycle() { - return this.lifecycle == null ? null : this.lifecycle.getValue(); - } - - /** - * @param value Identifier for the data life-cycle stage for the participant object. - */ - public SecurityEventObjectComponent setLifecycle(ObjectLifecycle value) { - if (value == null) - this.lifecycle = null; - else { - if (this.lifecycle == null) - this.lifecycle = new Enumeration(new ObjectLifecycleEnumFactory()); - this.lifecycle.setValue(value); - } - return this; - } - - /** - * @return {@link #sensitivity} (Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics.) - */ - public CodeableConcept getSensitivity() { - if (this.sensitivity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.sensitivity"); - else if (Configuration.doAutoCreate()) - this.sensitivity = new CodeableConcept(); // cc - return this.sensitivity; - } - - public boolean hasSensitivity() { - return this.sensitivity != null && !this.sensitivity.isEmpty(); - } - - /** - * @param value {@link #sensitivity} (Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics.) - */ - public SecurityEventObjectComponent setSensitivity(CodeableConcept value) { - this.sensitivity = value; - return this; - } - - /** - * @return {@link #name} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public StringType getNameElement() { - if (this.name == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.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} (An instance-specific descriptor of the Participant Object ID audited, such as a person's name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public SecurityEventObjectComponent setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return An instance-specific descriptor of the Participant Object ID audited, such as a person's name. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value An instance-specific descriptor of the Participant Object ID audited, such as a person's name. - */ - public SecurityEventObjectComponent setName(String value) { - if (Utilities.noString(value)) - this.name = null; - else { - if (this.name == null) - this.name = new StringType(); - this.name.setValue(value); - } - return this; - } - - /** - * @return {@link #description} (Text that describes the object in more detail.). 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 SecurityEventObjectComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (Text that describes the object in more detail.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public SecurityEventObjectComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return Text that describes the object in more detail. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value Text that describes the object in more detail. - */ - public SecurityEventObjectComponent 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 #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value - */ - public Base64BinaryType getQueryElement() { - if (this.query == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectComponent.query"); - else if (Configuration.doAutoCreate()) - this.query = new Base64BinaryType(); // bb - return this.query; - } - - public boolean hasQueryElement() { - return this.query != null && !this.query.isEmpty(); - } - - public boolean hasQuery() { - return this.query != null && !this.query.isEmpty(); - } - - /** - * @param value {@link #query} (The actual query for a query-type participant object.). This is the underlying object with id, value and extensions. The accessor "getQuery" gives direct access to the value - */ - public SecurityEventObjectComponent setQueryElement(Base64BinaryType value) { - this.query = value; - return this; - } - - /** - * @return The actual query for a query-type participant object. - */ - public byte[] getQuery() { - return this.query == null ? null : this.query.getValue(); - } - - /** - * @param value The actual query for a query-type participant object. - */ - public SecurityEventObjectComponent setQuery(byte[] value) { - if (value == null) - this.query = null; - else { - if (this.query == null) - this.query = new Base64BinaryType(); - this.query.setValue(value); - } - return this; - } - - /** - * @return {@link #detail} (Additional Information about the Object.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (SecurityEventObjectDetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Additional Information about the Object.) - */ - // syntactic sugar - public SecurityEventObjectDetailComponent addDetail() { //3 - SecurityEventObjectDetailComponent t = new SecurityEventObjectDetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("reference", "Reference(Any)", "Identifies a specific instance of the participant object. The reference should always be version specific.", 0, java.lang.Integer.MAX_VALUE, reference)); - childrenList.add(new Property("type", "code", "Object type being audited.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("role", "code", "Code representing the functional application role of Participant Object being audited.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("lifecycle", "code", "Identifier for the data life-cycle stage for the participant object.", 0, java.lang.Integer.MAX_VALUE, lifecycle)); - childrenList.add(new Property("sensitivity", "CodeableConcept", "Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics.", 0, java.lang.Integer.MAX_VALUE, sensitivity)); - childrenList.add(new Property("name", "string", "An instance-specific descriptor of the Participant Object ID audited, such as a person's name.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("description", "string", "Text that describes the object in more detail.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("query", "base64Binary", "The actual query for a query-type participant object.", 0, java.lang.Integer.MAX_VALUE, query)); - childrenList.add(new Property("detail", "", "Additional Information about the Object.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public SecurityEventObjectComponent copy() { - SecurityEventObjectComponent dst = new SecurityEventObjectComponent(); - copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); - dst.reference = reference == null ? null : reference.copy(); - dst.type = type == null ? null : type.copy(); - dst.role = role == null ? null : role.copy(); - dst.lifecycle = lifecycle == null ? null : lifecycle.copy(); - dst.sensitivity = sensitivity == null ? null : sensitivity.copy(); - dst.name = name == null ? null : name.copy(); - dst.description = description == null ? null : description.copy(); - dst.query = query == null ? null : query.copy(); - if (detail != null) { - dst.detail = new ArrayList(); - for (SecurityEventObjectDetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventObjectComponent)) - return false; - SecurityEventObjectComponent o = (SecurityEventObjectComponent) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(reference, o.reference, true) - && compareDeep(type, o.type, true) && compareDeep(role, o.role, true) && compareDeep(lifecycle, o.lifecycle, true) - && compareDeep(sensitivity, o.sensitivity, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) - && compareDeep(query, o.query, true) && compareDeep(detail, o.detail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventObjectComponent)) - return false; - SecurityEventObjectComponent o = (SecurityEventObjectComponent) other; - return compareValues(type, o.type, true) && compareValues(role, o.role, true) && compareValues(lifecycle, o.lifecycle, true) - && compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(query, o.query, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) - && (type == null || type.isEmpty()) && (role == null || role.isEmpty()) && (lifecycle == null || lifecycle.isEmpty()) - && (sensitivity == null || sensitivity.isEmpty()) && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) - && (query == null || query.isEmpty()) && (detail == null || detail.isEmpty()); - } - - } - - @Block() - public static class SecurityEventObjectDetailComponent extends BackboneElement { - /** - * Name of the property. - */ - @Child(name="type", type={StringType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Name of the property", formalDefinition="Name of the property." ) - protected StringType type; - - /** - * Property value. - */ - @Child(name="value", type={Base64BinaryType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Property value", formalDefinition="Property value." ) - protected Base64BinaryType value; - - private static final long serialVersionUID = 11139504L; - - public SecurityEventObjectDetailComponent() { - super(); - } - - public SecurityEventObjectDetailComponent(StringType type, Base64BinaryType value) { - super(); - this.type = type; - this.value = value; - } - - /** - * @return {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public StringType getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new StringType(); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Name of the property.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public SecurityEventObjectDetailComponent setTypeElement(StringType value) { - this.type = value; - return this; - } - - /** - * @return Name of the property. - */ - public String getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value Name of the property. - */ - public SecurityEventObjectDetailComponent setType(String value) { - if (this.type == null) - this.type = new StringType(); - this.type.setValue(value); - return this; - } - - /** - * @return {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value - */ - public Base64BinaryType getValueElement() { - if (this.value == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEventObjectDetailComponent.value"); - else if (Configuration.doAutoCreate()) - this.value = new Base64BinaryType(); // bb - return this.value; - } - - public boolean hasValueElement() { - return this.value != null && !this.value.isEmpty(); - } - - public boolean hasValue() { - return this.value != null && !this.value.isEmpty(); - } - - /** - * @param value {@link #value} (Property value.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value - */ - public SecurityEventObjectDetailComponent setValueElement(Base64BinaryType value) { - this.value = value; - return this; - } - - /** - * @return Property value. - */ - public byte[] getValue() { - return this.value == null ? null : this.value.getValue(); - } - - /** - * @param value Property value. - */ - public SecurityEventObjectDetailComponent setValue(byte[] value) { - if (this.value == null) - this.value = new Base64BinaryType(); - this.value.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "string", "Name of the property.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("value", "base64Binary", "Property value.", 0, java.lang.Integer.MAX_VALUE, value)); - } - - public SecurityEventObjectDetailComponent copy() { - SecurityEventObjectDetailComponent dst = new SecurityEventObjectDetailComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.value = value == null ? null : value.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEventObjectDetailComponent)) - return false; - SecurityEventObjectDetailComponent o = (SecurityEventObjectDetailComponent) other; - return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEventObjectDetailComponent)) - return false; - SecurityEventObjectDetailComponent o = (SecurityEventObjectDetailComponent) other; - return compareValues(type, o.type, true) && compareValues(value, o.value, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) - ; - } - - } - - /** - * Identifies the name, action type, time, and disposition of the audited event. - */ - @Child(name = "event", type = {}, order = 0, min = 1, max = 1) - @Description(shortDefinition="What was done", formalDefinition="Identifies the name, action type, time, and disposition of the audited event." ) - protected SecurityEventEventComponent event; - - /** - * A person, a hardware device or software process. - */ - @Child(name = "participant", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) - protected List participant; - - /** - * Application systems and processes. - */ - @Child(name = "source", type = {}, order = 2, min = 1, max = 1) - @Description(shortDefinition="Application systems and processes", formalDefinition="Application systems and processes." ) - protected SecurityEventSourceComponent source; - - /** - * Specific instances of data or objects that have been accessed. - */ - @Child(name = "object", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Specific instances of data or objects that have been accessed", formalDefinition="Specific instances of data or objects that have been accessed." ) - protected List object; - - private static final long serialVersionUID = -1695871760L; - - public SecurityEvent() { - super(); - } - - public SecurityEvent(SecurityEventEventComponent event, SecurityEventSourceComponent source) { - super(); - this.event = event; - this.source = source; - } - - /** - * @return {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) - */ - public SecurityEventEventComponent getEvent() { - if (this.event == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEvent.event"); - else if (Configuration.doAutoCreate()) - this.event = new SecurityEventEventComponent(); // cc - return this.event; - } - - public boolean hasEvent() { - return this.event != null && !this.event.isEmpty(); - } - - /** - * @param value {@link #event} (Identifies the name, action type, time, and disposition of the audited event.) - */ - public SecurityEvent setEvent(SecurityEventEventComponent value) { - this.event = value; - return this; - } - - /** - * @return {@link #participant} (A person, a hardware device or software process.) - */ - public List getParticipant() { - if (this.participant == null) - this.participant = new ArrayList(); - return this.participant; - } - - public boolean hasParticipant() { - if (this.participant == null) - return false; - for (SecurityEventParticipantComponent item : this.participant) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #participant} (A person, a hardware device or software process.) - */ - // syntactic sugar - public SecurityEventParticipantComponent addParticipant() { //3 - SecurityEventParticipantComponent t = new SecurityEventParticipantComponent(); - if (this.participant == null) - this.participant = new ArrayList(); - this.participant.add(t); - return t; - } - - /** - * @return {@link #source} (Application systems and processes.) - */ - public SecurityEventSourceComponent getSource() { - if (this.source == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SecurityEvent.source"); - else if (Configuration.doAutoCreate()) - this.source = new SecurityEventSourceComponent(); // cc - return this.source; - } - - public boolean hasSource() { - return this.source != null && !this.source.isEmpty(); - } - - /** - * @param value {@link #source} (Application systems and processes.) - */ - public SecurityEvent setSource(SecurityEventSourceComponent value) { - this.source = value; - return this; - } - - /** - * @return {@link #object} (Specific instances of data or objects that have been accessed.) - */ - public List getObject() { - if (this.object == null) - this.object = new ArrayList(); - return this.object; - } - - public boolean hasObject() { - if (this.object == null) - return false; - for (SecurityEventObjectComponent item : this.object) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #object} (Specific instances of data or objects that have been accessed.) - */ - // syntactic sugar - public SecurityEventObjectComponent addObject() { //3 - SecurityEventObjectComponent t = new SecurityEventObjectComponent(); - if (this.object == null) - this.object = new ArrayList(); - this.object.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("event", "", "Identifies the name, action type, time, and disposition of the audited event.", 0, java.lang.Integer.MAX_VALUE, event)); - childrenList.add(new Property("participant", "", "A person, a hardware device or software process.", 0, java.lang.Integer.MAX_VALUE, participant)); - childrenList.add(new Property("source", "", "Application systems and processes.", 0, java.lang.Integer.MAX_VALUE, source)); - childrenList.add(new Property("object", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, object)); - } - - public SecurityEvent copy() { - SecurityEvent dst = new SecurityEvent(); - copyValues(dst); - dst.event = event == null ? null : event.copy(); - if (participant != null) { - dst.participant = new ArrayList(); - for (SecurityEventParticipantComponent i : participant) - dst.participant.add(i.copy()); - }; - dst.source = source == null ? null : source.copy(); - if (object != null) { - dst.object = new ArrayList(); - for (SecurityEventObjectComponent i : object) - dst.object.add(i.copy()); - }; - return dst; - } - - protected SecurityEvent typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SecurityEvent)) - return false; - SecurityEvent o = (SecurityEvent) other; - return compareDeep(event, o.event, true) && compareDeep(participant, o.participant, true) && compareDeep(source, o.source, true) - && compareDeep(object, o.object, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SecurityEvent)) - return false; - SecurityEvent o = (SecurityEvent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (event == null || event.isEmpty()) && (participant == null || participant.isEmpty()) - && (source == null || source.isEmpty()) && (object == null || object.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.SecurityEvent; - } - - @SearchParamDefinition(name="date", path="SecurityEvent.event.dateTime", description="Time when the event occurred on source", type="date" ) - public static final String SP_DATE = "date"; - @SearchParamDefinition(name = "address", path = "SecurityEvent.participant.network.identifier", description = "Identifier for the network access point of the user device", type = "token") - public static final String SP_ADDRESS = "address"; - @SearchParamDefinition(name="patientid", path="", description="The id of the patient (one of multiple kinds of participations)", type="token" ) - public static final String SP_PATIENTID = "patientid"; - @SearchParamDefinition(name="source", path="SecurityEvent.source.identifier", description="The id of source where event originated", type="token" ) - public static final String SP_SOURCE = "source"; - @SearchParamDefinition(name = "type", path = "SecurityEvent.event.type", description = "Type/identifier of event", type = "token") - public static final String SP_TYPE = "type"; - @SearchParamDefinition(name = "altid", path = "SecurityEvent.participant.altId", description = "Alternative User id e.g. authentication", type = "token") - public static final String SP_ALTID = "altid"; - @SearchParamDefinition(name = "reference", path = "SecurityEvent.object.reference", description = "Specific instance of resource (e.g. versioned)", type = "reference") - public static final String SP_REFERENCE = "reference"; - @SearchParamDefinition(name = "site", path = "SecurityEvent.source.site", description = "Logical source location within the enterprise", type = "token") - public static final String SP_SITE = "site"; - @SearchParamDefinition(name="subtype", path="SecurityEvent.event.subtype", description="More specific type/id for the event", type="token" ) - public static final String SP_SUBTYPE = "subtype"; - @SearchParamDefinition(name = "identity", path = "SecurityEvent.object.identifier", description = "Specific instance of object (e.g. versioned)", type = "token") - public static final String SP_IDENTITY = "identity"; - @SearchParamDefinition(name = "patient", path = "", description = "A patient that the .object.reference refers to", type = "reference") - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name = "object-type", path = "SecurityEvent.object.type", description = "Object type being audited", type = "token") - public static final String SP_OBJECTTYPE = "object-type"; - @SearchParamDefinition(name="name", path="SecurityEvent.participant.name", description="Human-meaningful name for the user", type="string" ) - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="action", path="SecurityEvent.event.action", description="Type of action performed during the event", type="token" ) - public static final String SP_ACTION = "action"; - @SearchParamDefinition(name="user", path="SecurityEvent.participant.userId", description="Unique identifier for the user", type="token" ) - public static final String SP_USER = "user"; - @SearchParamDefinition(name = "desc", path = "SecurityEvent.object.name", description = "Instance-specific descriptor for Object", type = "string") - public static final String SP_DESC = "desc"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java deleted file mode 100644 index 3f636c6bb5a..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusRequest.java +++ /dev/null @@ -1,553 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides the request and response details for the resource for which the processing status is to be checked. - */ -@ResourceDef(name="StatusRequest", profile="http://hl7.org/fhir/Profile/StatusRequest") -public class StatusRequest extends DomainResource { - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when this resource was created. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) - protected DateTimeType created; - - /** - * The Insurer who is target of the request. - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; - - /** - * Reference of resource to reverse. - */ - @Child(name = "request", type = {}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource to reverse.) - */ - protected Resource requestTarget; - - /** - * Reference of response to resource to reverse. - */ - @Child(name = "response", type = {}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Reference of response to resource to reverse.) - */ - protected Resource responseTarget; - - private static final long serialVersionUID = 2018065278L; - - public StatusRequest() { - super(); - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public StatusRequest setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public StatusRequest setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateTimeType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public StatusRequest setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when this resource was created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when this resource was created. - */ - public StatusRequest 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 #target} (The Insurer who is target of the request.) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (The Insurer who is target of the request.) - */ - public StatusRequest setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public StatusRequest setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public StatusRequest setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public StatusRequest setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public StatusRequest setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public StatusRequest setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #request} (Reference of resource to reverse.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.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} (Reference of resource to reverse.) - */ - public StatusRequest setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public StatusRequest setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #response} (Reference of response to resource to reverse.) - */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusRequest.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc - return this.response; - } - - public boolean hasResponse() { - return this.response != null && !this.response.isEmpty(); - } - - /** - * @param value {@link #response} (Reference of response to resource to reverse.) - */ - public StatusRequest setResponse(Reference value) { - this.response = value; - return this; - } - - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public StatusRequest setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); - } - - public StatusRequest copy() { - StatusRequest dst = new StatusRequest(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.request = request == null ? null : request.copy(); - dst.response = response == null ? null : response.copy(); - return dst; - } - - protected StatusRequest typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof StatusRequest)) - return false; - StatusRequest o = (StatusRequest) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof StatusRequest)) - return false; - StatusRequest o = (StatusRequest) other; - return compareValues(created, o.created, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (response == null || response.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.StatusRequest; - } - - @SearchParamDefinition(name="identifier", path="StatusRequest.identifier", description="The business identifier of the Eligibility", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java deleted file mode 100644 index 66f4e5ac715..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StatusResponse.java +++ /dev/null @@ -1,851 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides processing status, errors and notes from the processing of a resource. - */ -@ResourceDef(name="StatusResponse", profile="http://hl7.org/fhir/Profile/StatusResponse") -public class StatusResponse extends DomainResource { - - @Block() - public static class StatusResponseNotesComponent extends BackboneElement { - /** - * The note purpose: Print/Display. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." ) - protected Coding type; - - /** - * The note text. - */ - @Child(name="text", type={StringType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Notes text", formalDefinition="The note text." ) - protected StringType text; - - private static final long serialVersionUID = 129959202L; - - public StatusResponseNotesComponent() { - super(); - } - - /** - * @return {@link #type} (The note purpose: Print/Display.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponseNotesComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The note purpose: Print/Display.) - */ - public StatusResponseNotesComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #text} (The note text.). 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 StatusResponseNotesComponent.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} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value - */ - public StatusResponseNotesComponent setTextElement(StringType value) { - this.text = value; - return this; - } - - /** - * @return The note text. - */ - public String getText() { - return this.text == null ? null : this.text.getValue(); - } - - /** - * @param value The note text. - */ - public StatusResponseNotesComponent 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; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text)); - } - - public StatusResponseNotesComponent copy() { - StatusResponseNotesComponent dst = new StatusResponseNotesComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.text = text == null ? null : text.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof StatusResponseNotesComponent)) - return false; - StatusResponseNotesComponent o = (StatusResponseNotesComponent) other; - return compareDeep(type, o.type, true) && compareDeep(text, o.text, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof StatusResponseNotesComponent)) - return false; - StatusResponseNotesComponent o = (StatusResponseNotesComponent) other; - return compareValues(text, o.text, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) - ; - } - - } - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * Original request resource reference. - */ - @Child(name = "request", type = {}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request resource reference.) - */ - protected Resource requestTarget; - - /** - * Transaction status: error, complete, held. - */ - @Child(name = "outcome", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Processing outcome", formalDefinition="Transaction status: error, complete, held." ) - protected Coding outcome; - - /** - * A description of the status of the adjudication or processing. - */ - @Child(name = "disposition", type = {StringType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication or processing." ) - protected StringType disposition; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateTimeType created; - - /** - * The Insurer who produced this adjudicated response. - */ - @Child(name = "organization", type = {Organization.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) - */ - protected Organization organizationTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "requestProvider", type = {Practitioner.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference requestProvider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner requestProviderTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "requestOrganization", type = {Organization.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference requestOrganization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization requestOrganizationTarget; - - /** - * The form to be used for printing the content. - */ - @Child(name = "form", type = {Coding.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) - protected Coding form; - - /** - * Suite of processing note or additional requirements is the processing has been held. - */ - @Child(name = "notes", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Notes", formalDefinition="Suite of processing note or additional requirements is the processing has been held." ) - protected List notes; - - /** - * Processing errors. - */ - @Child(name = "error", type = {Coding.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) - protected List error; - - private static final long serialVersionUID = 1671399476L; - - public StatusResponse() { - super(); - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #request} (Original request resource reference.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.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} (Original request resource reference.) - */ - public StatusResponse setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public StatusResponse setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #outcome} (Transaction status: error, complete, held.) - */ - public Coding getOutcome() { - if (this.outcome == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.outcome"); - else if (Configuration.doAutoCreate()) - this.outcome = new Coding(); // cc - return this.outcome; - } - - public boolean hasOutcome() { - return this.outcome != null && !this.outcome.isEmpty(); - } - - /** - * @param value {@link #outcome} (Transaction status: error, complete, held.) - */ - public StatusResponse setOutcome(Coding value) { - this.outcome = value; - return this; - } - - /** - * @return {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value - */ - public StringType getDispositionElement() { - if (this.disposition == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.disposition"); - else if (Configuration.doAutoCreate()) - this.disposition = new StringType(); // bb - return this.disposition; - } - - public boolean hasDispositionElement() { - return this.disposition != null && !this.disposition.isEmpty(); - } - - public boolean hasDisposition() { - return this.disposition != null && !this.disposition.isEmpty(); - } - - /** - * @param value {@link #disposition} (A description of the status of the adjudication or processing.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value - */ - public StatusResponse setDispositionElement(StringType value) { - this.disposition = value; - return this; - } - - /** - * @return A description of the status of the adjudication or processing. - */ - public String getDisposition() { - return this.disposition == null ? null : this.disposition.getValue(); - } - - /** - * @param value A description of the status of the adjudication or processing. - */ - public StatusResponse setDisposition(String value) { - if (Utilities.noString(value)) - this.disposition = null; - else { - if (this.disposition == null) - this.disposition = new StringType(); - this.disposition.setValue(value); - } - return this; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public StatusResponse setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public StatusResponse setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). 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 StatusResponse.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 when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public StatusResponse setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public StatusResponse 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 #organization} (The Insurer who produced this adjudicated response.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The Insurer who produced this adjudicated response.) - */ - public StatusResponse setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public StatusResponse setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getRequestProvider() { - if (this.requestProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProvider = new Reference(); // cc - return this.requestProvider; - } - - public boolean hasRequestProvider() { - return this.requestProvider != null && !this.requestProvider.isEmpty(); - } - - /** - * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public StatusResponse setRequestProvider(Reference value) { - this.requestProvider = value; - return this; - } - - /** - * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getRequestProviderTarget() { - if (this.requestProviderTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProviderTarget = new Practitioner(); // aa - return this.requestProviderTarget; - } - - /** - * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public StatusResponse setRequestProviderTarget(Practitioner value) { - this.requestProviderTarget = value; - return this; - } - - /** - * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getRequestOrganization() { - if (this.requestOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganization = new Reference(); // cc - return this.requestOrganization; - } - - public boolean hasRequestOrganization() { - return this.requestOrganization != null && !this.requestOrganization.isEmpty(); - } - - /** - * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) - */ - public StatusResponse setRequestOrganization(Reference value) { - this.requestOrganization = value; - return this; - } - - /** - * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getRequestOrganizationTarget() { - if (this.requestOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganizationTarget = new Organization(); // aa - return this.requestOrganizationTarget; - } - - /** - * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public StatusResponse setRequestOrganizationTarget(Organization value) { - this.requestOrganizationTarget = value; - return this; - } - - /** - * @return {@link #form} (The form to be used for printing the content.) - */ - public Coding getForm() { - if (this.form == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StatusResponse.form"); - else if (Configuration.doAutoCreate()) - this.form = new Coding(); // cc - return this.form; - } - - public boolean hasForm() { - return this.form != null && !this.form.isEmpty(); - } - - /** - * @param value {@link #form} (The form to be used for printing the content.) - */ - public StatusResponse setForm(Coding value) { - this.form = value; - return this; - } - - /** - * @return {@link #notes} (Suite of processing note or additional requirements is the processing has been held.) - */ - public List getNotes() { - if (this.notes == null) - this.notes = new ArrayList(); - return this.notes; - } - - public boolean hasNotes() { - if (this.notes == null) - return false; - for (StatusResponseNotesComponent item : this.notes) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #notes} (Suite of processing note or additional requirements is the processing has been held.) - */ - // syntactic sugar - public StatusResponseNotesComponent addNotes() { //3 - StatusResponseNotesComponent t = new StatusResponseNotesComponent(); - if (this.notes == null) - this.notes = new ArrayList(); - this.notes.add(t); - return t; - } - - /** - * @return {@link #error} (Processing errors.) - */ - public List getError() { - if (this.error == null) - this.error = new ArrayList(); - return this.error; - } - - public boolean hasError() { - if (this.error == null) - return false; - for (Coding item : this.error) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #error} (Processing errors.) - */ - // syntactic sugar - public Coding addError() { //3 - Coding t = new Coding(); - if (this.error == null) - this.error = new ArrayList(); - this.error.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(Any)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("outcome", "Coding", "Transaction status: error, complete, held.", 0, java.lang.Integer.MAX_VALUE, outcome)); - childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, java.lang.Integer.MAX_VALUE, disposition)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); - childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); - childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); - childrenList.add(new Property("notes", "", "Suite of processing note or additional requirements is the processing has been held.", 0, java.lang.Integer.MAX_VALUE, notes)); - childrenList.add(new Property("error", "Coding", "Processing errors.", 0, java.lang.Integer.MAX_VALUE, error)); - } - - public StatusResponse copy() { - StatusResponse dst = new StatusResponse(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.request = request == null ? null : request.copy(); - dst.outcome = outcome == null ? null : outcome.copy(); - dst.disposition = disposition == null ? null : disposition.copy(); - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); - dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy(); - dst.form = form == null ? null : form.copy(); - if (notes != null) { - dst.notes = new ArrayList(); - for (StatusResponseNotesComponent i : notes) - dst.notes.add(i.copy()); - }; - if (error != null) { - dst.error = new ArrayList(); - for (Coding i : error) - dst.error.add(i.copy()); - }; - return dst; - } - - protected StatusResponse typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof StatusResponse)) - return false; - StatusResponse o = (StatusResponse) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true) - && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) - && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(form, o.form, true) - && compareDeep(notes, o.notes, true) && compareDeep(error, o.error, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof StatusResponse)) - return false; - StatusResponse o = (StatusResponse) other; - return compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - && (form == null || form.isEmpty()) && (notes == null || notes.isEmpty()) && (error == null || error.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.StatusResponse; - } - - @SearchParamDefinition(name="identifier", path="StatusResponse.identifier", description="The business identifier of the Explanation of Benefit", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java index f50ff6c209f..1fe5a98e49b 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/StructureDefinition.java @@ -29,113 +29,24 @@ package org.hl7.fhir.instance.model; */ -// Generated on Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 +// Generated on Thu, Apr 2, 2015 10:47-0400 for FHIR v0.5.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.instance.model.Enumerations.*; import org.hl7.fhir.instance.model.annotations.ResourceDef; import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; import org.hl7.fhir.instance.model.annotations.Block; import org.hl7.fhir.instance.model.annotations.Child; import org.hl7.fhir.instance.model.annotations.Description; /** - * A Resource Profile - a statement of use of one or more FHIR Resources. It may include constraints on Resources and Data Types, Terminology Binding Statements and Extension Definitions. + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. */ @ResourceDef(name="StructureDefinition", profile="http://hl7.org/fhir/Profile/StructureDefinition") public class StructureDefinition extends DomainResource { - public enum StructureDefinitionStatus { - /** - * This profile is still under development. - */ - DRAFT, - /** - * This profile is ready for normal use. - */ - ACTIVE, - /** - * This profile has been deprecated, withdrawn or superseded and should no longer be used. - */ - RETIRED, - /** - * added to help the parsers - */ - NULL; - public static StructureDefinitionStatus fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return DRAFT; - if ("active".equals(codeString)) - return ACTIVE; - if ("retired".equals(codeString)) - return RETIRED; - throw new Exception("Unknown StructureDefinitionStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case DRAFT: return ""; - case ACTIVE: return ""; - case RETIRED: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case DRAFT: return "This profile is still under development."; - case ACTIVE: return "This profile is ready for normal use."; - case RETIRED: return "This profile has been deprecated, withdrawn or superseded and should no longer be used."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case DRAFT: return "draft"; - case ACTIVE: return "active"; - case RETIRED: return "retired"; - default: return "?"; - } - } - } - - public static class StructureDefinitionStatusEnumFactory implements EnumFactory { - public StructureDefinitionStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("draft".equals(codeString)) - return StructureDefinitionStatus.DRAFT; - if ("active".equals(codeString)) - return StructureDefinitionStatus.ACTIVE; - if ("retired".equals(codeString)) - return StructureDefinitionStatus.RETIRED; - throw new IllegalArgumentException("Unknown StructureDefinitionStatus code '"+codeString+"'"); - } - public String toCode(StructureDefinitionStatus code) { - if (code == StructureDefinitionStatus.DRAFT) - return "draft"; - if (code == StructureDefinitionStatus.ACTIVE) - return "active"; - if (code == StructureDefinitionStatus.RETIRED) - return "retired"; - return "?"; - } - } - public enum StructureDefinitionType { - /** - * An abstract Type. Structure Definitions for abstract types are provided for structural completeness, and to support functions such as code generation. - */ - ABSTRACT, /** * A data type - either a primitive or complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions. */ @@ -159,8 +70,6 @@ public class StructureDefinition extends DomainResource { public static StructureDefinitionType fromCode(String codeString) throws Exception { if (codeString == null || "".equals(codeString)) return null; - if ("abstract".equals(codeString)) - return ABSTRACT; if ("type".equals(codeString)) return TYPE; if ("resource".equals(codeString)) @@ -173,7 +82,6 @@ public class StructureDefinition extends DomainResource { } public String toCode() { switch (this) { - case ABSTRACT: return "abstract"; case TYPE: return "type"; case RESOURCE: return "resource"; case CONSTRAINT: return "constraint"; @@ -183,7 +91,6 @@ public class StructureDefinition extends DomainResource { } public String getSystem() { switch (this) { - case ABSTRACT: return ""; case TYPE: return ""; case RESOURCE: return ""; case CONSTRAINT: return ""; @@ -193,7 +100,6 @@ public class StructureDefinition extends DomainResource { } public String getDefinition() { switch (this) { - case ABSTRACT: return "An abstract Type. Structure Definitions for abstract types are provided for structural completeness, and to support functions such as code generation."; case TYPE: return "A data type - either a primitive or complex structure that defines a set of data elements. These can be used throughout Resource and extension definitions."; case RESOURCE: return "A resource defined by the FHIR specification."; case CONSTRAINT: return "A set of constraints on a resource or data type that describe how it is used for a particular use."; @@ -203,7 +109,6 @@ public class StructureDefinition extends DomainResource { } public String getDisplay() { switch (this) { - case ABSTRACT: return "Abstract type"; case TYPE: return "Data Type"; case RESOURCE: return "Resource"; case CONSTRAINT: return "Constrained Type"; @@ -218,8 +123,6 @@ public class StructureDefinition extends DomainResource { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; - if ("abstract".equals(codeString)) - return StructureDefinitionType.ABSTRACT; if ("type".equals(codeString)) return StructureDefinitionType.TYPE; if ("resource".equals(codeString)) @@ -231,8 +134,6 @@ public class StructureDefinition extends DomainResource { throw new IllegalArgumentException("Unknown StructureDefinitionType code '"+codeString+"'"); } public String toCode(StructureDefinitionType code) { - if (code == StructureDefinitionType.ABSTRACT) - return "abstract"; if (code == StructureDefinitionType.TYPE) return "type"; if (code == StructureDefinitionType.RESOURCE) @@ -308,10 +209,10 @@ public class StructureDefinition extends DomainResource { } public String getDisplay() { switch (this) { - case RESOURCE: return "resource"; - case DATATYPE: return "datatype"; - case MAPPING: return "mapping"; - case EXTENSION: return "extension"; + case RESOURCE: return "Resource"; + case DATATYPE: return "Datatype"; + case MAPPING: return "Mapping"; + case EXTENSION: return "Extension"; default: return "?"; } } @@ -345,33 +246,189 @@ public class StructureDefinition extends DomainResource { } } + @Block() + public static class StructureDefinitionContactComponent extends BackboneElement { + /** + * The name of an individual to contact regarding the structure definition. + */ + @Child(name ="name", type={StringType.class}, order=1, min=0, max=1) + @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the structure definition." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name ="telecom", type={ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + public StructureDefinitionContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the structure definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinitionContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the structure definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureDefinitionContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the structure definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the structure definition. + */ + public StructureDefinitionContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public StructureDefinitionContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the structure definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + public StructureDefinitionContactComponent copy() { + StructureDefinitionContactComponent dst = new StructureDefinitionContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureDefinitionContactComponent)) + return false; + StructureDefinitionContactComponent o = (StructureDefinitionContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureDefinitionContactComponent)) + return false; + StructureDefinitionContactComponent o = (StructureDefinitionContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) + ; + } + + } + @Block() public static class StructureDefinitionMappingComponent extends BackboneElement { /** * An Internal id that is used to identify this mapping set when specific mappings are made. */ - @Child(name="identity", type={IdType.class}, order=1, min=1, max=1) + @Child(name ="identity", type={IdType.class}, order=1, min=1, max=1) @Description(shortDefinition="Internal id when this mapping is used", formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made." ) protected IdType identity; /** - * A URI that identifies the specification that this mapping is expressed to. + * An absolute URI that identifies the specification that this mapping is expressed to. */ - @Child(name="uri", type={UriType.class}, order=2, min=0, max=1) - @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="A URI that identifies the specification that this mapping is expressed to." ) + @Child(name ="uri", type={UriType.class}, order=2, min=0, max=1) + @Description(shortDefinition="Identifies what this mapping refers to", formalDefinition="An absolute URI that identifies the specification that this mapping is expressed to." ) protected UriType uri; /** * A name for the specification that is being mapped to. */ - @Child(name="name", type={StringType.class}, order=3, min=0, max=1) + @Child(name ="name", type={StringType.class}, order=3, min=0, max=1) @Description(shortDefinition="Names what this mapping refers to", formalDefinition="A name for the specification that is being mapped to." ) protected StringType name; /** * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. */ - @Child(name="comments", type={StringType.class}, order=4, min=0, max=1) + @Child(name ="comments", type={StringType.class}, order=4, min=0, max=1) @Description(shortDefinition="Versions, Issues, Scope limitations etc", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) protected StringType comments; @@ -432,7 +489,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + * @return {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value */ public UriType getUriElement() { if (this.uri == null) @@ -452,7 +509,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #uri} (A URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value + * @param value {@link #uri} (An absolute URI that identifies the specification that this mapping is expressed to.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value */ public StructureDefinitionMappingComponent setUriElement(UriType value) { this.uri = value; @@ -460,14 +517,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return A URI that identifies the specification that this mapping is expressed to. + * @return An absolute URI that identifies the specification that this mapping is expressed to. */ public String getUri() { return this.uri == null ? null : this.uri.getValue(); } /** - * @param value A URI that identifies the specification that this mapping is expressed to. + * @param value An absolute URI that identifies the specification that this mapping is expressed to. */ public StructureDefinitionMappingComponent setUri(String value) { if (Utilities.noString(value)) @@ -581,7 +638,7 @@ public class StructureDefinition extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identity", "id", "An Internal id that is used to identify this mapping set when specific mappings are made.", 0, java.lang.Integer.MAX_VALUE, identity)); - childrenList.add(new Property("uri", "uri", "A URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); + childrenList.add(new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); } @@ -630,8 +687,8 @@ public class StructureDefinition extends DomainResource { /** * Captures constraints on each element within the resource. */ - @Child(name="element", type={ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Definition of elements in the resource (if no profile)", formalDefinition="Captures constraints on each element within the resource." ) + @Child(name ="element", type={ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Definition of elements in the resource (if no StructureDefinition)", formalDefinition="Captures constraints on each element within the resource." ) protected List element; private static final long serialVersionUID = 53896641L; @@ -670,6 +727,16 @@ public class StructureDefinition extends DomainResource { return t; } + // syntactic sugar + public StructureDefinitionSnapshotComponent addElement(ElementDefinition t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("element", "ElementDefinition", "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); @@ -717,8 +784,8 @@ public class StructureDefinition extends DomainResource { /** * Captures constraints on each element within the resource. */ - @Child(name="element", type={ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Definition of elements in the resource (if no profile)", formalDefinition="Captures constraints on each element within the resource." ) + @Child(name ="element", type={ElementDefinition.class}, order=1, min=1, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Definition of elements in the resource (if no StructureDefinition)", formalDefinition="Captures constraints on each element within the resource." ) protected List element; private static final long serialVersionUID = 53896641L; @@ -757,6 +824,16 @@ public class StructureDefinition extends DomainResource { return t; } + // syntactic sugar + public StructureDefinitionDifferentialComponent addElement(ElementDefinition t) { //3 + if (t == null) + return this; + if (this.element == null) + this.element = new ArrayList(); + this.element.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("element", "ElementDefinition", "Captures constraints on each element within the resource.", 0, java.lang.Integer.MAX_VALUE, element)); @@ -800,168 +877,190 @@ public class StructureDefinition extends DomainResource { } /** - * The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. + * An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems. */ - @Child(name = "url", type = {UriType.class}, order = 0, min = 1, max = 1) - @Description(shortDefinition="Literal URL used to reference this profile", formalDefinition="The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems." ) + @Child(name ="url", type={UriType.class}, order=0, min=1, max=1) + @Description(shortDefinition="Literal URL used to reference this StructureDefinition", formalDefinition="An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems." ) protected UriType url; /** - * Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). + * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). */ - @Child(name = "identifier", type = {Identifier.class}, order = 1, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Other identifiers for the profile", formalDefinition="Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) + @Child(name ="identifier", type={Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Other identifiers for the StructureDefinition", formalDefinition="Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) protected List identifier; /** - * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. + * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. */ - @Child(name = "version", type = {StringType.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Logical id for this version of the profile", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually." ) + @Child(name ="version", type={StringType.class}, order=2, min=0, max=1) + @Description(shortDefinition="Logical id for this version of the StructureDefinition", formalDefinition="The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually." ) protected StringType version; /** - * A free text natural language name identifying the Profile. + * A free text natural language name identifying the StructureDefinition. */ - @Child(name = "name", type = {StringType.class}, order = 3, min = 1, max = 1) - @Description(shortDefinition="Informal name for this profile", formalDefinition="A free text natural language name identifying the Profile." ) + @Child(name ="name", type={StringType.class}, order=3, min=1, max=1) + @Description(shortDefinition="Informal name for this StructureDefinition", formalDefinition="A free text natural language name identifying the StructureDefinition." ) protected StringType name; + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions. + */ + @Child(name ="useContext", type={CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions." ) + protected List useContext; + /** * Defined so that applications can use this name when displaying the value of the extension to the user. */ - @Child(name = "display", type = {StringType.class}, order = 4, min = 0, max = 1) + @Child(name ="display", type={StringType.class}, order=5, min=0, max=1) @Description(shortDefinition="Use this name when displaying the value", formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user." ) protected StringType display; /** - * Details of the individual or organization who accepts responsibility for publishing the profile. + * The name of the individual or organization that published the structure definition. */ - @Child(name = "publisher", type = {StringType.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the profile." ) + @Child(name ="publisher", type={StringType.class}, order=6, min=0, max=1) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the structure definition." ) protected StringType publisher; /** - * Contact details to assist a user in finding and communicating with the publisher. + * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "telecom", type = {ContactPoint.class}, order = 6, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) - protected List telecom; + @Child(name ="contact", type={}, order=7, min=0, max=Child.MAX_UNLIMITED) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; /** - * A free text natural language description of the profile and its use. + * A free text natural language description of the StructureDefinition and its use. */ - @Child(name = "description", type = {StringType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Natural language description of the profile", formalDefinition="A free text natural language description of the profile and its use." ) + @Child(name ="description", type={StringType.class}, order=8, min=0, max=1) + @Description(shortDefinition="Natural language description of the StructureDefinition", formalDefinition="A free text natural language description of the StructureDefinition and its use." ) protected StringType description; + /** + * Explains why this structure definition is needed and why it's been constrained as it has. + */ + @Child(name ="requirements", type={StringType.class}, order=9, min=0, max=1) + @Description(shortDefinition="Scope and Usage this structure definition is for", formalDefinition="Explains why this structure definition is needed and why it's been constrained as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + @Child(name ="copyright", type={StringType.class}, order=10, min=0, max=1) + @Description(shortDefinition="Use and/or Publishing restrictions", formalDefinition="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) + protected StringType copyright; + /** * A set of terms from external terminologies that may be used to assist with indexing and searching of templates. */ - @Child(name = "code", type = {Coding.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="code", type={Coding.class}, order=11, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates." ) protected List code; /** - * The status of the profile. + * The status of the StructureDefinition. */ - @Child(name = "status", type = {CodeType.class}, order = 9, min = 1, max = 1) - @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) - protected Enumeration status; + @Child(name ="status", type={CodeType.class}, order=12, min=1, max=1) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the StructureDefinition." ) + protected Enumeration status; /** - * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name = "experimental", type = {BooleanType.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + @Child(name ="experimental", type={BooleanType.class}, order=13, min=0, max=1) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** - * The date that this version of the profile was published. + * The date that this version of the StructureDefinition was published. */ - @Child(name = "date", type = {DateTimeType.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Date for this version of the profile", formalDefinition="The date that this version of the profile was published." ) + @Child(name ="date", type={DateTimeType.class}, order=14, min=0, max=1) + @Description(shortDefinition="Date for this version of the StructureDefinition", formalDefinition="The date that this version of the StructureDefinition was published." ) protected DateTimeType date; /** - * The Scope and Usage that this profile was created to meet. + * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version. */ - @Child(name = "requirements", type = {StringType.class}, order = 12, min = 0, max = 1) - @Description(shortDefinition="Scope and Usage this profile is for", formalDefinition="The Scope and Usage that this profile was created to meet." ) - protected StringType requirements; - - /** - * The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. - */ - @Child(name = "fhirVersion", type = {IdType.class}, order = 13, min = 0, max = 1) - @Description(shortDefinition="FHIR Version this profile targets", formalDefinition="The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version." ) + @Child(name ="fhirVersion", type={IdType.class}, order=15, min=0, max=1) + @Description(shortDefinition="FHIR Version this StructureDefinition targets", formalDefinition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version." ) protected IdType fhirVersion; /** * An external specification that the content is mapped to. */ - @Child(name = "mapping", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="mapping", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="External specification that the content is mapped to", formalDefinition="An external specification that the content is mapped to." ) protected List mapping; /** * Defines the type of structure that this definition is describing. */ - @Child(name = "type", type = {CodeType.class}, order = 15, min = 1, max = 1) - @Description(shortDefinition="abstract | type | resource | constraint | extension", formalDefinition="Defines the type of structure that this definition is describing." ) + @Child(name ="type", type={CodeType.class}, order=17, min=1, max=1) + @Description(shortDefinition="type | resource | constraint | extension", formalDefinition="Defines the type of structure that this definition is describing." ) protected Enumeration type; /** - * Identifies the type of context to which the extension applies. + * Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. */ - @Child(name = "contextType", type = {CodeType.class}, order = 16, min = 0, max = 1) - @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="Identifies the type of context to which the extension applies." ) + @Child(name ="abstract_", type={BooleanType.class}, order=18, min=1, max=1) + @Description(shortDefinition="Whether the structure is abstract", formalDefinition="Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type." ) + protected BooleanType abstract_; + + /** + * If this is an extension, Identifies the context within FHIR resources where the extension can be used. + */ + @Child(name ="contextType", type={CodeType.class}, order=19, min=0, max=1) + @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="If this is an extension, Identifies the context within FHIR resources where the extension can be used." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name = "context", type = {StringType.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED) + @Child(name ="context", type={StringType.class}, order=20, min=0, max=Child.MAX_UNLIMITED) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** - * The structure that is the base on which this set of constraints is derived from. + * An absolute URI that is the base structure from which this set of constraints is derived. */ - @Child(name = "base", type = {UriType.class}, order = 18, min = 0, max = 1) - @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="The structure that is the base on which this set of constraints is derived from." ) + @Child(name ="base", type={UriType.class}, order=21, min=0, max=1) + @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="An absolute URI that is the base structure from which this set of constraints is derived." ) protected UriType base; /** - * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile. + * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition. */ - @Child(name = "snapshot", type = {}, order = 19, min = 0, max = 1) - @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile." ) + @Child(name ="snapshot", type={}, order=22, min=0, max=1) + @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition." ) protected StructureDefinitionSnapshotComponent snapshot; /** - * A differential view is expressed relative to the base profile - a statement of differences that it applies. + * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies. */ - @Child(name = "differential", type = {}, order = 20, min = 0, max = 1) - @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base profile - a statement of differences that it applies." ) + @Child(name ="differential", type={}, order=23, min=0, max=1) + @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies." ) protected StructureDefinitionDifferentialComponent differential; - private static final long serialVersionUID = -149055817L; + private static final long serialVersionUID = -1935809660L; public StructureDefinition() { super(); } - public StructureDefinition(UriType url, StringType name, Enumeration status, Enumeration type) { + public StructureDefinition(UriType url, StringType name, Enumeration status, Enumeration type, BooleanType abstract_) { super(); this.url = url; this.name = name; this.status = status; this.type = type; + this.abstract_ = abstract_; } /** - * @return {@link #url} (The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @return {@link #url} (An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public UriType getUrlElement() { if (this.url == null) @@ -981,7 +1080,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #url} (The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @param value {@link #url} (An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public StructureDefinition setUrlElement(UriType value) { this.url = value; @@ -989,14 +1088,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. + * @return An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems. */ public String getUrl() { return this.url == null ? null : this.url.getValue(); } /** - * @param value The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems. + * @param value An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems. */ public StructureDefinition setUrl(String value) { if (this.url == null) @@ -1006,7 +1105,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + * @return {@link #identifier} (Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) */ public List getIdentifier() { if (this.identifier == null) @@ -1024,7 +1123,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #identifier} (Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + * @return {@link #identifier} (Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) */ // syntactic sugar public Identifier addIdentifier() { //3 @@ -1035,8 +1134,18 @@ public class StructureDefinition extends DomainResource { return t; } + // syntactic sugar + public StructureDefinition addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + /** - * @return {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + * @return {@link #version} (The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value */ public StringType getVersionElement() { if (this.version == null) @@ -1056,7 +1165,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + * @param value {@link #version} (The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value */ public StructureDefinition setVersionElement(StringType value) { this.version = value; @@ -1064,14 +1173,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. + * @return The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. */ public String getVersion() { return this.version == null ? null : this.version.getValue(); } /** - * @param value The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually. + * @param value The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually. */ public StructureDefinition setVersion(String value) { if (Utilities.noString(value)) @@ -1085,7 +1194,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #name} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #name} (A free text natural language name identifying the StructureDefinition.). 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) @@ -1105,7 +1214,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #name} (A free text natural language name identifying the Profile.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #name} (A free text natural language name identifying the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StructureDefinition setNameElement(StringType value) { this.name = value; @@ -1113,14 +1222,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return A free text natural language name identifying the Profile. + * @return A free text natural language name identifying the StructureDefinition. */ public String getName() { return this.name == null ? null : this.name.getValue(); } /** - * @param value A free text natural language name identifying the Profile. + * @param value A free text natural language name identifying the StructureDefinition. */ public StructureDefinition setName(String value) { if (this.name == null) @@ -1129,6 +1238,46 @@ public class StructureDefinition extends DomainResource { return this; } + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public StructureDefinition addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + /** * @return {@link #display} (Defined so that applications can use this name when displaying the value of the extension to the user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value */ @@ -1179,7 +1328,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @return {@link #publisher} (The name of the individual or organization that published the structure definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public StringType getPublisherElement() { if (this.publisher == null) @@ -1199,7 +1348,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #publisher} (Details of the individual or organization who accepts responsibility for publishing the profile.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + * @param value {@link #publisher} (The name of the individual or organization that published the structure definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ public StructureDefinition setPublisherElement(StringType value) { this.publisher = value; @@ -1207,14 +1356,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return Details of the individual or organization who accepts responsibility for publishing the profile. + * @return The name of the individual or organization that published the structure definition. */ public String getPublisher() { return this.publisher == null ? null : this.publisher.getValue(); } /** - * @param value Details of the individual or organization who accepts responsibility for publishing the profile. + * @param value The name of the individual or organization that published the structure definition. */ public StructureDefinition setPublisher(String value) { if (Utilities.noString(value)) @@ -1228,37 +1377,47 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ - public List getTelecom() { - if (this.telecom == null) - this.telecom = new ArrayList(); - return this.telecom; + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; } - public boolean hasTelecom() { - if (this.telecom == null) + public boolean hasContact() { + if (this.contact == null) return false; - for (ContactPoint item : this.telecom) + for (StructureDefinitionContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) */ // syntactic sugar - public ContactPoint addTelecom() { //3 - ContactPoint t = new ContactPoint(); - if (this.telecom == null) - this.telecom = new ArrayList(); - this.telecom.add(t); + public StructureDefinitionContactComponent addContact() { //3 + StructureDefinitionContactComponent t = new StructureDefinitionContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); return t; } + // syntactic sugar + public StructureDefinition addContact(StructureDefinitionContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** - * @return {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @return {@link #description} (A free text natural language description of the StructureDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public StringType getDescriptionElement() { if (this.description == null) @@ -1278,7 +1437,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @param value {@link #description} (A free text natural language description of the StructureDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public StructureDefinition setDescriptionElement(StringType value) { this.description = value; @@ -1286,14 +1445,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return A free text natural language description of the profile and its use. + * @return A free text natural language description of the StructureDefinition and its use. */ public String getDescription() { return this.description == null ? null : this.description.getValue(); } /** - * @param value A free text natural language description of the profile and its use. + * @param value A free text natural language description of the StructureDefinition and its use. */ public StructureDefinition setDescription(String value) { if (Utilities.noString(value)) @@ -1306,6 +1465,104 @@ public class StructureDefinition extends DomainResource { return this; } + /** + * @return {@link #requirements} (Explains why this structure definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this structure definition is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StructureDefinition setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this structure definition is needed and why it's been constrained as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this structure definition is needed and why it's been constrained as it has. + */ + public StructureDefinition setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StructureDefinition setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public StructureDefinition setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + /** * @return {@link #code} (A set of terms from external terminologies that may be used to assist with indexing and searching of templates.) */ @@ -1336,15 +1593,25 @@ public class StructureDefinition extends DomainResource { return t; } + // syntactic sugar + public StructureDefinition addCode(Coding t) { //3 + if (t == null) + return this; + if (this.code == null) + this.code = new ArrayList(); + this.code.add(t); + return this; + } + /** - * @return {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @return {@link #status} (The status of the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Enumeration getStatusElement() { + public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create StructureDefinition.status"); else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new StructureDefinitionStatusEnumFactory()); // bb + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb return this.status; } @@ -1357,32 +1624,32 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @param value {@link #status} (The status of the StructureDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public StructureDefinition setStatusElement(Enumeration value) { + public StructureDefinition setStatusElement(Enumeration value) { this.status = value; return this; } /** - * @return The status of the profile. + * @return The status of the StructureDefinition. */ - public StructureDefinitionStatus getStatus() { + public ConformanceResourceStatus getStatus() { return this.status == null ? null : this.status.getValue(); } /** - * @param value The status of the profile. + * @param value The status of the StructureDefinition. */ - public StructureDefinition setStatus(StructureDefinitionStatus value) { + public StructureDefinition setStatus(ConformanceResourceStatus value) { if (this.status == null) - this.status = new Enumeration(new StructureDefinitionStatusEnumFactory()); + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); this.status.setValue(value); return this; } /** - * @return {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + * @return {@link #experimental} (This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value */ public BooleanType getExperimentalElement() { if (this.experimental == null) @@ -1402,7 +1669,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #experimental} (This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + * @param value {@link #experimental} (This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value */ public StructureDefinition setExperimentalElement(BooleanType value) { this.experimental = value; @@ -1410,14 +1677,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + * @return This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ public boolean getExperimental() { - return this.experimental == null ? false : this.experimental.getValue(); + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); } /** - * @param value This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + * @param value This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ public StructureDefinition setExperimental(boolean value) { if (this.experimental == null) @@ -1427,7 +1694,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #date} (The date that this version of the profile was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @return {@link #date} (The date that this version of the StructureDefinition was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ public DateTimeType getDateElement() { if (this.date == null) @@ -1447,7 +1714,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #date} (The date that this version of the profile was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @param value {@link #date} (The date that this version of the StructureDefinition was published.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ public StructureDefinition setDateElement(DateTimeType value) { this.date = value; @@ -1455,14 +1722,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The date that this version of the profile was published. + * @return The date that this version of the StructureDefinition was published. */ public Date getDate() { return this.date == null ? null : this.date.getValue(); } /** - * @param value The date that this version of the profile was published. + * @param value The date that this version of the StructureDefinition was published. */ public StructureDefinition setDate(Date value) { if (value == null) @@ -1476,56 +1743,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #requirements} (The Scope and Usage that this profile was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public StringType getRequirementsElement() { - if (this.requirements == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StructureDefinition.requirements"); - else if (Configuration.doAutoCreate()) - this.requirements = new StringType(); // bb - return this.requirements; - } - - public boolean hasRequirementsElement() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - public boolean hasRequirements() { - return this.requirements != null && !this.requirements.isEmpty(); - } - - /** - * @param value {@link #requirements} (The Scope and Usage that this profile was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value - */ - public StructureDefinition setRequirementsElement(StringType value) { - this.requirements = value; - return this; - } - - /** - * @return The Scope and Usage that this profile was created to meet. - */ - public String getRequirements() { - return this.requirements == null ? null : this.requirements.getValue(); - } - - /** - * @param value The Scope and Usage that this profile was created to meet. - */ - public StructureDefinition setRequirements(String value) { - if (Utilities.noString(value)) - this.requirements = null; - else { - if (this.requirements == null) - this.requirements = new StringType(); - this.requirements.setValue(value); - } - return this; - } - - /** - * @return {@link #fhirVersion} (The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @return {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public IdType getFhirVersionElement() { if (this.fhirVersion == null) @@ -1545,7 +1763,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #fhirVersion} (The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public StructureDefinition setFhirVersionElement(IdType value) { this.fhirVersion = value; @@ -1553,14 +1771,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. + * @return The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version. */ public String getFhirVersion() { return this.fhirVersion == null ? null : this.fhirVersion.getValue(); } /** - * @param value The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version. + * @param value The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version. */ public StructureDefinition setFhirVersion(String value) { if (Utilities.noString(value)) @@ -1603,6 +1821,16 @@ public class StructureDefinition extends DomainResource { return t; } + // syntactic sugar + public StructureDefinition addMapping(StructureDefinitionMappingComponent t) { //3 + if (t == null) + return this; + if (this.mapping == null) + this.mapping = new ArrayList(); + this.mapping.add(t); + return this; + } + /** * @return {@link #type} (Defines the type of structure that this definition is describing.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ @@ -1649,7 +1877,52 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #contextType} (Identifies the type of context to which the extension applies.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + * @return {@link #abstract_} (Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public BooleanType getAbstractElement() { + if (this.abstract_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.abstract_"); + else if (Configuration.doAutoCreate()) + this.abstract_ = new BooleanType(); // bb + return this.abstract_; + } + + public boolean hasAbstractElement() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + public boolean hasAbstract() { + return this.abstract_ != null && !this.abstract_.isEmpty(); + } + + /** + * @param value {@link #abstract_} (Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value + */ + public StructureDefinition setAbstractElement(BooleanType value) { + this.abstract_ = value; + return this; + } + + /** + * @return Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. + */ + public boolean getAbstract() { + return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); + } + + /** + * @param value Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. + */ + public StructureDefinition setAbstract(boolean value) { + if (this.abstract_ == null) + this.abstract_ = new BooleanType(); + this.abstract_.setValue(value); + return this; + } + + /** + * @return {@link #contextType} (If this is an extension, Identifies the context within FHIR resources where the extension can be used.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value */ public Enumeration getContextTypeElement() { if (this.contextType == null) @@ -1669,7 +1942,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #contextType} (Identifies the type of context to which the extension applies.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + * @param value {@link #contextType} (If this is an extension, Identifies the context within FHIR resources where the extension can be used.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value */ public StructureDefinition setContextTypeElement(Enumeration value) { this.contextType = value; @@ -1677,14 +1950,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return Identifies the type of context to which the extension applies. + * @return If this is an extension, Identifies the context within FHIR resources where the extension can be used. */ public ExtensionContext getContextType() { return this.contextType == null ? null : this.contextType.getValue(); } /** - * @param value Identifies the type of context to which the extension applies. + * @param value If this is an extension, Identifies the context within FHIR resources where the extension can be used. */ public StructureDefinition setContextType(ExtensionContext value) { if (value == null) @@ -1752,7 +2025,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #base} (The structure that is the base on which this set of constraints is derived from.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + * @return {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value */ public UriType getBaseElement() { if (this.base == null) @@ -1772,7 +2045,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #base} (The structure that is the base on which this set of constraints is derived from.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + * @param value {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value */ public StructureDefinition setBaseElement(UriType value) { this.base = value; @@ -1780,14 +2053,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The structure that is the base on which this set of constraints is derived from. + * @return An absolute URI that is the base structure from which this set of constraints is derived. */ public String getBase() { return this.base == null ? null : this.base.getValue(); } /** - * @param value The structure that is the base on which this set of constraints is derived from. + * @param value An absolute URI that is the base structure from which this set of constraints is derived. */ public StructureDefinition setBase(String value) { if (Utilities.noString(value)) @@ -1801,7 +2074,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.) + * @return {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.) */ public StructureDefinitionSnapshotComponent getSnapshot() { if (this.snapshot == null) @@ -1817,7 +2090,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.) + * @param value {@link #snapshot} (A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.) */ public StructureDefinition setSnapshot(StructureDefinitionSnapshotComponent value) { this.snapshot = value; @@ -1825,7 +2098,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #differential} (A differential view is expressed relative to the base profile - a statement of differences that it applies.) + * @return {@link #differential} (A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.) */ public StructureDefinitionDifferentialComponent getDifferential() { if (this.differential == null) @@ -1841,7 +2114,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #differential} (A differential view is expressed relative to the base profile - a statement of differences that it applies.) + * @param value {@link #differential} (A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.) */ public StructureDefinition setDifferential(StructureDefinitionDifferentialComponent value) { this.differential = value; @@ -1850,27 +2123,30 @@ public class StructureDefinition extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("url", "uri", "The URL at which this profile is (or will be) published, and which is used to reference this profile in extension urls and tag values in operational FHIR systems.", 0, java.lang.Integer.MAX_VALUE, url)); - childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this profile when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("name", "string", "A free text natural language name identifying the Profile.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("url", "uri", "An absolute URL at which this StructureDefinition is (or will be) published, and which is used to reference this StructureDefinition in extension urls and tag values in operational FHIR systems.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("display", "string", "Defined so that applications can use this name when displaying the value of the extension to the user.", 0, java.lang.Integer.MAX_VALUE, display)); - childrenList.add(new Property("publisher", "string", "Details of the individual or organization who accepts responsibility for publishing the profile.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); - childrenList.add(new Property("description", "string", "A free text natural language description of the profile and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the structure definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("description", "string", "A free text natural language description of the StructureDefinition and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "Explains why this structure definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of templates.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("status", "code", "The status of the profile.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("experimental", "boolean", "This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); - childrenList.add(new Property("date", "dateTime", "The date that this version of the profile was published.", 0, java.lang.Integer.MAX_VALUE, date)); - childrenList.add(new Property("requirements", "string", "The Scope and Usage that this profile was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); - childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this profile is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.4.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("status", "code", "The status of the StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("date", "dateTime", "The date that this version of the StructureDefinition was published.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 0.5.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); childrenList.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, java.lang.Integer.MAX_VALUE, mapping)); childrenList.add(new Property("type", "code", "Defines the type of structure that this definition is describing.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("contextType", "code", "Identifies the type of context to which the extension applies.", 0, java.lang.Integer.MAX_VALUE, contextType)); + childrenList.add(new Property("abstract", "boolean", "Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.", 0, java.lang.Integer.MAX_VALUE, abstract_)); + childrenList.add(new Property("contextType", "code", "If this is an extension, Identifies the context within FHIR resources where the extension can be used.", 0, java.lang.Integer.MAX_VALUE, contextType)); childrenList.add(new Property("context", "string", "Identifies the types of resource or data type elements to which the extension can be applied.", 0, java.lang.Integer.MAX_VALUE, context)); - childrenList.add(new Property("base", "uri", "The structure that is the base on which this set of constraints is derived from.", 0, java.lang.Integer.MAX_VALUE, base)); - childrenList.add(new Property("snapshot", "", "A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base profile.", 0, java.lang.Integer.MAX_VALUE, snapshot)); - childrenList.add(new Property("differential", "", "A differential view is expressed relative to the base profile - a statement of differences that it applies.", 0, java.lang.Integer.MAX_VALUE, differential)); + childrenList.add(new Property("base", "uri", "An absolute URI that is the base structure from which this set of constraints is derived.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("snapshot", "", "A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, snapshot)); + childrenList.add(new Property("differential", "", "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", 0, java.lang.Integer.MAX_VALUE, differential)); } public StructureDefinition copy() { @@ -1884,14 +2160,21 @@ public class StructureDefinition extends DomainResource { }; dst.version = version == null ? null : version.copy(); dst.name = name == null ? null : name.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; dst.display = display == null ? null : display.copy(); dst.publisher = publisher == null ? null : publisher.copy(); - if (telecom != null) { - dst.telecom = new ArrayList(); - for (ContactPoint i : telecom) - dst.telecom.add(i.copy()); + if (contact != null) { + dst.contact = new ArrayList(); + for (StructureDefinitionContactComponent i : contact) + dst.contact.add(i.copy()); }; dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); if (code != null) { dst.code = new ArrayList(); for (Coding i : code) @@ -1900,7 +2183,6 @@ public class StructureDefinition extends DomainResource { dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); dst.date = date == null ? null : date.copy(); - dst.requirements = requirements == null ? null : requirements.copy(); dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); if (mapping != null) { dst.mapping = new ArrayList(); @@ -1908,6 +2190,7 @@ public class StructureDefinition extends DomainResource { dst.mapping.add(i.copy()); }; dst.type = type == null ? null : type.copy(); + dst.abstract_ = abstract_ == null ? null : abstract_.copy(); dst.contextType = contextType == null ? null : contextType.copy(); if (context != null) { dst.context = new ArrayList(); @@ -1932,11 +2215,12 @@ public class StructureDefinition extends DomainResource { return false; StructureDefinition o = (StructureDefinition) other; return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) - && compareDeep(name, o.name, true) && compareDeep(display, o.display, true) && compareDeep(publisher, o.publisher, true) - && compareDeep(telecom, o.telecom, true) && compareDeep(description, o.description, true) && compareDeep(code, o.code, true) - && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) - && compareDeep(requirements, o.requirements, true) && compareDeep(fhirVersion, o.fhirVersion, true) - && compareDeep(mapping, o.mapping, true) && compareDeep(type, o.type, true) && compareDeep(contextType, o.contextType, true) + && compareDeep(name, o.name, true) && compareDeep(useContext, o.useContext, true) && compareDeep(display, o.display, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(code, o.code, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(date, o.date, true) && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(mapping, o.mapping, true) + && compareDeep(type, o.type, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(contextType, o.contextType, true) && compareDeep(context, o.context, true) && compareDeep(base, o.base, true) && compareDeep(snapshot, o.snapshot, true) && compareDeep(differential, o.differential, true); } @@ -1950,21 +2234,24 @@ public class StructureDefinition extends DomainResource { StructureDefinition o = (StructureDefinition) other; return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) && compareValues(display, o.display, true) && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true) + && compareValues(requirements, o.requirements, true) && compareValues(copyright, o.copyright, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) - && compareValues(requirements, o.requirements, true) && compareValues(fhirVersion, o.fhirVersion, true) - && compareValues(type, o.type, true) && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true) - && compareValues(base, o.base, true); + && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(type, o.type, true) && compareValues(abstract_, o.abstract_, true) + && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true) && compareValues(base, o.base, true) + ; } public boolean isEmpty() { return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (display == null || display.isEmpty()) - && (publisher == null || publisher.isEmpty()) && (telecom == null || telecom.isEmpty()) && (description == null || description.isEmpty()) - && (code == null || code.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (date == null || date.isEmpty()) && (requirements == null || requirements.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) - && (mapping == null || mapping.isEmpty()) && (type == null || type.isEmpty()) && (contextType == null || contextType.isEmpty()) - && (context == null || context.isEmpty()) && (base == null || base.isEmpty()) && (snapshot == null || snapshot.isEmpty()) - && (differential == null || differential.isEmpty()); + && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (useContext == null || useContext.isEmpty()) + && (display == null || display.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) + && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) + && (copyright == null || copyright.isEmpty()) && (code == null || code.isEmpty()) && (status == null || status.isEmpty()) + && (experimental == null || experimental.isEmpty()) && (date == null || date.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) + && (mapping == null || mapping.isEmpty()) && (type == null || type.isEmpty()) && (abstract_ == null || abstract_.isEmpty()) + && (contextType == null || contextType.isEmpty()) && (context == null || context.isEmpty()) + && (base == null || base.isEmpty()) && (snapshot == null || snapshot.isEmpty()) && (differential == null || differential.isEmpty()) + ; } @Override @@ -1976,26 +2263,40 @@ public class StructureDefinition extends DomainResource { public static final String SP_DATE = "date"; @SearchParamDefinition(name="identifier", path="StructureDefinition.identifier", description="The identifier of the profile", type="token" ) public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "path", path = "StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description = "A path that is constrained in the profile", type = "token") - public static final String SP_PATH = "path"; - @SearchParamDefinition(name = "code", path = "StructureDefinition.code", description = "A code for the profile", type = "token") - public static final String SP_CODE = "code"; - @SearchParamDefinition(name = "valueset", path = "StructureDefinition.snapshot.element.binding.reference[x]", description = "A vocabulary binding code", type = "reference") - public static final String SP_VALUESET = "valueset"; - @SearchParamDefinition(name = "name", path = "StructureDefinition.name", description = "Name of the profile", type = "string") - public static final String SP_NAME = "name"; - @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" ) - public static final String SP_PUBLISHER = "publisher"; - @SearchParamDefinition(name = "description", path = "StructureDefinition.description", description = "Text search in the description of the profile", type = "string") - public static final String SP_DESCRIPTION = "description"; - @SearchParamDefinition(name = "type", path = "StructureDefinition.type", description = "abstract | type | resource | constraint | extension", type = "token") - public static final String SP_TYPE = "type"; + @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" ) + public static final String SP_CODE = "code"; + @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.valueSet[x]", description="A vocabulary binding reference", type="reference" ) + public static final String SP_VALUESET = "valueset"; + @SearchParamDefinition(name="display", path="StructureDefinition.display", description="Use this name when displaying the value", type="string" ) + public static final String SP_DISPLAY = "display"; + @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + @SearchParamDefinition(name="experimental", path="StructureDefinition.experimental", description="If for testing purposes, not real usage", type="token" ) + public static final String SP_EXPERIMENTAL = "experimental"; + @SearchParamDefinition(name="context-type", path="StructureDefinition.contextType", description="resource | datatype | mapping | extension", type="token" ) + public static final String SP_CONTEXTTYPE = "context-type"; + @SearchParamDefinition(name="abstract", path="StructureDefinition.abstract", description="Whether the structure is abstract", type="token" ) + public static final String SP_ABSTRACT = "abstract"; + @SearchParamDefinition(name="type", path="StructureDefinition.type", description="type | resource | constraint | extension", type="token" ) + public static final String SP_TYPE = "type"; @SearchParamDefinition(name="version", path="StructureDefinition.version", description="The version identifier of the profile", type="token" ) public static final String SP_VERSION = "version"; - @SearchParamDefinition(name = "url", path = "StructureDefinition.url", description = "Literal URL used to reference this profile", type = "token") - public static final String SP_URL = "url"; - @SearchParamDefinition(name = "status", path = "StructureDefinition.status", description = "The current status of the profile", type = "token") - public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="url", path="StructureDefinition.url", description="Literal URL used to reference this StructureDefinition", type="uri" ) + public static final String SP_URL = "url"; + @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path|StructureDefinition.differential.element.path", description="A path that is constrained in the profile", type="token" ) + public static final String SP_PATH = "path"; + @SearchParamDefinition(name="ext-context", path="StructureDefinition.context", description="Where the extension can be used in instances", type="string" ) + public static final String SP_EXTCONTEXT = "ext-context"; + @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" ) + public static final String SP_NAME = "name"; + @SearchParamDefinition(name="context", path="StructureDefinition.useContext", description="A use context assigned to the structure", type="token" ) + public static final String SP_CONTEXT = "context"; + @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" ) + public static final String SP_STATUS = "status"; + @SearchParamDefinition(name="base", path="StructureDefinition.base", description="Structure that this set of constraints applies to", type="uri" ) + public static final String SP_BASE = "base"; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java deleted file mode 100644 index e3545ae8bef..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/SupportingDocumentation.java +++ /dev/null @@ -1,925 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * This resource provides the supporting information for a process, for example clinical or financial information related to a claim or pre-authorization. - */ -@ResourceDef(name="SupportingDocumentation", profile="http://hl7.org/fhir/Profile/SupportingDocumentation") -public class SupportingDocumentation extends DomainResource { - - @Block() - public static class SupportingDocumentationDetailComponent extends BackboneElement { - /** - * A link Id for the response to reference. - */ - @Child(name="linkId", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="LinkId", formalDefinition="A link Id for the response to reference." ) - protected IntegerType linkId; - - /** - * The attached content. - */ - @Child(name="content", type={Attachment.class}, order=2, min=1, max=1) - @Description(shortDefinition="Content", formalDefinition="The attached content." ) - protected Type content; - - /** - * The date and optionally time when the material was created. - */ - @Child(name="dateTime", type={DateTimeType.class}, order=3, min=0, max=1) - @Description(shortDefinition="Creation date and time", formalDefinition="The date and optionally time when the material was created." ) - protected DateTimeType dateTime; - - private static final long serialVersionUID = -132176946L; - - public SupportingDocumentationDetailComponent() { - super(); - } - - public SupportingDocumentationDetailComponent(IntegerType linkId, Type content) { - super(); - this.linkId = linkId; - this.content = content; - } - - /** - * @return {@link #linkId} (A link Id for the response to reference.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value - */ - public IntegerType getLinkIdElement() { - if (this.linkId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentationDetailComponent.linkId"); - else if (Configuration.doAutoCreate()) - this.linkId = new IntegerType(); // bb - return this.linkId; - } - - public boolean hasLinkIdElement() { - return this.linkId != null && !this.linkId.isEmpty(); - } - - public boolean hasLinkId() { - return this.linkId != null && !this.linkId.isEmpty(); - } - - /** - * @param value {@link #linkId} (A link Id for the response to reference.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value - */ - public SupportingDocumentationDetailComponent setLinkIdElement(IntegerType value) { - this.linkId = value; - return this; - } - - /** - * @return A link Id for the response to reference. - */ - public int getLinkId() { - return this.linkId == null ? 0 : this.linkId.getValue(); - } - - /** - * @param value A link Id for the response to reference. - */ - public SupportingDocumentationDetailComponent setLinkId(int value) { - if (this.linkId == null) - this.linkId = new IntegerType(); - this.linkId.setValue(value); - return this; - } - - /** - * @return {@link #content} (The attached content.) - */ - public Type getContent() { - return this.content; - } - - /** - * @return {@link #content} (The attached content.) - */ - public Reference getContentReference() throws Exception { - if (!(this.content instanceof Reference)) - throw new Exception("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); - return (Reference) this.content; - } - - /** - * @return {@link #content} (The attached content.) - */ - public Attachment getContentAttachment() throws Exception { - if (!(this.content instanceof Attachment)) - throw new Exception("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); - return (Attachment) this.content; - } - - public boolean hasContent() { - return this.content != null && !this.content.isEmpty(); - } - - /** - * @param value {@link #content} (The attached content.) - */ - public SupportingDocumentationDetailComponent setContent(Type value) { - this.content = value; - return this; - } - - /** - * @return {@link #dateTime} (The date and optionally time when the material was created.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value - */ - public DateTimeType getDateTimeElement() { - if (this.dateTime == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentationDetailComponent.dateTime"); - else if (Configuration.doAutoCreate()) - this.dateTime = new DateTimeType(); // bb - return this.dateTime; - } - - public boolean hasDateTimeElement() { - return this.dateTime != null && !this.dateTime.isEmpty(); - } - - public boolean hasDateTime() { - return this.dateTime != null && !this.dateTime.isEmpty(); - } - - /** - * @param value {@link #dateTime} (The date and optionally time when the material was created.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value - */ - public SupportingDocumentationDetailComponent setDateTimeElement(DateTimeType value) { - this.dateTime = value; - return this; - } - - /** - * @return The date and optionally time when the material was created. - */ - public Date getDateTime() { - return this.dateTime == null ? null : this.dateTime.getValue(); - } - - /** - * @param value The date and optionally time when the material was created. - */ - public SupportingDocumentationDetailComponent setDateTime(Date value) { - if (value == null) - this.dateTime = null; - else { - if (this.dateTime == null) - this.dateTime = new DateTimeType(); - this.dateTime.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("linkId", "integer", "A link Id for the response to reference.", 0, java.lang.Integer.MAX_VALUE, linkId)); - childrenList.add(new Property("content[x]", "Reference(Any)|Attachment", "The attached content.", 0, java.lang.Integer.MAX_VALUE, content)); - childrenList.add(new Property("dateTime", "dateTime", "The date and optionally time when the material was created.", 0, java.lang.Integer.MAX_VALUE, dateTime)); - } - - public SupportingDocumentationDetailComponent copy() { - SupportingDocumentationDetailComponent dst = new SupportingDocumentationDetailComponent(); - copyValues(dst); - dst.linkId = linkId == null ? null : linkId.copy(); - dst.content = content == null ? null : content.copy(); - dst.dateTime = dateTime == null ? null : dateTime.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SupportingDocumentationDetailComponent)) - return false; - SupportingDocumentationDetailComponent o = (SupportingDocumentationDetailComponent) other; - return compareDeep(linkId, o.linkId, true) && compareDeep(content, o.content, true) && compareDeep(dateTime, o.dateTime, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SupportingDocumentationDetailComponent)) - return false; - SupportingDocumentationDetailComponent o = (SupportingDocumentationDetailComponent) other; - return compareValues(linkId, o.linkId, true) && compareValues(dateTime, o.dateTime, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (content == null || content.isEmpty()) - && (dateTime == null || dateTime.isEmpty()); - } - - } - - /** - * The Response Business Identifier. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 1, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Business Identifier", formalDefinition="The Response Business Identifier." ) - protected List identifier; - - /** - * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) - protected Coding ruleset; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - /** - * The date when this resource was created. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) - protected DateTimeType created; - - /** - * The Insurer, organization or Provider who is target of the submission. - */ - @Child(name = "target", type = {Organization.class, Practitioner.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer or Provider", formalDefinition="The Insurer, organization or Provider who is target of the submission." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer, organization or Provider who is target of the submission.) - */ - protected Resource targetTarget; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the services rendered to the patient. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; - - /** - * Original request. - */ - @Child(name = "request", type = {}, order = 7, min = 0, max = 1) - @Description(shortDefinition="Request reference", formalDefinition="Original request." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request.) - */ - protected Resource requestTarget; - - /** - * Original response. - */ - @Child(name = "response", type = {}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Response reference", formalDefinition="Original response." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Original response.) - */ - protected Resource responseTarget; - - /** - * Person who created the submission. - */ - @Child(name = "author", type = {Practitioner.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Author", formalDefinition="Person who created the submission." ) - protected Reference author; - - /** - * The actual object that is the target of the reference (Person who created the submission.) - */ - protected Practitioner authorTarget; - - /** - * The patient who is directly or indirectly the subject of the supporting information. - */ - @Child(name = "subject", type = {Patient.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Patient", formalDefinition="The patient who is directly or indirectly the subject of the supporting information." ) - protected Reference subject; - - /** - * The actual object that is the target of the reference (The patient who is directly or indirectly the subject of the supporting information.) - */ - protected Patient subjectTarget; - - /** - * Supporting Files. - */ - @Child(name = "detail", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Supporting Files", formalDefinition="Supporting Files." ) - protected List detail; - - private static final long serialVersionUID = -1353519836L; - - public SupportingDocumentation() { - super(); - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The Response Business Identifier.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) - */ - public SupportingDocumentation setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public SupportingDocumentation setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public DateTimeType getCreatedElement() { - if (this.created == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.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 when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public SupportingDocumentation setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when this resource was created. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when this resource was created. - */ - public SupportingDocumentation 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 #target} (The Insurer, organization or Provider who is target of the submission.) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (The Insurer, organization or Provider who is target of the submission.) - */ - public SupportingDocumentation setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer, organization or Provider who is target of the submission.) - */ - public Resource getTargetTarget() { - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer, organization or Provider who is target of the submission.) - */ - public SupportingDocumentation setTargetTarget(Resource value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public SupportingDocumentation setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public SupportingDocumentation setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) - */ - public SupportingDocumentation setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public SupportingDocumentation setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #request} (Original request.) - */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.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} (Original request.) - */ - public SupportingDocumentation setRequest(Reference value) { - this.request = value; - return this; - } - - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request.) - */ - public SupportingDocumentation setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - - /** - * @return {@link #response} (Original response.) - */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc - return this.response; - } - - public boolean hasResponse() { - return this.response != null && !this.response.isEmpty(); - } - - /** - * @param value {@link #response} (Original response.) - */ - public SupportingDocumentation setResponse(Reference value) { - this.response = value; - return this; - } - - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original response.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original response.) - */ - public SupportingDocumentation setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - - /** - * @return {@link #author} (Person who created the submission.) - */ - public Reference getAuthor() { - if (this.author == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.author"); - else if (Configuration.doAutoCreate()) - this.author = new Reference(); // cc - return this.author; - } - - public boolean hasAuthor() { - return this.author != null && !this.author.isEmpty(); - } - - /** - * @param value {@link #author} (Person who created the submission.) - */ - public SupportingDocumentation setAuthor(Reference value) { - this.author = value; - return this; - } - - /** - * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the submission.) - */ - public Practitioner getAuthorTarget() { - if (this.authorTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.author"); - else if (Configuration.doAutoCreate()) - this.authorTarget = new Practitioner(); // aa - return this.authorTarget; - } - - /** - * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the submission.) - */ - public SupportingDocumentation setAuthorTarget(Practitioner value) { - this.authorTarget = value; - return this; - } - - /** - * @return {@link #subject} (The patient who is directly or indirectly the subject of the supporting information.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.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 who is directly or indirectly the subject of the supporting information.) - */ - public SupportingDocumentation setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who is directly or indirectly the subject of the supporting information.) - */ - public Patient getSubjectTarget() { - if (this.subjectTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SupportingDocumentation.subject"); - else if (Configuration.doAutoCreate()) - this.subjectTarget = new Patient(); // aa - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who is directly or indirectly the subject of the supporting information.) - */ - public SupportingDocumentation setSubjectTarget(Patient value) { - this.subjectTarget = value; - return this; - } - - /** - * @return {@link #detail} (Supporting Files.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (SupportingDocumentationDetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Supporting Files.) - */ - // syntactic sugar - public SupportingDocumentationDetailComponent addDetail() { //3 - SupportingDocumentationDetailComponent t = new SupportingDocumentationDetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization|Practitioner)", "The Insurer, organization or Provider who is target of the submission.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Original request.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Any)", "Original response.", 0, java.lang.Integer.MAX_VALUE, response)); - childrenList.add(new Property("author", "Reference(Practitioner)", "Person who created the submission.", 0, java.lang.Integer.MAX_VALUE, author)); - childrenList.add(new Property("subject", "Reference(Patient)", "The patient who is directly or indirectly the subject of the supporting information.", 0, java.lang.Integer.MAX_VALUE, subject)); - childrenList.add(new Property("detail", "", "Supporting Files.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public SupportingDocumentation copy() { - SupportingDocumentation dst = new SupportingDocumentation(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.request = request == null ? null : request.copy(); - dst.response = response == null ? null : response.copy(); - dst.author = author == null ? null : author.copy(); - dst.subject = subject == null ? null : subject.copy(); - if (detail != null) { - dst.detail = new ArrayList(); - for (SupportingDocumentationDetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - protected SupportingDocumentation typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SupportingDocumentation)) - return false; - SupportingDocumentation o = (SupportingDocumentation) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) - && compareDeep(author, o.author, true) && compareDeep(subject, o.subject, true) && compareDeep(detail, o.detail, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SupportingDocumentation)) - return false; - SupportingDocumentation o = (SupportingDocumentation) other; - return compareValues(created, o.created, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (author == null || author.isEmpty()) - && (subject == null || subject.isEmpty()) && (detail == null || detail.isEmpty()); - } - - @Override - public ResourceType getResourceType() { - return ResourceType.SupportingDocumentation; - } - - @SearchParamDefinition(name = "identifier", path = "SupportingDocumentation.identifier", description = "The business identifier of the Eligibility", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name="author", path="SupportingDocumentation.author", description="The person who generated this resource", type="reference" ) - public static final String SP_AUTHOR = "author"; - @SearchParamDefinition(name="subject", path="SupportingDocumentation.subject", description="The patient to whom the documents refer", type="reference" ) - public static final String SP_SUBJECT = "subject"; - @SearchParamDefinition(name = "patient", path = "SupportingDocumentation.subject", description = "The patient to whom the documents refer", type = "reference") - public static final String SP_PATIENT = "patient"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/UnsignedIntType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/UnsignedIntType.java new file mode 100644 index 00000000000..47197a41058 --- /dev/null +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/UnsignedIntType.java @@ -0,0 +1,95 @@ +/* +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. + + */ +/** + * + */ +package org.hl7.fhir.instance.model; + +import org.hl7.fhir.instance.model.annotations.DatatypeDef; + +/** + * Primitive type "integer" in FHIR: A signed 32-bit integer + */ +@DatatypeDef(name = "unsignedInt") +public class UnsignedIntType extends IntegerType { + + + /** + * + */ + private static final long serialVersionUID = -7991875974606711355L; + + /** + * Constructor + */ + public UnsignedIntType() { + // nothing + } + + /** + * Constructor + */ + public UnsignedIntType(int theInteger) { + setValue(theInteger); + } + + /** + * Constructor + * + * @param theIntegerAsString + * A string representation of an integer + * @throws IllegalArgumentException + * If the string is not a valid integer representation + */ + public UnsignedIntType(String theIntegerAsString) { + setValueAsString(theIntegerAsString); + } + + /** + * Constructor + * + * @param theValue The value + * @throws IllegalArgumentException If the value is too large to fit in a signed integer + */ + public UnsignedIntType(Long theValue) { + if (theValue < 0 || theValue > java.lang.Integer.MAX_VALUE) { + throw new IllegalArgumentException + (theValue + " cannot be cast to int without changing its value."); + } + if(theValue!=null) { + setValue((int)theValue.longValue()); + } + } + + @Override + public UnsignedIntType copy() { + return new UnsignedIntType(getValue()); + } + +} diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java deleted file mode 100644 index d7afcc5ea60..00000000000 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/VisionClaim.java +++ /dev/null @@ -1,4010 +0,0 @@ -package org.hl7.fhir.instance.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 Wed, Feb 18, 2015 12:09-0500 for FHIR v0.4.0 - -import java.util.*; - -import java.math.*; -import org.hl7.fhir.utilities.Utilities; -import org.hl7.fhir.instance.model.annotations.ResourceDef; -import org.hl7.fhir.instance.model.annotations.SearchParamDefinition; -import org.hl7.fhir.instance.model.annotations.Block; -import org.hl7.fhir.instance.model.annotations.Child; -import org.hl7.fhir.instance.model.annotations.Description; -/** - * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. - */ -@ResourceDef(name="VisionClaim", profile="http://hl7.org/fhir/Profile/VisionClaim") -public class VisionClaim extends DomainResource { - - public enum UseLink { - /** - * The treatment is complete and this represents a Claim for the services. - */ - COMPLETE, - /** - * The treatment is proposed and this represents a Pre-authorization for the services. - */ - PROPOSED, - /** - * The treatment is proposed and this represents a Pre-determination for the services. - */ - EXPLORATORY, - /** - * A locally defined or otherwise resolved status. - */ - OTHER, - /** - * added to help the parsers - */ - NULL; - public static UseLink fromCode(String codeString) throws Exception { - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return COMPLETE; - if ("proposed".equals(codeString)) - return PROPOSED; - if ("exploratory".equals(codeString)) - return EXPLORATORY; - if ("other".equals(codeString)) - return OTHER; - throw new Exception("Unknown UseLink code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case COMPLETE: return ""; - case PROPOSED: return ""; - case EXPLORATORY: return ""; - case OTHER: return ""; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; - case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; - case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; - case OTHER: return "A locally defined or otherwise resolved status."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case COMPLETE: return "complete"; - case PROPOSED: return "proposed"; - case EXPLORATORY: return "exploratory"; - case OTHER: return "other"; - default: return "?"; - } - } - } - - public static class UseLinkEnumFactory implements EnumFactory { - public UseLink fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("complete".equals(codeString)) - return UseLink.COMPLETE; - if ("proposed".equals(codeString)) - return UseLink.PROPOSED; - if ("exploratory".equals(codeString)) - return UseLink.EXPLORATORY; - if ("other".equals(codeString)) - return UseLink.OTHER; - throw new IllegalArgumentException("Unknown UseLink code '"+codeString+"'"); - } - public String toCode(UseLink code) { - if (code == UseLink.COMPLETE) - return "complete"; - if (code == UseLink.PROPOSED) - return "proposed"; - if (code == UseLink.EXPLORATORY) - return "exploratory"; - if (code == UseLink.OTHER) - return "other"; - return "?"; - } - } - - @Block() - public static class PayeeComponent extends BackboneElement { - /** - * Party to be reimbursed: Subscriber, provider, other. - */ - @Child(name="type", type={Coding.class}, order=1, min=0, max=1) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) - protected Coding type; - - /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="provider", type={Practitioner.class}, order=2, min=0, max=1) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="organization", type={Organization.class}, order=3, min=0, max=1) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name="person", type={Patient.class}, order=4, min=0, max=1) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; - - public PayeeComponent() { - super(); - } - - /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) - */ - public PayeeComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); - } - - public PayeeComponent copy() { - PayeeComponent dst = new PayeeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof PayeeComponent)) - return false; - PayeeComponent o = (PayeeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; - } - - } - - @Block() - public static class DiagnosisComponent extends BackboneElement { - /** - * Sequence of diagnosis. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis." ) - protected IntegerType sequence; - - /** - * The diagnosis. - */ - @Child(name="diagnosis", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) - protected Coding diagnosis; - - private static final long serialVersionUID = -935927954L; - - public DiagnosisComponent() { - super(); - } - - public DiagnosisComponent(IntegerType sequence, Coding diagnosis) { - super(); - this.sequence = sequence; - this.diagnosis = diagnosis; - } - - /** - * @return {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // bb - return this.sequence; - } - - public boolean hasSequenceElement() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - public boolean hasSequence() { - return this.sequence != null && !this.sequence.isEmpty(); - } - - /** - * @param value {@link #sequence} (Sequence of diagnosis.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DiagnosisComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return Sequence of diagnosis. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value Sequence of diagnosis. - */ - public DiagnosisComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #diagnosis} (The diagnosis.) - */ - public Coding getDiagnosis() { - if (this.diagnosis == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); - else if (Configuration.doAutoCreate()) - this.diagnosis = new Coding(); // cc - return this.diagnosis; - } - - public boolean hasDiagnosis() { - return this.diagnosis != null && !this.diagnosis.isEmpty(); - } - - /** - * @param value {@link #diagnosis} (The diagnosis.) - */ - public DiagnosisComponent setDiagnosis(Coding value) { - this.diagnosis = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "Sequence of diagnosis.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - } - - public DiagnosisComponent copy() { - DiagnosisComponent dst = new DiagnosisComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DiagnosisComponent)) - return false; - DiagnosisComponent o = (DiagnosisComponent) other; - return compareValues(sequence, o.sequence, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; - } - - } - - @Block() - public static class CoverageComponent extends BackboneElement { - /** - * A service line item. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) - protected IntegerType sequence; - - /** - * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - @Child(name="focal", type={BooleanType.class}, order=2, min=1, max=1) - @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) - protected BooleanType focal; - - /** - * Reference to the program or plan identification, underwriter or payor. - */ - @Child(name="coverage", type={Coverage.class}, order=3, min=1, max=1) - @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The contract number of a business agreement which describes the terms and conditions. - */ - @Child(name="businessArrangement", type={StringType.class}, order=4, min=0, max=1) - @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) - protected StringType businessArrangement; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name="relationship", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - - /** - * A list of references from the Insurer to which these services pertain. - */ - @Child(name="preauthref", type={StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) - protected List preauthref; - - /** - * The Coverages adjudication details. - */ - @Child(name="claimResponse", type={ClaimResponse.class}, order=7, min=0, max=1) - @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) - protected Reference claimResponse; - - /** - * The actual object that is the target of the reference (The Coverages adjudication details.) - */ - protected ClaimResponse claimResponseTarget; - - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name="originalRuleset", type={Coding.class}, order=8, min=0, max=1) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - private static final long serialVersionUID = 450222500L; - - public CoverageComponent() { - super(); - } - - public CoverageComponent(IntegerType sequence, BooleanType focal, Reference coverage, Coding relationship) { - super(); - this.sequence = sequence; - this.focal = focal; - this.coverage = coverage; - this.relationship = relationship; - } - - /** - * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public CoverageComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line item. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line item. - */ - public CoverageComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public BooleanType getFocalElement() { - if (this.focal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.focal"); - else if (Configuration.doAutoCreate()) - this.focal = new BooleanType(); // bb - return this.focal; - } - - public boolean hasFocalElement() { - return this.focal != null && !this.focal.isEmpty(); - } - - public boolean hasFocal() { - return this.focal != null && !this.focal.isEmpty(); - } - - /** - * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value - */ - public CoverageComponent setFocalElement(BooleanType value) { - this.focal = value; - return this; - } - - /** - * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public boolean getFocal() { - return this.focal == null ? false : this.focal.getValue(); - } - - /** - * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. - */ - public CoverageComponent setFocal(boolean value) { - if (this.focal == null) - this.focal = new BooleanType(); - this.focal.setValue(value); - return this; - } - - /** - * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc - return this.coverage; - } - - public boolean hasCoverage() { - return this.coverage != null && !this.coverage.isEmpty(); - } - - /** - * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverage(Reference value) { - this.coverage = value; - return this; - } - - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public StringType getBusinessArrangementElement() { - if (this.businessArrangement == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); - else if (Configuration.doAutoCreate()) - this.businessArrangement = new StringType(); // bb - return this.businessArrangement; - } - - public boolean hasBusinessArrangementElement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - public boolean hasBusinessArrangement() { - return this.businessArrangement != null && !this.businessArrangement.isEmpty(); - } - - /** - * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value - */ - public CoverageComponent setBusinessArrangementElement(StringType value) { - this.businessArrangement = value; - return this; - } - - /** - * @return The contract number of a business agreement which describes the terms and conditions. - */ - public String getBusinessArrangement() { - return this.businessArrangement == null ? null : this.businessArrangement.getValue(); - } - - /** - * @param value The contract number of a business agreement which describes the terms and conditions. - */ - public CoverageComponent setBusinessArrangement(String value) { - if (Utilities.noString(value)) - this.businessArrangement = null; - else { - if (this.businessArrangement == null) - this.businessArrangement = new StringType(); - this.businessArrangement.setValue(value); - } - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public List getPreauthref() { - if (this.preauthref == null) - this.preauthref = new ArrayList(); - return this.preauthref; - } - - public boolean hasPreauthref() { - if (this.preauthref == null) - return false; - for (StringType item : this.preauthref) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - // syntactic sugar - public StringType addPreauthrefElement() {//2 - StringType t = new StringType(); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return t; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public CoverageComponent addPreauthref(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.preauthref == null) - this.preauthref = new ArrayList(); - this.preauthref.add(t); - return this; - } - - /** - * @param value {@link #preauthref} (A list of references from the Insurer to which these services pertain.) - */ - public boolean hasPreauthref(String value) { - if (this.preauthref == null) - return false; - for (StringType v : this.preauthref) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #claimResponse} (The Coverages adjudication details.) - */ - public Reference getClaimResponse() { - if (this.claimResponse == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponse = new Reference(); // cc - return this.claimResponse; - } - - public boolean hasClaimResponse() { - return this.claimResponse != null && !this.claimResponse.isEmpty(); - } - - /** - * @param value {@link #claimResponse} (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponse(Reference value) { - this.claimResponse = value; - return this; - } - - /** - * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public ClaimResponse getClaimResponseTarget() { - if (this.claimResponseTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponseTarget = new ClaimResponse(); // aa - return this.claimResponseTarget; - } - - /** - * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Coverages adjudication details.) - */ - public CoverageComponent setClaimResponseTarget(ClaimResponse value) { - this.claimResponseTarget = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public CoverageComponent setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); - childrenList.add(new Property("preauthref", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preauthref)); - childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - } - - public CoverageComponent copy() { - CoverageComponent dst = new CoverageComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.focal = focal == null ? null : focal.copy(); - dst.coverage = coverage == null ? null : coverage.copy(); - dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); - if (preauthref != null) { - dst.preauthref = new ArrayList(); - for (StringType i : preauthref) - dst.preauthref.add(i.copy()); - }; - dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preauthref, o.preauthref, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof CoverageComponent)) - return false; - CoverageComponent o = (CoverageComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) - && compareValues(preauthref, o.preauthref, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preauthref == null || preauthref.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; - } - - } - - @Block() - public static class ItemsComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The practitioner who is responsible for the services rendered to the patient. - */ - @Child(name="provider", type={Practitioner.class}, order=3, min=0, max=1) - @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; - - /** - * Diagnosis applicable for this service or product line. - */ - @Child(name="diagnosisLinkId", type={IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) - protected List diagnosisLinkId; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=5, min=1, max=1) - @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name="serviceDate", type={DateType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Date of Service", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateType serviceDate; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=7, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=9, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=10, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=11, min=0, max=1) - @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=12, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Physical service site on the patient (limb, tooth, etc). - */ - @Child(name="bodySite", type={Coding.class}, order=13, min=0, max=1) - @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) - protected Coding bodySite; - - /** - * A region or surface of the site, eg. limb region or tooth surface(s). - */ - @Child(name="subsite", type={Coding.class}, order=14, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) - protected List subsite; - - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name="modifier", type={Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - - /** - * Second tier of goods and services. - */ - @Child(name="detail", type={}, order=16, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) - protected List detail; - - private static final long serialVersionUID = -1140048455L; - - public ItemsComponent() { - super(); - } - - public ItemsComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public ItemsComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public ItemsComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public ItemsComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public List getDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - return this.diagnosisLinkId; - } - - public boolean hasDiagnosisLinkId() { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType item : this.diagnosisLinkId) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - // syntactic sugar - public IntegerType addDiagnosisLinkIdElement() {//2 - IntegerType t = new IntegerType(); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return t; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public ItemsComponent addDiagnosisLinkId(int value) { //1 - IntegerType t = new IntegerType(); - t.setValue(value); - if (this.diagnosisLinkId == null) - this.diagnosisLinkId = new ArrayList(); - this.diagnosisLinkId.add(t); - return this; - } - - /** - * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) - */ - public boolean hasDiagnosisLinkId(int value) { - if (this.diagnosisLinkId == null) - return false; - for (IntegerType v : this.diagnosisLinkId) - if (v.equals(value)) // integer - return true; - return false; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public ItemsComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public DateType getServiceDateElement() { - if (this.serviceDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.serviceDate"); - else if (Configuration.doAutoCreate()) - this.serviceDate = new DateType(); // bb - return this.serviceDate; - } - - public boolean hasServiceDateElement() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - public boolean hasServiceDate() { - return this.serviceDate != null && !this.serviceDate.isEmpty(); - } - - /** - * @param value {@link #serviceDate} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getServiceDate" gives direct access to the value - */ - public ItemsComponent setServiceDateElement(DateType value) { - this.serviceDate = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getServiceDate() { - return this.serviceDate == null ? null : this.serviceDate.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public ItemsComponent setServiceDate(Date value) { - if (value == null) - this.serviceDate = null; - else { - if (this.serviceDate == null) - this.serviceDate = new DateType(); - this.serviceDate.setValue(value); - } - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public ItemsComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public ItemsComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public ItemsComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public ItemsComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public ItemsComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public ItemsComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public ItemsComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public Coding getBodySite() { - if (this.bodySite == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.bodySite"); - else if (Configuration.doAutoCreate()) - this.bodySite = new Coding(); // cc - return this.bodySite; - } - - public boolean hasBodySite() { - return this.bodySite != null && !this.bodySite.isEmpty(); - } - - /** - * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) - */ - public ItemsComponent setBodySite(Coding value) { - this.bodySite = value; - return this; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - public List getSubsite() { - if (this.subsite == null) - this.subsite = new ArrayList(); - return this.subsite; - } - - public boolean hasSubsite() { - if (this.subsite == null) - return false; - for (Coding item : this.subsite) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subsite} (A region or surface of the site, eg. limb region or tooth surface(s).) - */ - // syntactic sugar - public Coding addSubsite() { //3 - Coding t = new Coding(); - if (this.subsite == null) - this.subsite = new ArrayList(); - this.subsite.add(t); - return t; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - public List getDetail() { - if (this.detail == null) - this.detail = new ArrayList(); - return this.detail; - } - - public boolean hasDetail() { - if (this.detail == null) - return false; - for (DetailComponent item : this.detail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #detail} (Second tier of goods and services.) - */ - // syntactic sugar - public DetailComponent addDetail() { //3 - DetailComponent t = new DetailComponent(); - if (this.detail == null) - this.detail = new ArrayList(); - this.detail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("diagnosisLinkId", "integer", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("serviceDate", "date", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviceDate)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); - childrenList.add(new Property("subsite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subsite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); - childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); - } - - public ItemsComponent copy() { - ItemsComponent dst = new ItemsComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - if (diagnosisLinkId != null) { - dst.diagnosisLinkId = new ArrayList(); - for (IntegerType i : diagnosisLinkId) - dst.diagnosisLinkId.add(i.copy()); - }; - dst.service = service == null ? null : service.copy(); - dst.serviceDate = serviceDate == null ? null : serviceDate.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - dst.bodySite = bodySite == null ? null : bodySite.copy(); - if (subsite != null) { - dst.subsite = new ArrayList(); - for (Coding i : subsite) - dst.subsite.add(i.copy()); - }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; - if (detail != null) { - dst.detail = new ArrayList(); - for (DetailComponent i : detail) - dst.detail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) - && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviceDate, o.serviceDate, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) - && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) - && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(subsite, o.subsite, true) - && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ItemsComponent)) - return false; - ItemsComponent o = (ItemsComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) - && compareValues(serviceDate, o.serviceDate, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviceDate == null || serviceDate.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subsite == null || subsite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()); - } - - } - - @Block() - public static class DetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - /** - * Third tier of goods and services. - */ - @Child(name="subDetail", type={}, order=10, min=0, max=Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) - protected List subDetail; - - private static final long serialVersionUID = -342502025L; - - public DetailComponent() { - super(); - } - - public DetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public DetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public DetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public DetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) - */ - public DetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public DetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) - */ - public DetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public DetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public DetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public DetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public DetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - public List getSubDetail() { - if (this.subDetail == null) - this.subDetail = new ArrayList(); - return this.subDetail; - } - - public boolean hasSubDetail() { - if (this.subDetail == null) - return false; - for (SubDetailComponent item : this.subDetail) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #subDetail} (Third tier of goods and services.) - */ - // syntactic sugar - public SubDetailComponent addSubDetail() { //3 - SubDetailComponent t = new SubDetailComponent(); - if (this.subDetail == null) - this.subDetail = new ArrayList(); - this.subDetail.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); - } - - public DetailComponent copy() { - DetailComponent dst = new DetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - if (subDetail != null) { - dst.subDetail = new ArrayList(); - for (SubDetailComponent i : subDetail) - dst.subDetail.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(subDetail, o.subDetail, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DetailComponent)) - return false; - DetailComponent o = (DetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); - } - - } - - @Block() - public static class SubDetailComponent extends BackboneElement { - /** - * A service line number. - */ - @Child(name="sequence", type={IntegerType.class}, order=1, min=1, max=1) - @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) - protected IntegerType sequence; - - /** - * The type of product or service. - */ - @Child(name="type", type={Coding.class}, order=2, min=1, max=1) - @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) - protected Coding type; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="service", type={Coding.class}, order=3, min=1, max=1) - @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an additional service or product or charge." ) - protected Coding service; - - /** - * The number of repetitions of a service or product. - */ - @Child(name="quantity", type={Quantity.class}, order=4, min=0, max=1) - @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) - protected Quantity quantity; - - /** - * The fee for an additional service or product or charge. - */ - @Child(name="unitPrice", type={Money.class}, order=5, min=0, max=1) - @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an additional service or product or charge." ) - protected Money unitPrice; - - /** - * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - @Child(name="factor", type={DecimalType.class}, order=6, min=0, max=1) - @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) - protected DecimalType factor; - - /** - * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - @Child(name="points", type={DecimalType.class}, order=7, min=0, max=1) - @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) - protected DecimalType points; - - /** - * The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. - */ - @Child(name="net", type={Money.class}, order=8, min=0, max=1) - @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) - protected Money net; - - /** - * List of Unique Device Identifiers associated with this line item. - */ - @Child(name="udi", type={Coding.class}, order=9, min=0, max=1) - @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; - - private static final long serialVersionUID = 122809194L; - - public SubDetailComponent() { - super(); - } - - public SubDetailComponent(IntegerType sequence, Coding type, Coding service) { - super(); - this.sequence = sequence; - this.type = type; - this.service = service; - } - - /** - * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public IntegerType getSequenceElement() { - if (this.sequence == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.sequence"); - else if (Configuration.doAutoCreate()) - this.sequence = new IntegerType(); // 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} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value - */ - public SubDetailComponent setSequenceElement(IntegerType value) { - this.sequence = value; - return this; - } - - /** - * @return A service line number. - */ - public int getSequence() { - return this.sequence == null ? 0 : this.sequence.getValue(); - } - - /** - * @param value A service line number. - */ - public SubDetailComponent setSequence(int value) { - if (this.sequence == null) - this.sequence = new IntegerType(); - this.sequence.setValue(value); - return this; - } - - /** - * @return {@link #type} (The type of product or service.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of product or service.) - */ - public SubDetailComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #service} (The fee for an additional service or product or charge.) - */ - public Coding getService() { - if (this.service == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.service"); - else if (Configuration.doAutoCreate()) - this.service = new Coding(); // cc - return this.service; - } - - public boolean hasService() { - return this.service != null && !this.service.isEmpty(); - } - - /** - * @param value {@link #service} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setService(Coding value) { - this.service = value; - return this; - } - - /** - * @return {@link #quantity} (The number of repetitions of a service or product.) - */ - public Quantity getQuantity() { - if (this.quantity == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.quantity"); - else if (Configuration.doAutoCreate()) - this.quantity = new Quantity(); // cc - return this.quantity; - } - - public boolean hasQuantity() { - return this.quantity != null && !this.quantity.isEmpty(); - } - - /** - * @param value {@link #quantity} (The number of repetitions of a service or product.) - */ - public SubDetailComponent setQuantity(Quantity value) { - this.quantity = value; - return this; - } - - /** - * @return {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public Money getUnitPrice() { - if (this.unitPrice == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); - else if (Configuration.doAutoCreate()) - this.unitPrice = new Money(); // cc - return this.unitPrice; - } - - public boolean hasUnitPrice() { - return this.unitPrice != null && !this.unitPrice.isEmpty(); - } - - /** - * @param value {@link #unitPrice} (The fee for an additional service or product or charge.) - */ - public SubDetailComponent setUnitPrice(Money value) { - this.unitPrice = value; - return this; - } - - /** - * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public DecimalType getFactorElement() { - if (this.factor == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.factor"); - else if (Configuration.doAutoCreate()) - this.factor = new DecimalType(); // bb - return this.factor; - } - - public boolean hasFactorElement() { - return this.factor != null && !this.factor.isEmpty(); - } - - public boolean hasFactor() { - return this.factor != null && !this.factor.isEmpty(); - } - - /** - * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value - */ - public SubDetailComponent setFactorElement(DecimalType value) { - this.factor = value; - return this; - } - - /** - * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public BigDecimal getFactor() { - return this.factor == null ? null : this.factor.getValue(); - } - - /** - * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. - */ - public SubDetailComponent setFactor(BigDecimal value) { - if (value == null) - this.factor = null; - else { - if (this.factor == null) - this.factor = new DecimalType(); - this.factor.setValue(value); - } - return this; - } - - /** - * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public DecimalType getPointsElement() { - if (this.points == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.points"); - else if (Configuration.doAutoCreate()) - this.points = new DecimalType(); // bb - return this.points; - } - - public boolean hasPointsElement() { - return this.points != null && !this.points.isEmpty(); - } - - public boolean hasPoints() { - return this.points != null && !this.points.isEmpty(); - } - - /** - * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value - */ - public SubDetailComponent setPointsElement(DecimalType value) { - this.points = value; - return this; - } - - /** - * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public BigDecimal getPoints() { - return this.points == null ? null : this.points.getValue(); - } - - /** - * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. - */ - public SubDetailComponent setPoints(BigDecimal value) { - if (value == null) - this.points = null; - else { - if (this.points == null) - this.points = new DecimalType(); - this.points.setValue(value); - } - return this; - } - - /** - * @return {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public Money getNet() { - if (this.net == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.net"); - else if (Configuration.doAutoCreate()) - this.net = new Money(); // cc - return this.net; - } - - public boolean hasNet() { - return this.net != null && !this.net.isEmpty(); - } - - /** - * @param value {@link #net} (The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) - */ - public SubDetailComponent setNet(Money value) { - this.net = value; - return this; - } - - /** - * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public Coding getUdi() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc - return this.udi; - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) - */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("sequence", "integer", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("service", "Coding", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); - childrenList.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("unitPrice", "Money", "The fee for an additional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); - childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); - childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); - childrenList.add(new Property("net", "Money", "The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); - } - - public SubDetailComponent copy() { - SubDetailComponent dst = new SubDetailComponent(); - copyValues(dst); - dst.sequence = sequence == null ? null : sequence.copy(); - dst.type = type == null ? null : type.copy(); - dst.service = service == null ? null : service.copy(); - dst.quantity = quantity == null ? null : quantity.copy(); - dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); - dst.factor = factor == null ? null : factor.copy(); - dst.points = points == null ? null : points.copy(); - dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SubDetailComponent)) - return false; - SubDetailComponent o = (SubDetailComponent) other; - return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()); - } - - } - - /** - * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. - */ - @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected List identifier; - - /** - * The version of the specification on which this instance relies. - */ - @Child(name = "ruleset", type = {Coding.class}, order = 1, min = 0, max = 1) - @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) - protected Coding ruleset; - - /** - * The version of the specification from which the original instance was created. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order = 2, min = 0, max = 1) - @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) - protected Coding originalRuleset; - - /** - * The date when the enclosed suite of services were performed or completed. - */ - @Child(name = "created", type = {DateTimeType.class}, order = 3, min = 0, max = 1) - @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) - protected DateTimeType created; - - /** - * Insurer Identifier, typical BIN number (6 digit). - */ - @Child(name = "target", type = {Organization.class}, order = 4, min = 0, max = 1) - @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) - */ - protected Organization targetTarget; - - /** - * The provider which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "provider", type = {Practitioner.class}, order = 5, min = 0, max = 1) - @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Practitioner providerTarget; - - /** - * The organization which is responsible for the bill, claim pre-determination, pre-authorization. - */ - @Child(name = "organization", type = {Organization.class}, order = 6, min = 0, max = 1) - @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Organization organizationTarget; - - /** - * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - @Child(name = "use", type = {CodeType.class}, order = 7, min = 0, max = 1) - @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) - protected Enumeration use; - - /** - * Immediate (STAT), best effort (NORMAL), deferred (DEFER). - */ - @Child(name = "priority", type = {Coding.class}, order = 8, min = 0, max = 1) - @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) - protected Coding priority; - - /** - * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. - */ - @Child(name = "fundsReserve", type = {Coding.class}, order = 9, min = 0, max = 1) - @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) - protected Coding fundsReserve; - - /** - * Person who created the invoice/claim/pre-determination or pre-authorization. - */ - @Child(name = "enterer", type = {Practitioner.class}, order = 10, min = 0, max = 1) - @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; - - /** - * Facility where the services were provided. - */ - @Child(name = "facility", type = {Location.class}, order = 11, min = 0, max = 1) - @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; - - /** - * Prescription to support the dispensing of glasses or contact lenses. - */ - @Child(name = "prescription", type = {VisionPrescription.class}, order = 12, min = 0, max = 1) - @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of glasses or contact lenses." ) - protected Reference prescription; - - /** - * The actual object that is the target of the reference (Prescription to support the dispensing of glasses or contact lenses.) - */ - protected VisionPrescription prescriptionTarget; - - /** - * The party to be reimbursed for the services. - */ - @Child(name = "payee", type = {}, order = 13, min = 0, max = 1) - @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) - protected PayeeComponent payee; - - /** - * The referral resource which lists the date, practitioner, reason and other supporting information. - */ - @Child(name = "referral", type = {ReferralRequest.class}, order = 14, min = 0, max = 1) - @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; - - /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - protected ReferralRequest referralTarget; - - /** - * Ordered list of patient diagnosis for which care is sought. - */ - @Child(name = "diagnosis", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) - protected List diagnosis; - - /** - * List of patient conditions for which care is sought. - */ - @Child(name = "condition", type = {Coding.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="List of presenting Conditions", formalDefinition="List of patient conditions for which care is sought." ) - protected List condition; - - /** - * Patient Resource. - */ - @Child(name = "patient", type = {Patient.class}, order = 17, min = 1, max = 1) - @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; - - /** - * Financial instrument by which payment information for health care. - */ - @Child(name = "coverage", type = {}, order = 18, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected List coverage; - - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order = 19, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order = 20, min = 0, max = 1) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - - /** - * Date of an accident which these services are addressing. - */ - @Child(name = "accident", type = {DateType.class}, order = 21, min = 0, max = 1) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) - protected DateType accident; - - /** - * Type of accident: work, auto, etc. - */ - @Child(name = "accidentType", type = {Coding.class}, order = 22, min = 0, max = 1) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) - protected Coding accidentType; - - /** - * A list of intervention and exception codes which may influence the adjudication of the claim. - */ - @Child(name = "interventionException", type = {Coding.class}, order = 23, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) - protected List interventionException; - - /** - * First tier of goods and services. - */ - @Child(name = "item", type = {}, order = 24, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) - protected List item; - - /** - * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. - */ - @Child(name = "additionalMaterials", type = {Coding.class}, order = 25, min = 0, max = Child.MAX_UNLIMITED) - @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) - protected List additionalMaterials; - - private static final long serialVersionUID = -1276301992L; - - public VisionClaim() { - super(); - } - - public VisionClaim(Reference patient) { - super(); - this.patient = patient; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - /** - * @return {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public Coding getRuleset() { - if (this.ruleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.ruleset"); - else if (Configuration.doAutoCreate()) - this.ruleset = new Coding(); // cc - return this.ruleset; - } - - public boolean hasRuleset() { - return this.ruleset != null && !this.ruleset.isEmpty(); - } - - /** - * @param value {@link #ruleset} (The version of the specification on which this instance relies.) - */ - public VisionClaim setRuleset(Coding value) { - this.ruleset = value; - return this; - } - - /** - * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) - */ - public VisionClaim setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - - /** - * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). 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 VisionClaim.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 when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value - */ - public VisionClaim setCreatedElement(DateTimeType value) { - this.created = value; - return this; - } - - /** - * @return The date when the enclosed suite of services were performed or completed. - */ - public Date getCreated() { - return this.created == null ? null : this.created.getValue(); - } - - /** - * @param value The date when the enclosed suite of services were performed or completed. - */ - public VisionClaim 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 #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc - return this.target; - } - - public boolean hasTarget() { - return this.target != null && !this.target.isEmpty(); - } - - /** - * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) - */ - public VisionClaim setTarget(Reference value) { - this.target = value; - return this; - } - - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public VisionClaim setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - - /** - * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); - } - - /** - * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public VisionClaim setProvider(Reference value) { - this.provider = value; - return this; - } - - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public VisionClaim setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public VisionClaim setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public VisionClaim setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public Enumeration getUseElement() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.use"); - else if (Configuration.doAutoCreate()) - this.use = new Enumeration(new UseLinkEnumFactory()); // bb - return this.use; - } - - public boolean hasUseElement() { - return this.use != null && !this.use.isEmpty(); - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public VisionClaim setUseElement(Enumeration value) { - this.use = value; - return this; - } - - /** - * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public UseLink getUse() { - return this.use == null ? null : this.use.getValue(); - } - - /** - * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). - */ - public VisionClaim setUse(UseLink value) { - if (value == null) - this.use = null; - else { - if (this.use == null) - this.use = new Enumeration(new UseLinkEnumFactory()); - this.use.setValue(value); - } - return this; - } - - /** - * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public Coding getPriority() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new Coding(); // cc - return this.priority; - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) - */ - public VisionClaim setPriority(Coding value) { - this.priority = value; - return this; - } - - /** - * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public Coding getFundsReserve() { - if (this.fundsReserve == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.fundsReserve"); - else if (Configuration.doAutoCreate()) - this.fundsReserve = new Coding(); // cc - return this.fundsReserve; - } - - public boolean hasFundsReserve() { - return this.fundsReserve != null && !this.fundsReserve.isEmpty(); - } - - /** - * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) - */ - public VisionClaim setFundsReserve(Coding value) { - this.fundsReserve = value; - return this; - } - - /** - * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc - return this.enterer; - } - - public boolean hasEnterer() { - return this.enterer != null && !this.enterer.isEmpty(); - } - - /** - * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public VisionClaim setEnterer(Reference value) { - this.enterer = value; - return this; - } - - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public VisionClaim setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - - /** - * @return {@link #facility} (Facility where the services were provided.) - */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc - return this.facility; - } - - public boolean hasFacility() { - return this.facility != null && !this.facility.isEmpty(); - } - - /** - * @param value {@link #facility} (Facility where the services were provided.) - */ - public VisionClaim setFacility(Reference value) { - this.facility = value; - return this; - } - - /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; - } - - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public VisionClaim setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #prescription} (Prescription to support the dispensing of glasses or contact lenses.) - */ - public Reference getPrescription() { - if (this.prescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.prescription"); - else if (Configuration.doAutoCreate()) - this.prescription = new Reference(); // cc - return this.prescription; - } - - public boolean hasPrescription() { - return this.prescription != null && !this.prescription.isEmpty(); - } - - /** - * @param value {@link #prescription} (Prescription to support the dispensing of glasses or contact lenses.) - */ - public VisionClaim setPrescription(Reference value) { - this.prescription = value; - return this; - } - - /** - * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of glasses or contact lenses.) - */ - public VisionPrescription getPrescriptionTarget() { - if (this.prescriptionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.prescription"); - else if (Configuration.doAutoCreate()) - this.prescriptionTarget = new VisionPrescription(); // aa - return this.prescriptionTarget; - } - - /** - * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of glasses or contact lenses.) - */ - public VisionClaim setPrescriptionTarget(VisionPrescription value) { - this.prescriptionTarget = value; - return this; - } - - /** - * @return {@link #payee} (The party to be reimbursed for the services.) - */ - public PayeeComponent getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new PayeeComponent(); // cc - return this.payee; - } - - public boolean hasPayee() { - return this.payee != null && !this.payee.isEmpty(); - } - - /** - * @param value {@link #payee} (The party to be reimbursed for the services.) - */ - public VisionClaim setPayee(PayeeComponent value) { - this.payee = value; - return this; - } - - /** - * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc - return this.referral; - } - - public boolean hasReferral() { - return this.referral != null && !this.referral.isEmpty(); - } - - /** - * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public VisionClaim setReferral(Reference value) { - this.referral = value; - return this; - } - - /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; - } - - /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) - */ - public VisionClaim setReferralTarget(ReferralRequest value) { - this.referralTarget = value; - return this; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - public List getDiagnosis() { - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - return this.diagnosis; - } - - public boolean hasDiagnosis() { - if (this.diagnosis == null) - return false; - for (DiagnosisComponent item : this.diagnosis) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) - */ - // syntactic sugar - public DiagnosisComponent addDiagnosis() { //3 - DiagnosisComponent t = new DiagnosisComponent(); - if (this.diagnosis == null) - this.diagnosis = new ArrayList(); - this.diagnosis.add(t); - return t; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - public List getCondition() { - if (this.condition == null) - this.condition = new ArrayList(); - return this.condition; - } - - public boolean hasCondition() { - if (this.condition == null) - return false; - for (Coding item : this.condition) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #condition} (List of patient conditions for which care is sought.) - */ - // syntactic sugar - public Coding addCondition() { //3 - Coding t = new Coding(); - if (this.condition == null) - this.condition = new ArrayList(); - this.condition.add(t); - return t; - } - - /** - * @return {@link #patient} (Patient Resource.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Patient Resource.) - */ - public VisionClaim setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public VisionClaim setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - public List getCoverage() { - if (this.coverage == null) - this.coverage = new ArrayList(); - return this.coverage; - } - - public boolean hasCoverage() { - if (this.coverage == null) - return false; - for (CoverageComponent item : this.coverage) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #coverage} (Financial instrument by which payment information for health care.) - */ - // syntactic sugar - public CoverageComponent addCoverage() { //3 - CoverageComponent t = new CoverageComponent(); - if (this.coverage == null) - this.coverage = new ArrayList(); - this.coverage.add(t); - return t; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public VisionClaim setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public VisionClaim setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - - /** - * @return {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public DateType getAccidentElement() { - if (this.accident == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.accident"); - else if (Configuration.doAutoCreate()) - this.accident = new DateType(); // bb - return this.accident; - } - - public boolean hasAccidentElement() { - return this.accident != null && !this.accident.isEmpty(); - } - - public boolean hasAccident() { - return this.accident != null && !this.accident.isEmpty(); - } - - /** - * @param value {@link #accident} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccident" gives direct access to the value - */ - public VisionClaim setAccidentElement(DateType value) { - this.accident = value; - return this; - } - - /** - * @return Date of an accident which these services are addressing. - */ - public Date getAccident() { - return this.accident == null ? null : this.accident.getValue(); - } - - /** - * @param value Date of an accident which these services are addressing. - */ - public VisionClaim setAccident(Date value) { - if (value == null) - this.accident = null; - else { - if (this.accident == null) - this.accident = new DateType(); - this.accident.setValue(value); - } - return this; - } - - /** - * @return {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public Coding getAccidentType() { - if (this.accidentType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create VisionClaim.accidentType"); - else if (Configuration.doAutoCreate()) - this.accidentType = new Coding(); // cc - return this.accidentType; - } - - public boolean hasAccidentType() { - return this.accidentType != null && !this.accidentType.isEmpty(); - } - - /** - * @param value {@link #accidentType} (Type of accident: work, auto, etc.) - */ - public VisionClaim setAccidentType(Coding value) { - this.accidentType = value; - return this; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - public List getInterventionException() { - if (this.interventionException == null) - this.interventionException = new ArrayList(); - return this.interventionException; - } - - public boolean hasInterventionException() { - if (this.interventionException == null) - return false; - for (Coding item : this.interventionException) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) - */ - // syntactic sugar - public Coding addInterventionException() { //3 - Coding t = new Coding(); - if (this.interventionException == null) - this.interventionException = new ArrayList(); - this.interventionException.add(t); - return t; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; - } - - public boolean hasItem() { - if (this.item == null) - return false; - for (ItemsComponent item : this.item) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #item} (First tier of goods and services.) - */ - // syntactic sugar - public ItemsComponent addItem() { //3 - ItemsComponent t = new ItemsComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); - return t; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - public List getAdditionalMaterials() { - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - return this.additionalMaterials; - } - - public boolean hasAdditionalMaterials() { - if (this.additionalMaterials == null) - return false; - for (Coding item : this.additionalMaterials) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) - */ - // syntactic sugar - public Coding addAdditionalMaterials() { //3 - Coding t = new Coding(); - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); - return t; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); - childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); - childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); - childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("prescription", "Reference(VisionPrescription)", "Prescription to support the dispensing of glasses or contact lenses.", 0, java.lang.Integer.MAX_VALUE, prescription)); - childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); - childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); - childrenList.add(new Property("condition", "Coding", "List of patient conditions for which care is sought.", 0, java.lang.Integer.MAX_VALUE, condition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); - childrenList.add(new Property("accident", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accident)); - childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); - childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); - } - - public VisionClaim copy() { - VisionClaim dst = new VisionClaim(); - copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.ruleset = ruleset == null ? null : ruleset.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); - dst.created = created == null ? null : created.copy(); - dst.target = target == null ? null : target.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.use = use == null ? null : use.copy(); - dst.priority = priority == null ? null : priority.copy(); - dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); - dst.enterer = enterer == null ? null : enterer.copy(); - dst.facility = facility == null ? null : facility.copy(); - dst.prescription = prescription == null ? null : prescription.copy(); - dst.payee = payee == null ? null : payee.copy(); - dst.referral = referral == null ? null : referral.copy(); - if (diagnosis != null) { - dst.diagnosis = new ArrayList(); - for (DiagnosisComponent i : diagnosis) - dst.diagnosis.add(i.copy()); - }; - if (condition != null) { - dst.condition = new ArrayList(); - for (Coding i : condition) - dst.condition.add(i.copy()); - }; - dst.patient = patient == null ? null : patient.copy(); - if (coverage != null) { - dst.coverage = new ArrayList(); - for (CoverageComponent i : coverage) - dst.coverage.add(i.copy()); - }; - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); - dst.accident = accident == null ? null : accident.copy(); - dst.accidentType = accidentType == null ? null : accidentType.copy(); - if (interventionException != null) { - dst.interventionException = new ArrayList(); - for (Coding i : interventionException) - dst.interventionException.add(i.copy()); - }; - if (item != null) { - dst.item = new ArrayList(); - for (ItemsComponent i : item) - dst.item.add(i.copy()); - }; - if (additionalMaterials != null) { - dst.additionalMaterials = new ArrayList(); - for (Coding i : additionalMaterials) - dst.additionalMaterials.add(i.copy()); - }; - return dst; - } - - protected VisionClaim typedCopy() { - return copy(); - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof VisionClaim)) - return false; - VisionClaim o = (VisionClaim) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) - && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(prescription, o.prescription, true) && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) - && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) - && compareDeep(coverage, o.coverage, true) && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) - && compareDeep(accident, o.accident, true) && compareDeep(accidentType, o.accidentType, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(item, o.item, true) && compareDeep(additionalMaterials, o.additionalMaterials, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof VisionClaim)) - return false; - VisionClaim o = (VisionClaim) other; - return compareValues(created, o.created, true) && compareValues(use, o.use, true) && compareValues(school, o.school, true) - && compareValues(accident, o.accident, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (prescription == null || prescription.isEmpty()) - && (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) - && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accident == null || accident.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (interventionException == null || interventionException.isEmpty()) - && (item == null || item.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - ; - } - - @Override - public ResourceType getResourceType() { - return ResourceType.VisionClaim; - } - - @SearchParamDefinition(name = "identifier", path = "VisionClaim.identifier", description = "The primary identifier of the financial resource", type = "token") - public static final String SP_IDENTIFIER = "identifier"; - @SearchParamDefinition(name = "use", path = "VisionClaim.use", description = "The kind of financial resource", type = "token") - public static final String SP_USE = "use"; - @SearchParamDefinition(name="patient", path="VisionClaim.patient", description="Patient", type="reference" ) - public static final String SP_PATIENT = "patient"; - @SearchParamDefinition(name="priority", path="VisionClaim.priority", description="Processing priority requested", type="token" ) - public static final String SP_PRIORITY = "priority"; - -} - diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserHl7OrgDstu2Test.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserHl7OrgDstu2Test.java index 7694b54b4b5..f7e5f3aae9f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserHl7OrgDstu2Test.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserHl7OrgDstu2Test.java @@ -1453,7 +1453,7 @@ public class XmlParserHl7OrgDstu2Test { @Test public void testSimpleResourceEncode() throws IOException, SAXException { - String xmlString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.json"), Charset.forName("UTF-8")); + String xmlString = IOUtils.toString(XmlParserHl7OrgDstu2Test.class.getResourceAsStream("/example-patient-general.json"), Charset.forName("UTF-8")); Patient obs = ourCtx.newJsonParser().parseResource(Patient.class, xmlString); List undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getExtension(); @@ -1466,7 +1466,7 @@ public class XmlParserHl7OrgDstu2Test { String encoded = jsonParser.encodeResourceToString(obs); ourLog.info(encoded); - String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.xml"), Charset.forName("UTF-8")); + String jsonString = IOUtils.toString(XmlParserHl7OrgDstu2Test.class.getResourceAsStream("/example-patient-general.xml"), Charset.forName("UTF-8")); String expected = (jsonString); String actual = (encoded.trim()); @@ -1480,7 +1480,7 @@ public class XmlParserHl7OrgDstu2Test { public void testSimpleResourceEncodeWithCustomType() throws IOException { FhirContext fhirCtx = new FhirContext(MyObservationWithExtensions.class); - String xmlString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.xml"), Charset.forName("UTF-8")); + String xmlString = IOUtils.toString(XmlParserHl7OrgDstu2Test.class.getResourceAsStream("/example-patient-general.xml"), Charset.forName("UTF-8")); MyObservationWithExtensions obs = fhirCtx.newXmlParser().parseResource(MyObservationWithExtensions.class, xmlString); assertEquals(0, obs.getExtension().size()); @@ -1496,7 +1496,7 @@ public class XmlParserHl7OrgDstu2Test { String encoded = jsonParser.encodeResourceToString(obs); ourLog.info(encoded); - String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.json"), Charset.forName("UTF-8")); + String jsonString = IOUtils.toString(XmlParserHl7OrgDstu2Test.class.getResourceAsStream("/example-patient-general.json"), Charset.forName("UTF-8")); JSON expected = JSONSerializer.toJSON(jsonString); JSON actual = JSONSerializer.toJSON(encoded.trim()); diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java new file mode 100644 index 00000000000..c7331cc8649 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu2/resource/BaseResource.java @@ -0,0 +1,175 @@ +package ca.uhn.fhir.model.dstu2.resource; + +/* + * #%L + * HAPI FHIR Structures - DSTU2 (FHIR v0.4.0) + * %% + * Copyright (C) 2014 - 2015 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import org.apache.commons.lang3.Validate; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.hl7.fhir.instance.model.api.IIdType; + +import ca.uhn.fhir.model.api.BaseElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.base.resource.ResourceMetadataMap; +import ca.uhn.fhir.model.dstu2.composite.ContainedDt; +import ca.uhn.fhir.model.dstu2.composite.NarrativeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.rest.gclient.StringClientParam; +import ca.uhn.fhir.util.ElementUtil; + +public abstract class BaseResource extends BaseElement implements IResource { + + /** + * Search parameter constant for _language + */ + @SearchParamDefinition(name="_language", path="", description="The language of the resource", type="string" ) + public static final String SP_RES_LANGUAGE = "_language"; + + + /** + * Search parameter constant for _id + */ + @SearchParamDefinition(name="_id", path="", description="The ID of the resource", type="string" ) + public static final String SP_RES_ID = "_id"; + + /** + * Fluent Client search parameter constant for _id + *

+ * Description: the _id of a resource
+ * Type: string
+ * Path: Resource._id
+ *

+ */ + public static final StringClientParam RES_ID = new StringClientParam(BaseResource.SP_RES_ID); + + + @Child(name = "contained", order = 2, min = 0, max = 1) + private ContainedDt myContained; + + private IdDt myId; + + @Child(name = "language", order = 0, min = 0, max = Child.MAX_UNLIMITED) + private CodeDt myLanguage; + + private ResourceMetadataMap myResourceMetadata; + + @Child(name = "text", order = 1, min = 0, max = 1) + private NarrativeDt myText; + + @Override + public ContainedDt getContained() { + if (myContained == null) { + myContained = new ContainedDt(); + } + return myContained; + } + + public IdDt getId() { + if (myId == null) { + myId = new IdDt(); + } + return myId; + } + + @Override + public CodeDt getLanguage() { + if (myLanguage == null) { + myLanguage = new CodeDt(); + } + return myLanguage; + } + + @Override + public ResourceMetadataMap getResourceMetadata() { + if (myResourceMetadata == null) { + myResourceMetadata = new ResourceMetadataMap(); + } + return myResourceMetadata; + } + + @Override + public NarrativeDt getText() { + if (myText == null) { + myText = new NarrativeDt(); + } + return myText; + } + + public void setContained(ContainedDt theContained) { + myContained = theContained; + } + + public void setId(IdDt theId) { + myId = theId; + } + + public BaseResource setId(IIdType theId) { + if (theId instanceof IdDt) { + myId = (IdDt) theId; + } else if (theId != null) { + myId = new IdDt(theId.getValue()); + } + return this; + } + + public BaseResource setId(String theId) { + if (theId == null) { + myId = null; + } else { + myId = new IdDt(theId); + } + return this; + } + + @Override + public void setLanguage(CodeDt theLanguage) { + myLanguage = theLanguage; + } + + @Override + public void setResourceMetadata(ResourceMetadataMap theMap) { + Validate.notNull(theMap, "The Map must not be null"); + myResourceMetadata = theMap; + } + + public void setText(NarrativeDt theText) { + myText = theText; + } + + @Override + public String toString() { + ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); + b.append("id", getId().toUnqualified()); + return b.toString(); + } + + /** + * Intended to be called by extending classes {@link #isEmpty()} implementations, returns true if all + * content in this superclass instance is empty per the semantics of {@link #isEmpty()}. + */ + @Override + protected boolean isBaseEmpty() { + return super.isBaseEmpty() && ElementUtil.isEmpty(myLanguage, myText, myId); + } + +} diff --git a/pom.xml b/pom.xml index e8127dcf0c9..e7caa7f53e4 100644 --- a/pom.xml +++ b/pom.xml @@ -861,7 +861,7 @@ hapi-tinder-test hapi-fhir-structures-dstu hapi-fhir-structures-dstu2 - + hapi-fhir-structures-hl7org-dstu2 hapi-fhir-jpaserver-base hapi-fhir-jpaserver-example restful-server-example