All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.fhir.model.dstu2.composite.IdentifierDt Maven / Gradle / Ivy

The newest version!
















package ca.uhn.fhir.model.dstu2.composite;

import java.net.URI;
import java.math.BigDecimal;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import ca.uhn.fhir.model.api.*;
import ca.uhn.fhir.model.primitive.*;
import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.base.composite.*;

import ca.uhn.fhir.model.dstu2.valueset.AddressTypeEnum;
import ca.uhn.fhir.model.dstu2.valueset.AddressUseEnum;
import ca.uhn.fhir.model.dstu2.valueset.AggregationModeEnum;
import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.valueset.ConstraintSeverityEnum;
import ca.uhn.fhir.model.dstu2.valueset.ContactPointSystemEnum;
import ca.uhn.fhir.model.dstu2.valueset.ContactPointUseEnum;
import ca.uhn.fhir.model.dstu2.resource.Device;
import ca.uhn.fhir.model.dstu2.valueset.EventTimingEnum;
import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu2.valueset.NameUseEnum;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
import ca.uhn.fhir.model.dstu2.resource.Practitioner;
import ca.uhn.fhir.model.dstu2.valueset.PropertyRepresentationEnum;
import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum;
import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
import ca.uhn.fhir.model.dstu2.composite.RangeDt;
import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
import ca.uhn.fhir.model.dstu2.valueset.SignatureTypeCodesEnum;
import ca.uhn.fhir.model.dstu2.valueset.SlicingRulesEnum;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.dstu2.valueset.TimingAbbreviationEnum;
import ca.uhn.fhir.model.dstu2.valueset.UnitsOfTimeEnum;
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.DurationDt;
import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.MarkdownDt;
import ca.uhn.fhir.model.primitive.PositiveIntDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UnsignedIntDt;
import ca.uhn.fhir.model.primitive.UriDt;

/**
 * HAPI/FHIR IdentifierDt Datatype
 * ()
 *
 * 

* Definition: * A technical identifier - identifies some entity uniquely and unambiguously *

* *

* Requirements: * Need to be able to identify things with confidence and be sure that the identification is not subject to misinterpretation *

*/ @DatatypeDef(name="Identifier") public class IdentifierDt extends BaseIdentifierDt implements ICompositeDatatype { /** * Constructor */ public IdentifierDt() { // nothing } /** * Creates a new identifier with the given system and value */ @SimpleSetter public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) { setSystem(theSystem); setValue(theValue); } @Override public String toString() { return "IdentifierDt[" + getValue() + "]"; } @Child(name="use", type=CodeDt.class, order=0, min=0, max=1, summary=true, modifier=true) @Description( shortDefinition="", formalDefinition="The purpose of this identifier" ) @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/identifier-use") private BoundCodeDt myUse; @Child(name="type", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose" ) private BoundCodeableConceptDt myType; @Child(name="system", type=UriDt.class, order=2, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="Establishes the namespace in which set of possible id values is unique." ) private UriDt mySystem; @Child(name="value", type=StringDt.class, order=3, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system." ) private StringDt myValue; @Child(name="period", type=PeriodDt.class, order=4, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="Time period during which identifier is/was valid for use" ) private PeriodDt myPeriod; @Child(name="assigner", order=5, min=0, max=1, summary=true, modifier=false, type={ ca.uhn.fhir.model.dstu2.resource.Organization.class }) @Description( shortDefinition="", formalDefinition="Organization that issued/manages the identifier" ) private ResourceReferenceDt myAssigner; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myUse, myType, mySystem, myValue, myPeriod, myAssigner); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUse, myType, mySystem, myValue, myPeriod, myAssigner); } /** * Gets the value(s) for use (). * creating it if it does * not exist. Will not return null. * *

* Definition: * The purpose of this identifier *

*/ public BoundCodeDt getUseElement() { if (myUse == null) { myUse = new BoundCodeDt(IdentifierUseEnum.VALUESET_BINDER); } return myUse; } /** * Gets the value(s) for use (). * creating it if it does * not exist. This method may return null. * *

* Definition: * The purpose of this identifier *

*/ public String getUse() { return getUseElement().getValue(); } /** * Sets the value(s) for use () * *

* Definition: * The purpose of this identifier *

*/ public IdentifierDt setUse(BoundCodeDt theValue) { myUse = theValue; return this; } /** * Sets the value(s) for use () * *

* Definition: * The purpose of this identifier *

*/ public IdentifierDt setUse(IdentifierUseEnum theValue) { setUse(new BoundCodeDt(IdentifierUseEnum.VALUESET_BINDER, theValue)); /* getUseElement().setValueAsEnum(theValue); */ return this; } /** * Gets the value(s) for type (). * creating it if it does * not exist. Will not return null. * *

* Definition: * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose *

*/ public BoundCodeableConceptDt getType() { if (myType == null) { myType = new BoundCodeableConceptDt(IdentifierTypeCodesEnum.VALUESET_BINDER); } return myType; } /** * Sets the value(s) for type () * *

* Definition: * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose *

*/ public IdentifierDt setType(BoundCodeableConceptDt theValue) { myType = theValue; return this; } /** * Sets the value(s) for type () * *

* Definition: * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose *

*/ public IdentifierDt setType(IdentifierTypeCodesEnum theValue) { setType(new BoundCodeableConceptDt(IdentifierTypeCodesEnum.VALUESET_BINDER, theValue)); /* getType().setValueAsEnum(theValue); */ return this; } /** * Gets the value(s) for system (). * creating it if it does * not exist. Will not return null. * *

* Definition: * Establishes the namespace in which set of possible id values is unique. *

*/ public UriDt getSystemElement() { if (mySystem == null) { mySystem = new UriDt(); } return mySystem; } /** * Gets the value(s) for system (). * creating it if it does * not exist. This method may return null. * *

* Definition: * Establishes the namespace in which set of possible id values is unique. *

*/ public String getSystem() { return getSystemElement().getValue(); } /** * Sets the value(s) for system () * *

* Definition: * Establishes the namespace in which set of possible id values is unique. *

*/ public IdentifierDt setSystem(UriDt theValue) { mySystem = theValue; return this; } /** * Sets the value for system () * *

* Definition: * Establishes the namespace in which set of possible id values is unique. *

*/ public IdentifierDt setSystem( String theUri) { mySystem = new UriDt(theUri); return this; } /** * Gets the value(s) for value (). * creating it if it does * not exist. Will not return null. * *

* Definition: * The portion of the identifier typically displayed to the user and which is unique within the context of the system. *

*/ public StringDt getValueElement() { if (myValue == null) { myValue = new StringDt(); } return myValue; } /** * Gets the value(s) for value (). * creating it if it does * not exist. This method may return null. * *

* Definition: * The portion of the identifier typically displayed to the user and which is unique within the context of the system. *

*/ public String getValue() { return getValueElement().getValue(); } /** * Sets the value(s) for value () * *

* Definition: * The portion of the identifier typically displayed to the user and which is unique within the context of the system. *

*/ public IdentifierDt setValue(StringDt theValue) { myValue = theValue; return this; } /** * Sets the value for value () * *

* Definition: * The portion of the identifier typically displayed to the user and which is unique within the context of the system. *

*/ public IdentifierDt setValue( String theString) { myValue = new StringDt(theString); return this; } /** * Gets the value(s) for period (). * creating it if it does * not exist. Will not return null. * *

* Definition: * Time period during which identifier is/was valid for use *

*/ public PeriodDt getPeriod() { if (myPeriod == null) { myPeriod = new PeriodDt(); } return myPeriod; } /** * Sets the value(s) for period () * *

* Definition: * Time period during which identifier is/was valid for use *

*/ public IdentifierDt setPeriod(PeriodDt theValue) { myPeriod = theValue; return this; } /** * Gets the value(s) for assigner (). * creating it if it does * not exist. Will not return null. * *

* Definition: * Organization that issued/manages the identifier *

*/ public ResourceReferenceDt getAssigner() { if (myAssigner == null) { myAssigner = new ResourceReferenceDt(); } return myAssigner; } /** * Sets the value(s) for assigner () * *

* Definition: * Organization that issued/manages the identifier *

*/ public IdentifierDt setAssigner(ResourceReferenceDt theValue) { myAssigner = theValue; return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy