Class MedicationStatement

java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.dstu2.resource.BaseResource
ca.uhn.fhir.model.dstu2.resource.MedicationStatement
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 MedicationStatement extends BaseResource implements ca.uhn.fhir.model.api.IResource
HAPI/FHIR MedicationStatement Resource (clinical.medication)

Definition: A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.

Requirements:

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

See Also:
  • Field Details

    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter constant for identifier

      Description: Return statements with this external identifier
      Type: token
      Path: MedicationStatement.identifier

      See Also:
    • IDENTIFIER

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

      Description: Return statements with this external identifier
      Type: token
      Path: MedicationStatement.identifier

    • SP_MEDICATION

      public static final String SP_MEDICATION
      Search parameter constant for medication

      Description: Return administrations of this medication reference
      Type: reference
      Path: MedicationStatement.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: MedicationStatement.medicationReference

    • SP_CODE

      public static final String SP_CODE
      Search parameter constant for code

      Description: Return administrations of this medication code
      Type: token
      Path: MedicationStatement.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: MedicationStatement.medicationCodeableConcept

    • SP_PATIENT

      public static final String SP_PATIENT
      Search parameter constant for patient

      Description: The identity of a patient to list statements for
      Type: reference
      Path: MedicationStatement.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 statements for
      Type: reference
      Path: MedicationStatement.patient

    • SP_EFFECTIVEDATE

      public static final String SP_EFFECTIVEDATE
      Search parameter constant for effectivedate

      Description: Date when patient was taking (or not taking) the medication
      Type: date
      Path: MedicationStatement.effective[x]

      See Also:
    • EFFECTIVEDATE

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

      Description: Date when patient was taking (or not taking) the medication
      Type: date
      Path: MedicationStatement.effective[x]

    • SP_STATUS

      public static final String SP_STATUS
      Search parameter constant for status

      Description: Return statements that match the given status
      Type: token
      Path: MedicationStatement.status

      See Also:
    • STATUS

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

      Description: Return statements that match the given status
      Type: token
      Path: MedicationStatement.status

    • SP_SOURCE

      public static final String SP_SOURCE
      Search parameter constant for source

      Description: Who the information in the statement came from
      Type: reference
      Path: MedicationStatement.informationSource

      See Also:
    • SOURCE

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

      Description: Who the information in the statement came from
      Type: reference
      Path: MedicationStatement.informationSource

    • 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 "MedicationStatement: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 "MedicationStatement:patient".
    • INCLUDE_SOURCE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationStatement:source".
  • 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 - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.

    • setIdentifier

      Sets the value(s) for identifier (id)

      Definition: External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.

    • addIdentifier

      Adds and returns a new value for identifier (id)

      Definition: External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.

    • addIdentifier

      Adds a given new value for identifier (id)

      Definition: External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.

      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 - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated.

    • getPatient

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

      Definition: The person or animal who is/was taking the medication.

    • setPatient

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

      Definition: The person or animal who is/was taking the medication.

    • getInformationSource

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

      Definition: The person who provided the information about the taking of this medication.

    • setInformationSource

      Sets the value(s) for informationSource (who.source)

      Definition: The person who provided the information about the taking of this medication.

    • getDateAssertedElement

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

      Definition: The date when the medication statement was asserted by the information source.

    • getDateAsserted

      Gets the value(s) for dateAsserted (). creating it if it does not exist. This method may return null.

      Definition: The date when the medication statement was asserted by the information source.

    • setDateAsserted

      public MedicationStatement setDateAsserted(ca.uhn.fhir.model.primitive.DateTimeDt theValue)
      Sets the value(s) for dateAsserted ()

      Definition: The date when the medication statement was asserted by the information source.

    • setDateAssertedWithSecondsPrecision

      Sets the value for dateAsserted ()

      Definition: The date when the medication statement was asserted by the information source.

    • setDateAsserted

      public MedicationStatement setDateAsserted(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
      Sets the value for dateAsserted ()

      Definition: The date when the medication statement was asserted by the information source.

    • getStatusElement

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

      Definition: A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.

    • getStatus

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

      Definition: A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.

    • setStatus

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

      Definition: A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.

    • setStatus

      Sets the value(s) for status ()

      Definition: A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.

    • getWasNotTakenElement

      public ca.uhn.fhir.model.primitive.BooleanDt getWasNotTakenElement()
      Gets the value(s) for wasNotTaken (status). creating it if it does not exist. Will not return null.

      Definition: Set this to true if the record is saying that the medication was NOT taken.

    • getWasNotTaken

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

      Definition: Set this to true if the record is saying that the medication was NOT taken.

    • setWasNotTaken

      public MedicationStatement setWasNotTaken(ca.uhn.fhir.model.primitive.BooleanDt theValue)
      Sets the value(s) for wasNotTaken (status)

      Definition: Set this to true if the record is saying that the medication was NOT taken.

    • setWasNotTaken

      public MedicationStatement setWasNotTaken(boolean theBoolean)
      Sets the value for wasNotTaken (status)

      Definition: Set this to true if the record is saying that the medication was NOT taken.

    • getReasonNotTaken

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

      Definition: A code indicating why the medication was not taken.

    • setReasonNotTaken

      Sets the value(s) for reasonNotTaken ()

      Definition: A code indicating why the medication was not taken.

    • addReasonNotTaken

      Adds and returns a new value for reasonNotTaken ()

      Definition: A code indicating why the medication was not taken.

    • addReasonNotTaken

      Adds a given new value for reasonNotTaken ()

      Definition: A code indicating why the medication was not taken.

      Parameters:
      theValue - The reasonNotTaken to add (must not be null)
    • getReasonNotTakenFirstRep

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

      Definition: A code indicating why the medication was not taken.

    • getReasonForUse

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

      Definition: A reason for why the medication is being/was taken.

    • setReasonForUse

      public MedicationStatement setReasonForUse(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for reasonForUse[x] ()

      Definition: A reason for why the medication is being/was taken.

    • getEffective

      public ca.uhn.fhir.model.api.IDatatype getEffective()
      Gets the value(s) for effective[x] (when.done). creating it if it does not exist. Will not return null.

      Definition: The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).

    • setEffective

      public MedicationStatement setEffective(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for effective[x] (when.done)

      Definition: The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).

    • 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: Provides extra information about the medication statement that is not 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: Provides extra information about the medication statement that is not conveyed by the other attributes.

    • setNote

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

      Definition: Provides extra information about the medication statement that is not conveyed by the other attributes.

    • setNote

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

      Definition: Provides extra information about the medication statement that is not conveyed by the other attributes.

    • getSupportingInformation

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

      Definition: Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.

    • setSupportingInformation

      Sets the value(s) for supportingInformation ()

      Definition: Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.

    • addSupportingInformation

      Adds and returns a new value for supportingInformation ()

      Definition: Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.

    • 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 either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.

    • setMedication

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

      Definition: Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.

    • getDosage

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

      Definition: Indicates how the medication is/was used by the patient

    • setDosage

      Sets the value(s) for dosage ()

      Definition: Indicates how the medication is/was used by the patient

    • addDosage

      Adds and returns a new value for dosage ()

      Definition: Indicates how the medication is/was used by the patient

    • addDosage

      Adds a given new value for dosage ()

      Definition: Indicates how the medication is/was used by the patient

      Parameters:
      theValue - The dosage to add (must not be null)
    • getDosageFirstRep

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

      Definition: Indicates how the medication is/was used by the patient

    • 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