Package org.hl7.fhir.dstu2.model
Class MedicationOrder
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.model.DomainResource
-
- org.hl7.fhir.dstu2.model.MedicationOrder
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IAnyResource,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions,org.hl7.fhir.instance.model.api.IBaseResource,org.hl7.fhir.instance.model.api.IDomainResource
public class MedicationOrder extends DomainResource
An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedicationOrder.MedicationOrderDispenseRequestComponentstatic classMedicationOrder.MedicationOrderDosageInstructionComponentstatic classMedicationOrder.MedicationOrderStatusstatic classMedicationOrder.MedicationOrderStatusEnumFactorystatic classMedicationOrder.MedicationOrderSubstitutionComponent
-
Field Summary
Fields Modifier and Type Field Description protected DateTimeTypedateEndedThe date (and perhaps time) when the prescription was stopped.protected DateTimeTypedateWrittenThe date (and perhaps time) when the prescription was written.protected MedicationOrder.MedicationOrderDispenseRequestComponentdispenseRequestIndicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription).protected List<MedicationOrder.MedicationOrderDosageInstructionComponent>dosageInstructionIndicates how the medication is to be used by the patient.protected ReferenceencounterA link to a resource that identifies the particular occurrence of contact between patient and health care provider.protected EncounterencounterTargetThe actual object that is the target of the reference (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.)protected List<Identifier>identifierExternal identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created.protected TypemedicationIdentifies the medication being administered.protected StringTypenoteExtra information about the prescription that could not be conveyed by the other attributes.protected ReferencepatientA link to a resource representing the person to whom the medication will be given.protected PatientpatientTargetThe actual object that is the target of the reference (A link to a resource representing the person to whom the medication will be given.)protected ReferenceprescriberThe healthcare professional responsible for authorizing the prescription.protected PractitionerprescriberTargetThe actual object that is the target of the reference (The healthcare professional responsible for authorizing the prescription.)protected ReferencepriorPrescriptionA link to a resource representing an earlier order or prescription that this order supersedes.protected MedicationOrderpriorPrescriptionTargetThe actual object that is the target of the reference (A link to a resource representing an earlier order or prescription that this order supersedes.)protected TypereasonCan be the reason or the indication for writing the prescription.protected CodeableConceptreasonEndedThe reason why the prescription was stopped, if it was.static StringSP_CODEstatic StringSP_DATEWRITTENstatic StringSP_ENCOUNTERstatic StringSP_IDENTIFIERstatic StringSP_MEDICATIONstatic StringSP_PATIENTstatic StringSP_PRESCRIBERstatic StringSP_STATUSprotected Enumeration<MedicationOrder.MedicationOrderStatus>statusA code specifying the state of the order.protected MedicationOrder.MedicationOrderSubstitutionComponentsubstitutionIndicates whether or not substitution can or should be part of the dispense.-
Fields inherited from class org.hl7.fhir.dstu2.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.dstu2.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description MedicationOrder()MedicationOrder(Type medication)
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.DomainResource
addContained, addExtension, addExtension, addModifierExtension, addModifierExtension, copyValues, getContained, getExtension, getModifierExtension, getText, hasContained, hasExtension, hasModifierExtension, hasText, setText
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
-
-
-
-
Field Detail
-
identifier
protected List<Identifier> identifier
External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.
-
dateWritten
protected DateTimeType dateWritten
The date (and perhaps time) when the prescription was written.
-
status
protected Enumeration<MedicationOrder.MedicationOrderStatus> status
A code specifying the state of the order. Generally this will be active or completed state.
-
dateEnded
protected DateTimeType dateEnded
The date (and perhaps time) when the prescription was stopped.
-
reasonEnded
protected CodeableConcept reasonEnded
The reason why the prescription was stopped, if it was.
-
patient
protected Reference patient
A link to a resource representing the person to whom the medication will be given.
-
patientTarget
protected Patient patientTarget
The actual object that is the target of the reference (A link to a resource representing the person to whom the medication will be given.)
-
prescriber
protected Reference prescriber
The healthcare professional responsible for authorizing the prescription.
-
prescriberTarget
protected Practitioner prescriberTarget
The actual object that is the target of the reference (The healthcare professional responsible for authorizing the prescription.)
-
encounter
protected Reference encounter
A link to a resource that identifies the particular occurrence of contact between patient and health care provider.
-
encounterTarget
protected Encounter encounterTarget
The actual object that is the target of the reference (A link to a resource that identifies the particular occurrence of contact between patient and health care provider.)
-
note
protected StringType note
Extra information about the prescription that could not be conveyed by the other attributes.
-
medication
protected Type medication
Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.
-
dosageInstruction
protected List<MedicationOrder.MedicationOrderDosageInstructionComponent> dosageInstruction
Indicates how the medication is to be used by the patient.
-
dispenseRequest
protected MedicationOrder.MedicationOrderDispenseRequestComponent dispenseRequest
Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.
-
substitution
protected MedicationOrder.MedicationOrderSubstitutionComponent substitution
Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.
-
priorPrescription
protected Reference priorPrescription
A link to a resource representing an earlier order or prescription that this order supersedes.
-
priorPrescriptionTarget
protected MedicationOrder priorPrescriptionTarget
The actual object that is the target of the reference (A link to a resource representing an earlier order or prescription that this order supersedes.)
-
SP_PRESCRIBER
public static final String SP_PRESCRIBER
- See Also:
- Constant Field Values
-
SP_IDENTIFIER
public static final String SP_IDENTIFIER
- See Also:
- Constant Field Values
-
SP_CODE
public static final String SP_CODE
- See Also:
- Constant Field Values
-
SP_PATIENT
public static final String SP_PATIENT
- See Also:
- Constant Field Values
-
SP_DATEWRITTEN
public static final String SP_DATEWRITTEN
- See Also:
- Constant Field Values
-
SP_MEDICATION
public static final String SP_MEDICATION
- See Also:
- Constant Field Values
-
SP_ENCOUNTER
public static final String SP_ENCOUNTER
- See Also:
- Constant Field Values
-
SP_STATUS
public static final String SP_STATUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MedicationOrder
public MedicationOrder()
-
MedicationOrder
public MedicationOrder(Type medication)
-
-
Method Detail
-
getIdentifier
public List<Identifier> getIdentifier()
- Returns:
identifier(External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.)
-
hasIdentifier
public boolean hasIdentifier()
-
addIdentifier
public Identifier addIdentifier()
- Returns:
identifier(External identifier - one that would be used by another non-FHIR system - for example a re-imbursement system might issue its own id for each prescription that is created. This is particularly important where FHIR only provides part of an entire workflow process where records have to be tracked through an entire system.)
-
addIdentifier
public MedicationOrder addIdentifier(Identifier t)
-
getDateWrittenElement
public DateTimeType getDateWrittenElement()
- Returns:
dateWritten(The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value
-
hasDateWrittenElement
public boolean hasDateWrittenElement()
-
hasDateWritten
public boolean hasDateWritten()
-
setDateWrittenElement
public MedicationOrder setDateWrittenElement(DateTimeType value)
- Parameters:
value-dateWritten(The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value
-
getDateWritten
public Date getDateWritten()
- Returns:
- The date (and perhaps time) when the prescription was written.
-
setDateWritten
public MedicationOrder setDateWritten(Date value)
- Parameters:
value- The date (and perhaps time) when the prescription was written.
-
getStatusElement
public Enumeration<MedicationOrder.MedicationOrderStatus> getStatusElement()
- Returns:
status(A code specifying the state of the order. Generally this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
hasStatusElement
public boolean hasStatusElement()
-
hasStatus
public boolean hasStatus()
-
setStatusElement
public MedicationOrder setStatusElement(Enumeration<MedicationOrder.MedicationOrderStatus> value)
- Parameters:
value-status(A code specifying the state of the order. Generally this will be active or completed state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
getStatus
public MedicationOrder.MedicationOrderStatus getStatus()
- Returns:
- A code specifying the state of the order. Generally this will be active or completed state.
-
setStatus
public MedicationOrder setStatus(MedicationOrder.MedicationOrderStatus value)
- Parameters:
value- A code specifying the state of the order. Generally this will be active or completed state.
-
getDateEndedElement
public DateTimeType getDateEndedElement()
- Returns:
dateEnded(The date (and perhaps time) when the prescription was stopped.). This is the underlying object with id, value and extensions. The accessor "getDateEnded" gives direct access to the value
-
hasDateEndedElement
public boolean hasDateEndedElement()
-
hasDateEnded
public boolean hasDateEnded()
-
setDateEndedElement
public MedicationOrder setDateEndedElement(DateTimeType value)
- Parameters:
value-dateEnded(The date (and perhaps time) when the prescription was stopped.). This is the underlying object with id, value and extensions. The accessor "getDateEnded" gives direct access to the value
-
getDateEnded
public Date getDateEnded()
- Returns:
- The date (and perhaps time) when the prescription was stopped.
-
setDateEnded
public MedicationOrder setDateEnded(Date value)
- Parameters:
value- The date (and perhaps time) when the prescription was stopped.
-
getReasonEnded
public CodeableConcept getReasonEnded()
- Returns:
reasonEnded(The reason why the prescription was stopped, if it was.)
-
hasReasonEnded
public boolean hasReasonEnded()
-
setReasonEnded
public MedicationOrder setReasonEnded(CodeableConcept value)
- Parameters:
value-reasonEnded(The reason why the prescription was stopped, if it was.)
-
getPatient
public Reference getPatient()
- Returns:
patient(A link to a resource representing the person to whom the medication will be given.)
-
hasPatient
public boolean hasPatient()
-
setPatient
public MedicationOrder setPatient(Reference value)
- Parameters:
value-patient(A link to a resource representing the person to whom the medication will be given.)
-
getPatientTarget
public Patient getPatientTarget()
- Returns:
patientThe 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 link to a resource representing the person to whom the medication will be given.)
-
setPatientTarget
public MedicationOrder setPatientTarget(Patient value)
- Parameters:
value-patientThe 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 link to a resource representing the person to whom the medication will be given.)
-
getPrescriber
public Reference getPrescriber()
- Returns:
prescriber(The healthcare professional responsible for authorizing the prescription.)
-
hasPrescriber
public boolean hasPrescriber()
-
setPrescriber
public MedicationOrder setPrescriber(Reference value)
- Parameters:
value-prescriber(The healthcare professional responsible for authorizing the prescription.)
-
getPrescriberTarget
public Practitioner getPrescriberTarget()
- Returns:
prescriberThe 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 healthcare professional responsible for authorizing the prescription.)
-
setPrescriberTarget
public MedicationOrder setPrescriberTarget(Practitioner value)
- Parameters:
value-prescriberThe 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 healthcare professional responsible for authorizing the prescription.)
-
getEncounter
public Reference getEncounter()
- Returns:
encounter(A link to a resource that identifies the particular occurrence of contact between patient and health care provider.)
-
hasEncounter
public boolean hasEncounter()
-
setEncounter
public MedicationOrder setEncounter(Reference value)
- Parameters:
value-encounter(A link to a resource that identifies the particular occurrence of contact between patient and health care provider.)
-
getEncounterTarget
public Encounter getEncounterTarget()
- Returns:
encounterThe 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 link to a resource that identifies the particular occurrence of contact between patient and health care provider.)
-
setEncounterTarget
public MedicationOrder setEncounterTarget(Encounter value)
- Parameters:
value-encounterThe 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 link to a resource that identifies the particular occurrence of contact between patient and health care provider.)
-
getReason
public Type getReason()
- Returns:
reason(Can be the reason or the indication for writing the prescription.)
-
getReasonCodeableConcept
public CodeableConcept getReasonCodeableConcept() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
reason(Can be the reason or the indication for writing the prescription.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasReasonCodeableConcept
public boolean hasReasonCodeableConcept()
-
getReasonReference
public Reference getReasonReference() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
reason(Can be the reason or the indication for writing the prescription.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasReasonReference
public boolean hasReasonReference()
-
hasReason
public boolean hasReason()
-
setReason
public MedicationOrder setReason(Type value)
- Parameters:
value-reason(Can be the reason or the indication for writing the prescription.)
-
getNoteElement
public StringType getNoteElement()
- Returns:
note(Extra information about the prescription that could not be conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
-
hasNoteElement
public boolean hasNoteElement()
-
hasNote
public boolean hasNote()
-
setNoteElement
public MedicationOrder setNoteElement(StringType value)
- Parameters:
value-note(Extra information about the prescription that could not be conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
-
getNote
public String getNote()
- Returns:
- Extra information about the prescription that could not be conveyed by the other attributes.
-
setNote
public MedicationOrder setNote(String value)
- Parameters:
value- Extra information about the prescription that could not be conveyed by the other attributes.
-
getMedication
public Type getMedication()
- Returns:
medication(Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
-
getMedicationCodeableConcept
public CodeableConcept getMedicationCodeableConcept() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
medication(Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasMedicationCodeableConcept
public boolean hasMedicationCodeableConcept()
-
getMedicationReference
public Reference getMedicationReference() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
medication(Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasMedicationReference
public boolean hasMedicationReference()
-
hasMedication
public boolean hasMedication()
-
setMedication
public MedicationOrder setMedication(Type value)
- Parameters:
value-medication(Identifies the medication being administered. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications.)
-
getDosageInstruction
public List<MedicationOrder.MedicationOrderDosageInstructionComponent> getDosageInstruction()
- Returns:
dosageInstruction(Indicates how the medication is to be used by the patient.)
-
hasDosageInstruction
public boolean hasDosageInstruction()
-
addDosageInstruction
public MedicationOrder.MedicationOrderDosageInstructionComponent addDosageInstruction()
- Returns:
dosageInstruction(Indicates how the medication is to be used by the patient.)
-
addDosageInstruction
public MedicationOrder addDosageInstruction(MedicationOrder.MedicationOrderDosageInstructionComponent t)
-
getDispenseRequest
public MedicationOrder.MedicationOrderDispenseRequestComponent getDispenseRequest()
- Returns:
dispenseRequest(Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.)
-
hasDispenseRequest
public boolean hasDispenseRequest()
-
setDispenseRequest
public MedicationOrder setDispenseRequest(MedicationOrder.MedicationOrderDispenseRequestComponent value)
- Parameters:
value-dispenseRequest(Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.)
-
getSubstitution
public MedicationOrder.MedicationOrderSubstitutionComponent getSubstitution()
- Returns:
substitution(Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.)
-
hasSubstitution
public boolean hasSubstitution()
-
setSubstitution
public MedicationOrder setSubstitution(MedicationOrder.MedicationOrderSubstitutionComponent value)
- Parameters:
value-substitution(Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.)
-
getPriorPrescription
public Reference getPriorPrescription()
- Returns:
priorPrescription(A link to a resource representing an earlier order or prescription that this order supersedes.)
-
hasPriorPrescription
public boolean hasPriorPrescription()
-
setPriorPrescription
public MedicationOrder setPriorPrescription(Reference value)
- Parameters:
value-priorPrescription(A link to a resource representing an earlier order or prescription that this order supersedes.)
-
getPriorPrescriptionTarget
public MedicationOrder getPriorPrescriptionTarget()
- Returns:
priorPrescriptionThe 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 link to a resource representing an earlier order or prescription that this order supersedes.)
-
setPriorPrescriptionTarget
public MedicationOrder setPriorPrescriptionTarget(MedicationOrder value)
- Parameters:
value-priorPrescriptionThe 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 link to a resource representing an earlier order or prescription that this order supersedes.)
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classDomainResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
addChildin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
fhirType
public String fhirType()
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
fhirTypein classDomainResource
-
copy
public MedicationOrder copy()
- Specified by:
copyin classDomainResource
-
typedCopy
protected MedicationOrder typedCopy()
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classDomainResource
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classDomainResource
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classDomainResource
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-