Class MedicationOrder

java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.dstu2.resource.BaseResource
ca.uhn.fhir.model.dstu2.resource.MedicationOrder
All Implemented Interfaces:
ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

public class MedicationOrder extends BaseResource implements ca.uhn.fhir.model.api.IResource
HAPI/FHIR MedicationOrder Resource (clinical.medication)

Definition: 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.

Requirements:

Profile Definition: http://hl7.org/fhir/profiles/MedicationOrder

See Also:
  • Field Details

    • SP_DATEWRITTEN

      public static final String SP_DATEWRITTEN
      Search parameter constant for datewritten

      Description: Return prescriptions written on this date
      Type: date
      Path: MedicationOrder.dateWritten

      See Also:
    • DATEWRITTEN

      public static final ca.uhn.fhir.rest.gclient.DateClientParam DATEWRITTEN
      Fluent Client search parameter constant for datewritten

      Description: Return prescriptions written on this date
      Type: date
      Path: MedicationOrder.dateWritten

    • SP_ENCOUNTER

      public static final String SP_ENCOUNTER
      Search parameter constant for encounter

      Description: Return prescriptions with this encounter identifier
      Type: reference
      Path: MedicationOrder.encounter

      See Also:
    • ENCOUNTER

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER
      Fluent Client search parameter constant for encounter

      Description: Return prescriptions with this encounter identifier
      Type: reference
      Path: MedicationOrder.encounter

    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter constant for identifier

      Description: Return prescriptions with this external identifier
      Type: token
      Path: MedicationOrder.identifier

      See Also:
    • IDENTIFIER

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
      Fluent Client search parameter constant for identifier

      Description: Return prescriptions with this external identifier
      Type: token
      Path: MedicationOrder.identifier

    • SP_MEDICATION

      public static final String SP_MEDICATION
      Search parameter constant for medication

      Description: Return administrations of this medication reference
      Type: reference
      Path: MedicationOrder.medicationReference

      See Also:
    • MEDICATION

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEDICATION
      Fluent Client search parameter constant for medication

      Description: Return administrations of this medication reference
      Type: reference
      Path: MedicationOrder.medicationReference

    • SP_CODE

      public static final String SP_CODE
      Search parameter constant for code

      Description: Return administrations of this medication code
      Type: token
      Path: MedicationOrder.medicationCodeableConcept

      See Also:
    • CODE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE
      Fluent Client search parameter constant for code

      Description: Return administrations of this medication code
      Type: token
      Path: MedicationOrder.medicationCodeableConcept

    • SP_PATIENT

      public static final String SP_PATIENT
      Search parameter constant for patient

      Description: The identity of a patient to list orders for
      Type: reference
      Path: MedicationOrder.patient

      See Also:
    • PATIENT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT
      Fluent Client search parameter constant for patient

      Description: The identity of a patient to list orders for
      Type: reference
      Path: MedicationOrder.patient

    • SP_STATUS

      public static final String SP_STATUS
      Search parameter constant for status

      Description: Status of the prescription
      Type: token
      Path: MedicationOrder.status

      See Also:
    • STATUS

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS
      Fluent Client search parameter constant for status

      Description: Status of the prescription
      Type: token
      Path: MedicationOrder.status

    • SP_PRESCRIBER

      public static final String SP_PRESCRIBER
      Search parameter constant for prescriber

      Description:
      Type: reference
      Path: MedicationOrder.prescriber

      See Also:
    • PRESCRIBER

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRESCRIBER
      Fluent Client search parameter constant for prescriber

      Description:
      Type: reference
      Path: MedicationOrder.prescriber

    • INCLUDE_ENCOUNTER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationOrder:encounter".
    • INCLUDE_MEDICATION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_MEDICATION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationOrder:medication".
    • INCLUDE_PATIENT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationOrder:patient".
    • INCLUDE_PRESCRIBER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PRESCRIBER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationOrder:prescriber".
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
    • getAllPopulatedChildElementsOfType

      public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType)
      Specified by:
      getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
    • getIdentifier

      Gets the value(s) for identifier (id). creating it if it does not exist. Will not return null.

      Definition: 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.

    • setIdentifier

      Sets the value(s) for identifier (id)

      Definition: 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

      Adds and returns a new value for identifier (id)

      Definition: 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

      Adds a given new value for identifier (id)

      Definition: 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.

      Parameters:
      theValue - The identifier to add (must not be null)
    • getIdentifierFirstRep

      Gets the first repetition for identifier (id), creating it if it does not already exist.

      Definition: 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.

    • getDateWrittenElement

      public ca.uhn.fhir.model.primitive.DateTimeDt getDateWrittenElement()
      Gets the value(s) for dateWritten (when.recorded). creating it if it does not exist. Will not return null.

      Definition: The date (and perhaps time) when the prescription was written

    • getDateWritten

      public Date getDateWritten()
      Gets the value(s) for dateWritten (when.recorded). creating it if it does not exist. This method may return null.

      Definition: The date (and perhaps time) when the prescription was written

    • setDateWritten

      public MedicationOrder setDateWritten(ca.uhn.fhir.model.primitive.DateTimeDt theValue)
      Sets the value(s) for dateWritten (when.recorded)

      Definition: The date (and perhaps time) when the prescription was written

    • setDateWrittenWithSecondsPrecision

      Sets the value for dateWritten (when.recorded)

      Definition: The date (and perhaps time) when the prescription was written

    • setDateWritten

      public MedicationOrder setDateWritten(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
      Sets the value for dateWritten (when.recorded)

      Definition: The date (and perhaps time) when the prescription was written

    • getStatusElement

      public ca.uhn.fhir.model.primitive.BoundCodeDt<MedicationOrderStatusEnum> getStatusElement()
      Gets the value(s) for status (status). creating it if it does not exist. Will not return null.

      Definition: A code specifying the state of the order. Generally this will be active or completed state

    • getStatus

      public String getStatus()
      Gets the value(s) for status (status). creating it if it does not exist. This method may return null.

      Definition: A code specifying the state of the order. Generally this will be active or completed state

    • setStatus

      public MedicationOrder setStatus(ca.uhn.fhir.model.primitive.BoundCodeDt<MedicationOrderStatusEnum> theValue)
      Sets the value(s) for status (status)

      Definition: A code specifying the state of the order. Generally this will be active or completed state

    • setStatus

      Sets the value(s) for status (status)

      Definition: A code specifying the state of the order. Generally this will be active or completed state

    • getDateEndedElement

      public ca.uhn.fhir.model.primitive.DateTimeDt getDateEndedElement()
      Gets the value(s) for dateEnded (). creating it if it does not exist. Will not return null.

      Definition: The date (and perhaps time) when the prescription was stopped

    • getDateEnded

      public Date getDateEnded()
      Gets the value(s) for dateEnded (). creating it if it does not exist. This method may return null.

      Definition: The date (and perhaps time) when the prescription was stopped

    • setDateEnded

      public MedicationOrder setDateEnded(ca.uhn.fhir.model.primitive.DateTimeDt theValue)
      Sets the value(s) for dateEnded ()

      Definition: The date (and perhaps time) when the prescription was stopped

    • setDateEndedWithSecondsPrecision

      Sets the value for dateEnded ()

      Definition: The date (and perhaps time) when the prescription was stopped

    • setDateEnded

      public MedicationOrder setDateEnded(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
      Sets the value for dateEnded ()

      Definition: The date (and perhaps time) when the prescription was stopped

    • getReasonEnded

      Gets the value(s) for reasonEnded (). creating it if it does not exist. Will not return null.

      Definition: The reason why the prescription was stopped, if it was

    • setReasonEnded

      Sets the value(s) for reasonEnded ()

      Definition: The reason why the prescription was stopped, if it was

    • getPatient

      Gets the value(s) for patient (who.focus). creating it if it does not exist. Will not return null.

      Definition: A link to a resource representing the person to whom the medication will be given.

    • setPatient

      Sets the value(s) for patient (who.focus)

      Definition: A link to a resource representing the person to whom the medication will be given.

    • getPrescriber

      Gets the value(s) for prescriber (who.actor). creating it if it does not exist. Will not return null.

      Definition: The healthcare professional responsible for authorizing the prescription

    • setPrescriber

      Sets the value(s) for prescriber (who.actor)

      Definition: The healthcare professional responsible for authorizing the prescription

    • getEncounter

      Gets the value(s) for encounter (context). creating it if it does not exist. Will not return null.

      Definition: A link to a resource that identifies the particular occurrence of contact between patient and health care provider.

    • setEncounter

      Sets the value(s) for encounter (context)

      Definition: A link to a resource that identifies the particular occurrence of contact between patient and health care provider.

    • getReason

      public ca.uhn.fhir.model.api.IDatatype getReason()
      Gets the value(s) for reason[x] (why). creating it if it does not exist. Will not return null.

      Definition: Can be the reason or the indication for writing the prescription.

    • setReason

      public MedicationOrder setReason(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for reason[x] (why)

      Definition: Can be the reason or the indication for writing the prescription.

    • getNoteElement

      public ca.uhn.fhir.model.primitive.StringDt getNoteElement()
      Gets the value(s) for note (). creating it if it does not exist. Will not return null.

      Definition: Extra information about the prescription that could not be conveyed by the other attributes.

    • getNote

      public String getNote()
      Gets the value(s) for note (). creating it if it does not exist. This method may return null.

      Definition: Extra information about the prescription that could not be conveyed by the other attributes.

    • setNote

      public MedicationOrder setNote(ca.uhn.fhir.model.primitive.StringDt theValue)
      Sets the value(s) for note ()

      Definition: Extra information about the prescription that could not be conveyed by the other attributes.

    • setNote

      public MedicationOrder setNote(String theString)
      Sets the value for note ()

      Definition: Extra information about the prescription that could not be conveyed by the other attributes.

    • getMedication

      public ca.uhn.fhir.model.api.IDatatype getMedication()
      Gets the value(s) for medication[x] (what). creating it if it does not exist. Will not return null.

      Definition: 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.

    • setMedication

      public MedicationOrder setMedication(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for medication[x] (what)

      Definition: 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

      Gets the value(s) for dosageInstruction (). creating it if it does not exist. Will not return null.

      Definition: Indicates how the medication is to be used by the patient

    • setDosageInstruction

      Sets the value(s) for dosageInstruction ()

      Definition: Indicates how the medication is to be used by the patient

    • addDosageInstruction

      Adds and returns a new value for dosageInstruction ()

      Definition: Indicates how the medication is to be used by the patient

    • addDosageInstruction

      Adds a given new value for dosageInstruction ()

      Definition: Indicates how the medication is to be used by the patient

      Parameters:
      theValue - The dosageInstruction to add (must not be null)
    • getDosageInstructionFirstRep

      Gets the first repetition for dosageInstruction (), creating it if it does not already exist.

      Definition: Indicates how the medication is to be used by the patient

    • getDispenseRequest

      Gets the value(s) for dispenseRequest (). creating it if it does not exist. Will not return null.

      Definition: 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.

    • setDispenseRequest

      Sets the value(s) for dispenseRequest ()

      Definition: 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

      Gets the value(s) for substitution (). creating it if it does not exist. Will not return null.

      Definition: 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.

    • setSubstitution

      Sets the value(s) for substitution ()

      Definition: 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

      Gets the value(s) for priorPrescription (). creating it if it does not exist. Will not return null.

      Definition: A link to a resource representing an earlier order or prescription that this order supersedes

    • setPriorPrescription

      Sets the value(s) for priorPrescription ()

      Definition: A link to a resource representing an earlier order or prescription that this order supersedes

    • getResourceName

      Specified by:
      getResourceName in interface ca.uhn.fhir.model.api.IResource
    • getStructureFhirVersionEnum

      public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
      Specified by:
      getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
      Specified by:
      getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource