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

ca.uhn.fhir.model.dstu.resource.Substance Maven / Gradle / Ivy

There is a newer version: 7.6.1
Show newest version
















package ca.uhn.fhir.model.dstu.resource;


import java.util.*;
import ca.uhn.fhir.model.api.*;
import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.rest.gclient.*;

import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.AdmitSourceEnum;
import ca.uhn.fhir.model.dstu.resource.AdverseReaction;
import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.AlertStatusEnum;
import ca.uhn.fhir.model.dstu.resource.AllergyIntolerance;
import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum;
import ca.uhn.fhir.model.dstu.resource.Appointment;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.resource.Availability;
import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum;
import ca.uhn.fhir.model.dstu.resource.CarePlan;
import ca.uhn.fhir.model.dstu.valueset.CarePlanActivityCategoryEnum;
import ca.uhn.fhir.model.dstu.valueset.CarePlanActivityStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.CarePlanGoalStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.CarePlanStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.CausalityExpectationEnum;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.valueset.CompositionAttestationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.CompositionStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.ConceptMapEquivalenceEnum;
import ca.uhn.fhir.model.dstu.resource.Condition;
import ca.uhn.fhir.model.dstu.valueset.ConditionRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ConditionStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum;
import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.CriticalityEnum;
import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
import ca.uhn.fhir.model.dstu.resource.Device;
import ca.uhn.fhir.model.dstu.resource.DeviceObservationReport;
import ca.uhn.fhir.model.dstu.resource.DiagnosticOrder;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderPriorityEnum;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticOrderStatusEnum;
import ca.uhn.fhir.model.dstu.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum;
import ca.uhn.fhir.model.dstu.resource.DocumentManifest;
import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum;
import ca.uhn.fhir.model.dstu.resource.DocumentReference;
import ca.uhn.fhir.model.dstu.valueset.DocumentReferenceStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.DocumentRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.resource.Encounter;
import ca.uhn.fhir.model.dstu.valueset.EncounterClassEnum;
import ca.uhn.fhir.model.dstu.valueset.EncounterStateEnum;
import ca.uhn.fhir.model.dstu.valueset.EncounterTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ExposureTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum;
import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum;
import ca.uhn.fhir.model.dstu.resource.FamilyHistory;
import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum;
import ca.uhn.fhir.model.dstu.resource.GVFMeta;
import ca.uhn.fhir.model.dstu.resource.Group;
import ca.uhn.fhir.model.dstu.valueset.GroupTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.HierarchicalRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ImagingModalityEnum;
import ca.uhn.fhir.model.dstu.resource.ImagingStudy;
import ca.uhn.fhir.model.dstu.resource.Immunization;
import ca.uhn.fhir.model.dstu.valueset.ImmunizationReasonCodesEnum;
import ca.uhn.fhir.model.dstu.resource.ImmunizationRecommendation;
import ca.uhn.fhir.model.dstu.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.ImmunizationRecommendationStatusCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.ImmunizationRouteCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.InstanceAvailabilityEnum;
import ca.uhn.fhir.model.dstu.valueset.IssueSeverityEnum;
import ca.uhn.fhir.model.dstu.valueset.IssueTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ListModeEnum;
import ca.uhn.fhir.model.dstu.resource.Location;
import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum;
import ca.uhn.fhir.model.dstu.resource.Media;
import ca.uhn.fhir.model.dstu.valueset.MediaTypeEnum;
import ca.uhn.fhir.model.dstu.resource.Medication;
import ca.uhn.fhir.model.dstu.resource.MedicationAdministration;
import ca.uhn.fhir.model.dstu.valueset.MedicationAdministrationStatusEnum;
import ca.uhn.fhir.model.dstu.resource.MedicationDispense;
import ca.uhn.fhir.model.dstu.valueset.MedicationDispenseStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.MedicationKindEnum;
import ca.uhn.fhir.model.dstu.resource.MedicationPrescription;
import ca.uhn.fhir.model.dstu.valueset.MedicationPrescriptionStatusEnum;
import ca.uhn.fhir.model.dstu.resource.MedicationStatement;
import ca.uhn.fhir.model.dstu.valueset.MessageEventEnum;
import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum;
import ca.uhn.fhir.model.dstu.valueset.MessageTransportEnum;
import ca.uhn.fhir.model.dstu.resource.Microarray;
import ca.uhn.fhir.model.dstu.valueset.ModalityEnum;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.valueset.ObservationRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationReliabilityEnum;
import ca.uhn.fhir.model.dstu.valueset.ObservationStatusEnum;
import ca.uhn.fhir.model.dstu.resource.OperationOutcome;
import ca.uhn.fhir.model.dstu.resource.Order;
import ca.uhn.fhir.model.dstu.valueset.OrderOutcomeStatusEnum;
import ca.uhn.fhir.model.dstu.resource.Organization;
import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ParticipantTypeEnum;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.resource.Practitioner;
import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum;
import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum;
import ca.uhn.fhir.model.dstu.resource.Procedure;
import ca.uhn.fhir.model.dstu.valueset.ProcedureRelationshipTypeEnum;
import ca.uhn.fhir.model.dstu.resource.Profile;
import ca.uhn.fhir.model.dstu.valueset.PropertyRepresentationEnum;
import ca.uhn.fhir.model.dstu.valueset.ProvenanceEntityRoleEnum;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.valueset.QueryOutcomeEnum;
import ca.uhn.fhir.model.dstu.valueset.QuestionnaireGroupNameEnum;
import ca.uhn.fhir.model.dstu.valueset.QuestionnaireNameEnum;
import ca.uhn.fhir.model.dstu.valueset.QuestionnaireStatusEnum;
import ca.uhn.fhir.model.dstu.composite.RangeDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.valueset.ReactionSeverityEnum;
import ca.uhn.fhir.model.dstu.resource.RelatedPerson;
import ca.uhn.fhir.model.dstu.valueset.ResourceProfileStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ResponseTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum;
import ca.uhn.fhir.model.dstu.composite.SampledDataDt;
import ca.uhn.fhir.model.dstu.composite.ScheduleDt;
import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventActionEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventObjectLifecycleEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventObjectRoleEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventObjectTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventOutcomeEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventParticipantNetworkTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SecurityEventSourceTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SensitivityStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.SensitivityTypeEnum;
import ca.uhn.fhir.model.dstu.resource.SequencingAnalysis;
import ca.uhn.fhir.model.dstu.resource.SequencingLab;
import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
import ca.uhn.fhir.model.dstu.resource.Slot;
import ca.uhn.fhir.model.dstu.resource.Specimen;
import ca.uhn.fhir.model.dstu.valueset.SpecimenCollectionMethodEnum;
import ca.uhn.fhir.model.dstu.resource.Substance;
import ca.uhn.fhir.model.dstu.valueset.SupplyDispenseStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.SupplyItemTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SupplyStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.SupplyTypeEnum;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.dstu.resource.ValueSet;
import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum;
import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.composite.AgeDt;
import ca.uhn.fhir.model.dstu.composite.DurationDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.resource.Binary;
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.BoundCodeableConceptDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateDt;
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.IdrefDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.OidDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;


/**
 * HAPI/FHIR Substance Resource
 * (A homogeneous material with a definite composition)
 *
 * 

* Definition: * *

* *

* Requirements: * *

* *

* Profile Definition: * http://hl7.org/fhir/profiles/Substance *

* */ @ResourceDef(name="Substance", profile="http://hl7.org/fhir/profiles/Substance", id="substance") public class Substance extends ca.uhn.fhir.model.dstu.resource.BaseResource implements IResource { /** * Search parameter constant for type *

* Description: The type of the substance
* Type: token
* Path: Substance.type
*

*/ @SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance", type="token" ) public static final String SP_TYPE = "type"; /** * Fluent Client search parameter constant for type *

* Description: The type of the substance
* Type: token
* Path: Substance.type
*

*/ public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE); /** * Search parameter constant for identifier *

* Description:
* Type: token
* Path: Substance.instance.identifier
*

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

* Description:
* Type: token
* Path: Substance.instance.identifier
*

*/ public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER); /** * Search parameter constant for expiry *

* Description:
* Type: date
* Path: Substance.instance.expiry
*

*/ @SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="", type="date" ) public static final String SP_EXPIRY = "expiry"; /** * Fluent Client search parameter constant for expiry *

* Description:
* Type: date
* Path: Substance.instance.expiry
*

*/ public static final DateClientParam EXPIRY = new DateClientParam(SP_EXPIRY); /** * Search parameter constant for quantity *

* Description:
* Type: number
* Path: Substance.instance.quantity
*

*/ @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="", type="number" ) public static final String SP_QUANTITY = "quantity"; /** * Fluent Client search parameter constant for quantity *

* Description:
* Type: number
* Path: Substance.instance.quantity
*

*/ public static final NumberClientParam QUANTITY = new NumberClientParam(SP_QUANTITY); /** * Search parameter constant for substance *

* Description:
* Type: reference
* Path: Substance.ingredient.substance
*

*/ @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="", type="reference" ) public static final String SP_SUBSTANCE = "substance"; /** * Fluent Client search parameter constant for substance *

* Description:
* Type: reference
* Path: Substance.ingredient.substance
*

*/ public static final ReferenceClientParam SUBSTANCE = new ReferenceClientParam(SP_SUBSTANCE); /** * Constant for fluent queries to be used to add include statements. Specifies * the path value of "Substance.ingredient.substance". */ public static final Include INCLUDE_INGREDIENT_SUBSTANCE = new Include("Substance.ingredient.substance"); @Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=false, modifier=false) @Description( shortDefinition="What kind of substance this is", formalDefinition="A code (or set of codes) that identify this substance" ) private CodeableConceptDt myType; @Child(name="description", type=StringDt.class, order=1, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="Textual description of the substance, comments", formalDefinition="A description of the substance - its appearance, handling requirements, and other usage notes" ) private StringDt myDescription; @Child(name="instance", order=2, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="If this describes a specific package/container of the substance", formalDefinition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance" ) private Instance myInstance; @Child(name="ingredient", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) @Description( shortDefinition="Composition information about the substance", formalDefinition="A substance can be composed of other substances" ) private java.util.List myIngredient; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myDescription, myInstance, myIngredient); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myDescription, myInstance, myIngredient); } /** * Gets the value(s) for type (What kind of substance this is). * creating it if it does * not exist. Will not return null. * *

* Definition: * A code (or set of codes) that identify this substance *

*/ public CodeableConceptDt getType() { if (myType == null) { myType = new CodeableConceptDt(); } return myType; } /** * Gets the value(s) for type (What kind of substance this is). * creating it if it does * not exist. Will not return null. * *

* Definition: * A code (or set of codes) that identify this substance *

*/ public CodeableConceptDt getTypeElement() { if (myType == null) { myType = new CodeableConceptDt(); } return myType; } /** * Sets the value(s) for type (What kind of substance this is) * *

* Definition: * A code (or set of codes) that identify this substance *

*/ public Substance setType(CodeableConceptDt theValue) { myType = theValue; return this; } /** * Gets the value(s) for description (Textual description of the substance, comments). * creating it if it does * not exist. Will not return null. * *

* Definition: * A description of the substance - its appearance, handling requirements, and other usage notes *

*/ public StringDt getDescription() { if (myDescription == null) { myDescription = new StringDt(); } return myDescription; } /** * Gets the value(s) for description (Textual description of the substance, comments). * creating it if it does * not exist. Will not return null. * *

* Definition: * A description of the substance - its appearance, handling requirements, and other usage notes *

*/ public StringDt getDescriptionElement() { if (myDescription == null) { myDescription = new StringDt(); } return myDescription; } /** * Sets the value(s) for description (Textual description of the substance, comments) * *

* Definition: * A description of the substance - its appearance, handling requirements, and other usage notes *

*/ public Substance setDescription(StringDt theValue) { myDescription = theValue; return this; } /** * Sets the value for description (Textual description of the substance, comments) * *

* Definition: * A description of the substance - its appearance, handling requirements, and other usage notes *

*/ public Substance setDescription( String theString) { myDescription = new StringDt(theString); return this; } /** * Gets the value(s) for instance (If this describes a specific package/container of the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance *

*/ public Instance getInstance() { if (myInstance == null) { myInstance = new Instance(); } return myInstance; } /** * Gets the value(s) for instance (If this describes a specific package/container of the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance *

*/ public Instance getInstanceElement() { if (myInstance == null) { myInstance = new Instance(); } return myInstance; } /** * Sets the value(s) for instance (If this describes a specific package/container of the substance) * *

* Definition: * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance *

*/ public Substance setInstance(Instance theValue) { myInstance = theValue; return this; } /** * Gets the value(s) for ingredient (Composition information about the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * A substance can be composed of other substances *

*/ public java.util.List getIngredient() { if (myIngredient == null) { myIngredient = new java.util.ArrayList(); } return myIngredient; } /** * Gets the value(s) for ingredient (Composition information about the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * A substance can be composed of other substances *

*/ public java.util.List getIngredientElement() { if (myIngredient == null) { myIngredient = new java.util.ArrayList(); } return myIngredient; } /** * Sets the value(s) for ingredient (Composition information about the substance) * *

* Definition: * A substance can be composed of other substances *

*/ public Substance setIngredient(java.util.List theValue) { myIngredient = theValue; return this; } /** * Adds and returns a new value for ingredient (Composition information about the substance) * *

* Definition: * A substance can be composed of other substances *

*/ public Ingredient addIngredient() { Ingredient newType = new Ingredient(); getIngredient().add(newType); return newType; } /** * Gets the first repetition for ingredient (Composition information about the substance), * creating it if it does not already exist. * *

* Definition: * A substance can be composed of other substances *

*/ public Ingredient getIngredientFirstRep() { if (getIngredient().isEmpty()) { return addIngredient(); } return getIngredient().get(0); } /** * Block class for child element: Substance.instance (If this describes a specific package/container of the substance) * *

* Definition: * Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance *

*/ @Block() public static class Instance extends BaseIdentifiableElement implements IResourceBlock { @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="Identifier of the package/container", formalDefinition="Identifier associated with the package/container (usually a label affixed directly)" ) private IdentifierDt myIdentifier; @Child(name="expiry", type=DateTimeDt.class, order=1, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="When no longer valid to use", formalDefinition="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry." ) private DateTimeDt myExpiry; @Child(name="quantity", type=QuantityDt.class, order=2, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="Amount of substance in the package", formalDefinition="The amount of the substance" ) private QuantityDt myQuantity; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myExpiry, myQuantity); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myExpiry, myQuantity); } /** * Gets the value(s) for identifier (Identifier of the package/container). * creating it if it does * not exist. Will not return null. * *

* Definition: * Identifier associated with the package/container (usually a label affixed directly) *

*/ public IdentifierDt getIdentifier() { if (myIdentifier == null) { myIdentifier = new IdentifierDt(); } return myIdentifier; } /** * Gets the value(s) for identifier (Identifier of the package/container). * creating it if it does * not exist. Will not return null. * *

* Definition: * Identifier associated with the package/container (usually a label affixed directly) *

*/ public IdentifierDt getIdentifierElement() { if (myIdentifier == null) { myIdentifier = new IdentifierDt(); } return myIdentifier; } /** * Sets the value(s) for identifier (Identifier of the package/container) * *

* Definition: * Identifier associated with the package/container (usually a label affixed directly) *

*/ public Instance setIdentifier(IdentifierDt theValue) { myIdentifier = theValue; return this; } /** * Sets the value for identifier (Identifier of the package/container) * *

* Definition: * Identifier associated with the package/container (usually a label affixed directly) *

*/ public Instance setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) { myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel); return this; } /** * Sets the value for identifier (Identifier of the package/container) * *

* Definition: * Identifier associated with the package/container (usually a label affixed directly) *

*/ public Instance setIdentifier( String theSystem, String theValue) { myIdentifier = new IdentifierDt(theSystem, theValue); return this; } /** * Gets the value(s) for expiry (When no longer valid to use). * creating it if it does * not exist. Will not return null. * *

* Definition: * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. *

*/ public DateTimeDt getExpiry() { if (myExpiry == null) { myExpiry = new DateTimeDt(); } return myExpiry; } /** * Gets the value(s) for expiry (When no longer valid to use). * creating it if it does * not exist. Will not return null. * *

* Definition: * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. *

*/ public DateTimeDt getExpiryElement() { if (myExpiry == null) { myExpiry = new DateTimeDt(); } return myExpiry; } /** * Sets the value(s) for expiry (When no longer valid to use) * *

* Definition: * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. *

*/ public Instance setExpiry(DateTimeDt theValue) { myExpiry = theValue; return this; } /** * Sets the value for expiry (When no longer valid to use) * *

* Definition: * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. *

*/ public Instance setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) { myExpiry = new DateTimeDt(theDate, thePrecision); return this; } /** * Sets the value for expiry (When no longer valid to use) * *

* Definition: * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry. *

*/ public Instance setExpiryWithSecondsPrecision( Date theDate) { myExpiry = new DateTimeDt(theDate); return this; } /** * Gets the value(s) for quantity (Amount of substance in the package). * creating it if it does * not exist. Will not return null. * *

* Definition: * The amount of the substance *

*/ public QuantityDt getQuantity() { if (myQuantity == null) { myQuantity = new QuantityDt(); } return myQuantity; } /** * Gets the value(s) for quantity (Amount of substance in the package). * creating it if it does * not exist. Will not return null. * *

* Definition: * The amount of the substance *

*/ public QuantityDt getQuantityElement() { if (myQuantity == null) { myQuantity = new QuantityDt(); } return myQuantity; } /** * Sets the value(s) for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity(QuantityDt theValue) { myQuantity = theValue; return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { myQuantity = new QuantityDt(theComparator, theValue, theUnits); return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits); return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits); return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( double theValue) { myQuantity = new QuantityDt(theValue); return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( long theValue) { myQuantity = new QuantityDt(theValue); return this; } /** * Sets the value for quantity (Amount of substance in the package) * *

* Definition: * The amount of the substance *

*/ public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { myQuantity = new QuantityDt(theComparator, theValue, theUnits); return this; } } /** * Block class for child element: Substance.ingredient (Composition information about the substance) * *

* Definition: * A substance can be composed of other substances *

*/ @Block() public static class Ingredient extends BaseIdentifiableElement implements IResourceBlock { @Child(name="quantity", type=RatioDt.class, order=0, min=0, max=1, summary=false, modifier=false) @Description( shortDefinition="Optional amount (concentration)", formalDefinition="The amount of the ingredient in the substance - a concentration ratio" ) private RatioDt myQuantity; @Child(name="substance", order=1, min=1, max=1, summary=false, modifier=false, type={ ca.uhn.fhir.model.dstu.resource.Substance.class }) @Description( shortDefinition="A component of the substance", formalDefinition="Another substance that is a component of this substance" ) private ResourceReferenceDt mySubstance; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myQuantity, mySubstance); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myQuantity, mySubstance); } /** * Gets the value(s) for quantity (Optional amount (concentration)). * creating it if it does * not exist. Will not return null. * *

* Definition: * The amount of the ingredient in the substance - a concentration ratio *

*/ public RatioDt getQuantity() { if (myQuantity == null) { myQuantity = new RatioDt(); } return myQuantity; } /** * Gets the value(s) for quantity (Optional amount (concentration)). * creating it if it does * not exist. Will not return null. * *

* Definition: * The amount of the ingredient in the substance - a concentration ratio *

*/ public RatioDt getQuantityElement() { if (myQuantity == null) { myQuantity = new RatioDt(); } return myQuantity; } /** * Sets the value(s) for quantity (Optional amount (concentration)) * *

* Definition: * The amount of the ingredient in the substance - a concentration ratio *

*/ public Ingredient setQuantity(RatioDt theValue) { myQuantity = theValue; return this; } /** * Gets the value(s) for substance (A component of the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * Another substance that is a component of this substance *

*/ public ResourceReferenceDt getSubstance() { if (mySubstance == null) { mySubstance = new ResourceReferenceDt(); } return mySubstance; } /** * Gets the value(s) for substance (A component of the substance). * creating it if it does * not exist. Will not return null. * *

* Definition: * Another substance that is a component of this substance *

*/ public ResourceReferenceDt getSubstanceElement() { if (mySubstance == null) { mySubstance = new ResourceReferenceDt(); } return mySubstance; } /** * Sets the value(s) for substance (A component of the substance) * *

* Definition: * Another substance that is a component of this substance *

*/ public Ingredient setSubstance(ResourceReferenceDt theValue) { mySubstance = theValue; return this; } } @Override public String getResourceName() { return "Substance"; } public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() { return ca.uhn.fhir.context.FhirVersionEnum.DSTU1; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy