
ca.uhn.fhir.model.dstu.resource.Medication Maven / Gradle / Ivy
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 Medication Resource
* (Definition of a Medication)
*
*
* Definition:
* Primarily used for identification and definition of Medication, but also covers ingredients and packaging
*
*
*
* Requirements:
*
*
*
*
* Profile Definition:
* http://hl7.org/fhir/profiles/Medication
*
*
*/
@ResourceDef(name="Medication", profile="http://hl7.org/fhir/profiles/Medication", id="medication")
public class Medication extends ca.uhn.fhir.model.dstu.resource.BaseResource
implements IResource {
/**
* Search parameter constant for code
*
* Description:
* Type: token
* Path: Medication.code
*
*/
@SearchParamDefinition(name="code", path="Medication.code", description="", type="token" )
public static final String SP_CODE = "code";
/**
* Fluent Client search parameter constant for code
*
* Description:
* Type: token
* Path: Medication.code
*
*/
public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
/**
* Search parameter constant for name
*
* Description:
* Type: string
* Path: Medication.name
*
*/
@SearchParamDefinition(name="name", path="Medication.name", description="", type="string" )
public static final String SP_NAME = "name";
/**
* Fluent Client search parameter constant for name
*
* Description:
* Type: string
* Path: Medication.name
*
*/
public static final StringClientParam NAME = new StringClientParam(SP_NAME);
/**
* Search parameter constant for manufacturer
*
* Description:
* Type: reference
* Path: Medication.manufacturer
*
*/
@SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="", type="reference" )
public static final String SP_MANUFACTURER = "manufacturer";
/**
* Fluent Client search parameter constant for manufacturer
*
* Description:
* Type: reference
* Path: Medication.manufacturer
*
*/
public static final ReferenceClientParam MANUFACTURER = new ReferenceClientParam(SP_MANUFACTURER);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "Medication.manufacturer".
*/
public static final Include INCLUDE_MANUFACTURER = new Include("Medication.manufacturer");
/**
* Search parameter constant for form
*
* Description:
* Type: token
* Path: Medication.product.form
*
*/
@SearchParamDefinition(name="form", path="Medication.product.form", description="", type="token" )
public static final String SP_FORM = "form";
/**
* Fluent Client search parameter constant for form
*
* Description:
* Type: token
* Path: Medication.product.form
*
*/
public static final TokenClientParam FORM = new TokenClientParam(SP_FORM);
/**
* Search parameter constant for ingredient
*
* Description:
* Type: reference
* Path: Medication.product.ingredient.item
*
*/
@SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="", type="reference" )
public static final String SP_INGREDIENT = "ingredient";
/**
* Fluent Client search parameter constant for ingredient
*
* Description:
* Type: reference
* Path: Medication.product.ingredient.item
*
*/
public static final ReferenceClientParam INGREDIENT = new ReferenceClientParam(SP_INGREDIENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "Medication.product.ingredient.item".
*/
public static final Include INCLUDE_PRODUCT_INGREDIENT_ITEM = new Include("Medication.product.ingredient.item");
/**
* Search parameter constant for container
*
* Description:
* Type: token
* Path: Medication.package.container
*
*/
@SearchParamDefinition(name="container", path="Medication.package.container", description="", type="token" )
public static final String SP_CONTAINER = "container";
/**
* Fluent Client search parameter constant for container
*
* Description:
* Type: token
* Path: Medication.package.container
*
*/
public static final TokenClientParam CONTAINER = new TokenClientParam(SP_CONTAINER);
/**
* Search parameter constant for content
*
* Description:
* Type: reference
* Path: Medication.package.content.item
*
*/
@SearchParamDefinition(name="content", path="Medication.package.content.item", description="", type="reference" )
public static final String SP_CONTENT = "content";
/**
* Fluent Client search parameter constant for content
*
* Description:
* Type: reference
* Path: Medication.package.content.item
*
*/
public static final ReferenceClientParam CONTENT = new ReferenceClientParam(SP_CONTENT);
/**
* Constant for fluent queries to be used to add include statements. Specifies
* the path value of "Medication.package.content.item".
*/
public static final Include INCLUDE_PACKAGE_CONTENT_ITEM = new Include("Medication.package.content.item");
@Child(name="name", type=StringDt.class, order=0, min=0, max=1, summary=true, modifier=false)
@Description(
shortDefinition="Common / Commercial name",
formalDefinition="The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code"
)
private StringDt myName;
@Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=true, modifier=false)
@Description(
shortDefinition="Codes that identify this medication",
formalDefinition="A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes"
)
private CodeableConceptDt myCode;
@Child(name="isBrand", type=BooleanDt.class, order=2, min=0, max=1, summary=true, modifier=false)
@Description(
shortDefinition="True if a brand",
formalDefinition="Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)"
)
private BooleanDt myIsBrand;
@Child(name="manufacturer", order=3, min=0, max=1, summary=true, modifier=false, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@Description(
shortDefinition="Manufacturer of the item",
formalDefinition="Describes the details of the manufacturer"
)
private ResourceReferenceDt myManufacturer;
@Child(name="kind", type=CodeDt.class, order=4, min=0, max=1, summary=true, modifier=false)
@Description(
shortDefinition="product | package",
formalDefinition="Medications are either a single administrable product or a package that contains one or more products."
)
private BoundCodeDt myKind;
@Child(name="product", order=5, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="Administrable medication details",
formalDefinition="Information that only applies to products (not packages)"
)
private Product myProduct;
@Child(name="package", order=6, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="Details about packaged medications",
formalDefinition="Information that only applies to packages (not products)"
)
private Package myPackage;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage);
}
@Override
public List getAllPopulatedChildElementsOfType(Class theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myCode, myIsBrand, myManufacturer, myKind, myProduct, myPackage);
}
/**
* Gets the value(s) for name (Common / Commercial name).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
*
*/
public StringDt getName() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Gets the value(s) for name (Common / Commercial name).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
*
*/
public StringDt getNameElement() {
if (myName == null) {
myName = new StringDt();
}
return myName;
}
/**
* Sets the value(s) for name (Common / Commercial name)
*
*
* Definition:
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
*
*/
public Medication setName(StringDt theValue) {
myName = theValue;
return this;
}
/**
* Sets the value for name (Common / Commercial name)
*
*
* Definition:
* The common/commercial name of the medication absent information such as strength, form, etc. E.g. Acetaminophen, Tylenol 3, etc. The fully coordinated name is communicated as the display of Medication.code
*
*/
public Medication setName( String theString) {
myName = new StringDt(theString);
return this;
}
/**
* Gets the value(s) for code (Codes that identify this medication).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes
*
*/
public CodeableConceptDt getCode() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Gets the value(s) for code (Codes that identify this medication).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes
*
*/
public CodeableConceptDt getCodeElement() {
if (myCode == null) {
myCode = new CodeableConceptDt();
}
return myCode;
}
/**
* Sets the value(s) for code (Codes that identify this medication)
*
*
* Definition:
* A code (or set of codes) that identify this medication. Usage note: This could be a standard drug code such as a drug regulator code, RxNorm code, SNOMED CT code, etc. It could also be a local formulary code, optionally with translations to the standard drug codes
*
*/
public Medication setCode(CodeableConceptDt theValue) {
myCode = theValue;
return this;
}
/**
* Gets the value(s) for isBrand (True if a brand).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
*
*/
public BooleanDt getIsBrand() {
if (myIsBrand == null) {
myIsBrand = new BooleanDt();
}
return myIsBrand;
}
/**
* Gets the value(s) for isBrand (True if a brand).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
*
*/
public BooleanDt getIsBrandElement() {
if (myIsBrand == null) {
myIsBrand = new BooleanDt();
}
return myIsBrand;
}
/**
* Sets the value(s) for isBrand (True if a brand)
*
*
* Definition:
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
*
*/
public Medication setIsBrand(BooleanDt theValue) {
myIsBrand = theValue;
return this;
}
/**
* Sets the value for isBrand (True if a brand)
*
*
* Definition:
* Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
*
*/
public Medication setIsBrand( boolean theBoolean) {
myIsBrand = new BooleanDt(theBoolean);
return this;
}
/**
* Gets the value(s) for manufacturer (Manufacturer of the item).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Describes the details of the manufacturer
*
*/
public ResourceReferenceDt getManufacturer() {
if (myManufacturer == null) {
myManufacturer = new ResourceReferenceDt();
}
return myManufacturer;
}
/**
* Gets the value(s) for manufacturer (Manufacturer of the item).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Describes the details of the manufacturer
*
*/
public ResourceReferenceDt getManufacturerElement() {
if (myManufacturer == null) {
myManufacturer = new ResourceReferenceDt();
}
return myManufacturer;
}
/**
* Sets the value(s) for manufacturer (Manufacturer of the item)
*
*
* Definition:
* Describes the details of the manufacturer
*
*/
public Medication setManufacturer(ResourceReferenceDt theValue) {
myManufacturer = theValue;
return this;
}
/**
* Gets the value(s) for kind (product | package).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Medications are either a single administrable product or a package that contains one or more products.
*
*/
public BoundCodeDt getKind() {
if (myKind == null) {
myKind = new BoundCodeDt(MedicationKindEnum.VALUESET_BINDER);
}
return myKind;
}
/**
* Gets the value(s) for kind (product | package).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Medications are either a single administrable product or a package that contains one or more products.
*
*/
public BoundCodeDt getKindElement() {
if (myKind == null) {
myKind = new BoundCodeDt(MedicationKindEnum.VALUESET_BINDER);
}
return myKind;
}
/**
* Sets the value(s) for kind (product | package)
*
*
* Definition:
* Medications are either a single administrable product or a package that contains one or more products.
*
*/
public Medication setKind(BoundCodeDt theValue) {
myKind = theValue;
return this;
}
/**
* Sets the value(s) for kind (product | package)
*
*
* Definition:
* Medications are either a single administrable product or a package that contains one or more products.
*
*/
public Medication setKind(MedicationKindEnum theValue) {
getKind().setValueAsEnum(theValue);
return this;
}
/**
* Gets the value(s) for product (Administrable medication details).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Information that only applies to products (not packages)
*
*/
public Product getProduct() {
if (myProduct == null) {
myProduct = new Product();
}
return myProduct;
}
/**
* Gets the value(s) for product (Administrable medication details).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Information that only applies to products (not packages)
*
*/
public Product getProductElement() {
if (myProduct == null) {
myProduct = new Product();
}
return myProduct;
}
/**
* Sets the value(s) for product (Administrable medication details)
*
*
* Definition:
* Information that only applies to products (not packages)
*
*/
public Medication setProduct(Product theValue) {
myProduct = theValue;
return this;
}
/**
* Gets the value(s) for package (Details about packaged medications).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Information that only applies to packages (not products)
*
*/
public Package getPackage() {
if (myPackage == null) {
myPackage = new Package();
}
return myPackage;
}
/**
* Gets the value(s) for package (Details about packaged medications).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Information that only applies to packages (not products)
*
*/
public Package getPackageElement() {
if (myPackage == null) {
myPackage = new Package();
}
return myPackage;
}
/**
* Sets the value(s) for package (Details about packaged medications)
*
*
* Definition:
* Information that only applies to packages (not products)
*
*/
public Medication setPackage(Package theValue) {
myPackage = theValue;
return this;
}
/**
* Block class for child element: Medication.product (Administrable medication details)
*
*
* Definition:
* Information that only applies to products (not packages)
*
*/
@Block()
public static class Product
extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="powder | tablets | carton +",
formalDefinition="Describes the form of the item. Powder; tables; carton"
)
private CodeableConceptDt myForm;
@Child(name="ingredient", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)
@Description(
shortDefinition="Active or inactive ingredient",
formalDefinition="Identifies a particular constituent of interest in the product"
)
private java.util.List myIngredient;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myForm, myIngredient);
}
@Override
public List getAllPopulatedChildElementsOfType(Class theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myForm, myIngredient);
}
/**
* Gets the value(s) for form (powder | tablets | carton +).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Describes the form of the item. Powder; tables; carton
*
*/
public CodeableConceptDt getForm() {
if (myForm == null) {
myForm = new CodeableConceptDt();
}
return myForm;
}
/**
* Gets the value(s) for form (powder | tablets | carton +).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Describes the form of the item. Powder; tables; carton
*
*/
public CodeableConceptDt getFormElement() {
if (myForm == null) {
myForm = new CodeableConceptDt();
}
return myForm;
}
/**
* Sets the value(s) for form (powder | tablets | carton +)
*
*
* Definition:
* Describes the form of the item. Powder; tables; carton
*
*/
public Product setForm(CodeableConceptDt theValue) {
myForm = theValue;
return this;
}
/**
* Gets the value(s) for ingredient (Active or inactive ingredient).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
public java.util.List getIngredient() {
if (myIngredient == null) {
myIngredient = new java.util.ArrayList();
}
return myIngredient;
}
/**
* Gets the value(s) for ingredient (Active or inactive ingredient).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
public java.util.List getIngredientElement() {
if (myIngredient == null) {
myIngredient = new java.util.ArrayList();
}
return myIngredient;
}
/**
* Sets the value(s) for ingredient (Active or inactive ingredient)
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
public Product setIngredient(java.util.List theValue) {
myIngredient = theValue;
return this;
}
/**
* Adds and returns a new value for ingredient (Active or inactive ingredient)
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
public ProductIngredient addIngredient() {
ProductIngredient newType = new ProductIngredient();
getIngredient().add(newType);
return newType;
}
/**
* Gets the first repetition for ingredient (Active or inactive ingredient),
* creating it if it does not already exist.
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
public ProductIngredient getIngredientFirstRep() {
if (getIngredient().isEmpty()) {
return addIngredient();
}
return getIngredient().get(0);
}
}
/**
* Block class for child element: Medication.product.ingredient (Active or inactive ingredient)
*
*
* Definition:
* Identifies a particular constituent of interest in the product
*
*/
@Block()
public static class ProductIngredient
extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="item", order=0, min=1, max=1, summary=false, modifier=false, type={
ca.uhn.fhir.model.dstu.resource.Substance.class, ca.uhn.fhir.model.dstu.resource.Medication.class })
@Description(
shortDefinition="The product contained",
formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication"
)
private ResourceReferenceDt myItem;
@Child(name="amount", type=RatioDt.class, order=1, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="How much ingredient in product",
formalDefinition="Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet"
)
private RatioDt myAmount;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount);
}
@Override
public List getAllPopulatedChildElementsOfType(Class theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount);
}
/**
* Gets the value(s) for item (The product contained).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The actual ingredient - either a substance (simple ingredient) or another medication
*
*/
public ResourceReferenceDt getItem() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Gets the value(s) for item (The product contained).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The actual ingredient - either a substance (simple ingredient) or another medication
*
*/
public ResourceReferenceDt getItemElement() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Sets the value(s) for item (The product contained)
*
*
* Definition:
* The actual ingredient - either a substance (simple ingredient) or another medication
*
*/
public ProductIngredient setItem(ResourceReferenceDt theValue) {
myItem = theValue;
return this;
}
/**
* Gets the value(s) for amount (How much ingredient in product).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet
*
*/
public RatioDt getAmount() {
if (myAmount == null) {
myAmount = new RatioDt();
}
return myAmount;
}
/**
* Gets the value(s) for amount (How much ingredient in product).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet
*
*/
public RatioDt getAmountElement() {
if (myAmount == null) {
myAmount = new RatioDt();
}
return myAmount;
}
/**
* Sets the value(s) for amount (How much ingredient in product)
*
*
* Definition:
* Specifies how many (or how much) of the items there are in this Medication. E.g. 250 mg per tablet
*
*/
public ProductIngredient setAmount(RatioDt theValue) {
myAmount = theValue;
return this;
}
}
/**
* Block class for child element: Medication.package (Details about packaged medications)
*
*
* Definition:
* Information that only applies to packages (not products)
*
*/
@Block()
public static class Package
extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="container", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="E.g. box, vial, blister-pack",
formalDefinition="The kind of container that this package comes as"
)
private CodeableConceptDt myContainer;
@Child(name="content", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)
@Description(
shortDefinition="What is in the package?",
formalDefinition="A set of components that go to make up the described item."
)
private java.util.List myContent;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContainer, myContent);
}
@Override
public List getAllPopulatedChildElementsOfType(Class theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContainer, myContent);
}
/**
* Gets the value(s) for container (E.g. box, vial, blister-pack).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The kind of container that this package comes as
*
*/
public CodeableConceptDt getContainer() {
if (myContainer == null) {
myContainer = new CodeableConceptDt();
}
return myContainer;
}
/**
* Gets the value(s) for container (E.g. box, vial, blister-pack).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The kind of container that this package comes as
*
*/
public CodeableConceptDt getContainerElement() {
if (myContainer == null) {
myContainer = new CodeableConceptDt();
}
return myContainer;
}
/**
* Sets the value(s) for container (E.g. box, vial, blister-pack)
*
*
* Definition:
* The kind of container that this package comes as
*
*/
public Package setContainer(CodeableConceptDt theValue) {
myContainer = theValue;
return this;
}
/**
* Gets the value(s) for content (What is in the package?).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
public java.util.List getContent() {
if (myContent == null) {
myContent = new java.util.ArrayList();
}
return myContent;
}
/**
* Gets the value(s) for content (What is in the package?).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
public java.util.List getContentElement() {
if (myContent == null) {
myContent = new java.util.ArrayList();
}
return myContent;
}
/**
* Sets the value(s) for content (What is in the package?)
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
public Package setContent(java.util.List theValue) {
myContent = theValue;
return this;
}
/**
* Adds and returns a new value for content (What is in the package?)
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
public PackageContent addContent() {
PackageContent newType = new PackageContent();
getContent().add(newType);
return newType;
}
/**
* Gets the first repetition for content (What is in the package?),
* creating it if it does not already exist.
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
public PackageContent getContentFirstRep() {
if (getContent().isEmpty()) {
return addContent();
}
return getContent().get(0);
}
}
/**
* Block class for child element: Medication.package.content (What is in the package?)
*
*
* Definition:
* A set of components that go to make up the described item.
*
*/
@Block()
public static class PackageContent
extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="item", order=0, min=1, max=1, summary=false, modifier=false, type={
ca.uhn.fhir.model.dstu.resource.Medication.class })
@Description(
shortDefinition="A product in the package",
formalDefinition="Identifies one of the items in the package"
)
private ResourceReferenceDt myItem;
@Child(name="amount", type=QuantityDt.class, order=1, min=0, max=1, summary=false, modifier=false)
@Description(
shortDefinition="How many are in the package?",
formalDefinition="The amount of the product that is in the package"
)
private QuantityDt myAmount;
@Override
public boolean isEmpty() {
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount);
}
@Override
public List getAllPopulatedChildElementsOfType(Class theType) {
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount);
}
/**
* Gets the value(s) for item (A product in the package).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Identifies one of the items in the package
*
*/
public ResourceReferenceDt getItem() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Gets the value(s) for item (A product in the package).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* Identifies one of the items in the package
*
*/
public ResourceReferenceDt getItemElement() {
if (myItem == null) {
myItem = new ResourceReferenceDt();
}
return myItem;
}
/**
* Sets the value(s) for item (A product in the package)
*
*
* Definition:
* Identifies one of the items in the package
*
*/
public PackageContent setItem(ResourceReferenceDt theValue) {
myItem = theValue;
return this;
}
/**
* Gets the value(s) for amount (How many are in the package?).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public QuantityDt getAmount() {
if (myAmount == null) {
myAmount = new QuantityDt();
}
return myAmount;
}
/**
* Gets the value(s) for amount (How many are in the package?).
* creating it if it does
* not exist. Will not return null
.
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public QuantityDt getAmountElement() {
if (myAmount == null) {
myAmount = new QuantityDt();
}
return myAmount;
}
/**
* Sets the value(s) for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount(QuantityDt theValue) {
myAmount = theValue;
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
myAmount = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
myAmount = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
myAmount = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( double theValue) {
myAmount = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( long theValue) {
myAmount = new QuantityDt(theValue);
return this;
}
/**
* Sets the value for amount (How many are in the package?)
*
*
* Definition:
* The amount of the product that is in the package
*
*/
public PackageContent setAmount( QuantityCompararatorEnum theComparator, double theValue, String theUnits) {
myAmount = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
}
@Override
public String getResourceName() {
return "Medication";
}
public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
return ca.uhn.fhir.context.FhirVersionEnum.DSTU1;
}
}