Class MedicationAdministration

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

Definition: Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner

Requirements:

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

See Also:
  • Field Details

    • SP_DEVICE

      public static final String SP_DEVICE
      Search parameter constant for device

      Description: Return administrations with this administration device identity
      Type: reference
      Path: MedicationAdministration.device

      See Also:
    • DEVICE

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

      Description: Return administrations with this administration device identity
      Type: reference
      Path: MedicationAdministration.device

    • SP_ENCOUNTER

      public static final String SP_ENCOUNTER
      Search parameter constant for encounter

      Description: Return administrations that share this encounter
      Type: reference
      Path: MedicationAdministration.encounter

      See Also:
    • ENCOUNTER

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

      Description: Return administrations that share this encounter
      Type: reference
      Path: MedicationAdministration.encounter

    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter constant for identifier

      Description: Return administrations with this external identifier
      Type: token
      Path: MedicationAdministration.identifier

      See Also:
    • IDENTIFIER

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

      Description: Return administrations with this external identifier
      Type: token
      Path: MedicationAdministration.identifier

    • SP_MEDICATION

      public static final String SP_MEDICATION
      Search parameter constant for medication

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

    • SP_CODE

      public static final String SP_CODE
      Search parameter constant for code

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

    • SP_NOTGIVEN

      public static final String SP_NOTGIVEN
      Search parameter constant for notgiven

      Description: Administrations that were not made
      Type: token
      Path: MedicationAdministration.wasNotGiven

      See Also:
    • NOTGIVEN

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

      Description: Administrations that were not made
      Type: token
      Path: MedicationAdministration.wasNotGiven

    • SP_PATIENT

      public static final String SP_PATIENT
      Search parameter constant for patient

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

    • SP_PRESCRIPTION

      public static final String SP_PRESCRIPTION
      Search parameter constant for prescription

      Description: The identity of a prescription to list administrations from
      Type: reference
      Path: MedicationAdministration.prescription

      See Also:
    • PRESCRIPTION

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

      Description: The identity of a prescription to list administrations from
      Type: reference
      Path: MedicationAdministration.prescription

    • SP_STATUS

      public static final String SP_STATUS
      Search parameter constant for status

      Description: MedicationAdministration event status (for example one of active/paused/completed/nullified)
      Type: token
      Path: MedicationAdministration.status

      See Also:
    • STATUS

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

      Description: MedicationAdministration event status (for example one of active/paused/completed/nullified)
      Type: token
      Path: MedicationAdministration.status

    • SP_EFFECTIVETIME

      public static final String SP_EFFECTIVETIME
      Search parameter constant for effectivetime

      Description: Date administration happened (or did not happen)
      Type: date
      Path: MedicationAdministration.effectiveTime[x]

      See Also:
    • EFFECTIVETIME

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

      Description: Date administration happened (or did not happen)
      Type: date
      Path: MedicationAdministration.effectiveTime[x]

    • SP_PRACTITIONER

      public static final String SP_PRACTITIONER
      Search parameter constant for practitioner

      Description:
      Type: reference
      Path: MedicationAdministration.practitioner

      See Also:
    • PRACTITIONER

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

      Description:
      Type: reference
      Path: MedicationAdministration.practitioner

    • INCLUDE_DEVICE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationAdministration:device".
    • 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 "MedicationAdministration: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 "MedicationAdministration: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 "MedicationAdministration:patient".
    • INCLUDE_PRACTITIONER

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationAdministration:practitioner".
    • INCLUDE_PRESCRIPTION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PRESCRIPTION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "MedicationAdministration:prescription".
  • 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.

    • getStatusElement

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

      Definition: Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.

    • getStatus

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

      Definition: Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.

    • setStatus

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

      Definition: Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.

    • setStatus

      Sets the value(s) for status (status)

      Definition: Will generally be set to show that the administration has been completed. For some long running administrations such as infusions it is possible for an administration to be started but not completed or it may be paused while some other process is under way.

    • 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 receiving the medication.

    • setPatient

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

      Definition: The person or animal receiving the medication.

    • getPractitioner

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

      Definition: The individual who was responsible for giving the medication to the patient.

    • setPractitioner

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

      Definition: The individual who was responsible for giving the medication to the patient.

    • getEncounter

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

      Definition: The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.

    • setEncounter

      Sets the value(s) for encounter (context)

      Definition: The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.

    • getPrescription

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

      Definition: The original request, instruction or authority to perform the administration.

    • setPrescription

      Sets the value(s) for prescription ()

      Definition: The original request, instruction or authority to perform the administration.

    • getWasNotGivenElement

      public ca.uhn.fhir.model.primitive.BooleanDt getWasNotGivenElement()
      Gets the value(s) for wasNotGiven (). 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 administered.

    • getWasNotGiven

      Gets the value(s) for wasNotGiven (). 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 administered.

    • setWasNotGiven

      public MedicationAdministration setWasNotGiven(ca.uhn.fhir.model.primitive.BooleanDt theValue)
      Sets the value(s) for wasNotGiven ()

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

    • setWasNotGiven

      public MedicationAdministration setWasNotGiven(boolean theBoolean)
      Sets the value for wasNotGiven ()

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

    • getReasonNotGiven

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

      Definition: A code indicating why the administration was not performed.

    • setReasonNotGiven

      Sets the value(s) for reasonNotGiven ()

      Definition: A code indicating why the administration was not performed.

    • addReasonNotGiven

      Adds and returns a new value for reasonNotGiven ()

      Definition: A code indicating why the administration was not performed.

    • addReasonNotGiven

      Adds a given new value for reasonNotGiven ()

      Definition: A code indicating why the administration was not performed.

      Parameters:
      theValue - The reasonNotGiven to add (must not be null)
    • getReasonNotGivenFirstRep

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

      Definition: A code indicating why the administration was not performed.

    • getReasonGiven

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

      Definition: A code indicating why the medication was given.

    • setReasonGiven

      Sets the value(s) for reasonGiven ()

      Definition: A code indicating why the medication was given.

    • addReasonGiven

      Adds and returns a new value for reasonGiven ()

      Definition: A code indicating why the medication was given.

    • addReasonGiven

      Adds a given new value for reasonGiven ()

      Definition: A code indicating why the medication was given.

      Parameters:
      theValue - The reasonGiven to add (must not be null)
    • getReasonGivenFirstRep

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

      Definition: A code indicating why the medication was given.

    • getEffectiveTime

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

      Definition: A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.

    • setEffectiveTime

      public MedicationAdministration setEffectiveTime(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for effectiveTime[x] (when.done)

      Definition: A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate.

    • getMedication

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

      Definition: Identifies the medication that was 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 MedicationAdministration setMedication(ca.uhn.fhir.model.api.IDatatype theValue)
      Sets the value(s) for medication[x] ()

      Definition: Identifies the medication that was 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.

    • getDevice

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

      Definition: The device used in administering the medication to the patient. For example, a particular infusion pump

    • setDevice

      Sets the value(s) for device ()

      Definition: The device used in administering the medication to the patient. For example, a particular infusion pump

    • addDevice

      Adds and returns a new value for device ()

      Definition: The device used in administering the medication to the patient. For example, a particular infusion pump

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

    • setNote

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

      Definition: Extra information about the medication administration that is not conveyed by the other attributes.

    • setNote

      Sets the value for note ()

      Definition: Extra information about the medication administration that is not conveyed by the other attributes.

    • getDosage

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

      Definition: Describes the medication dosage information details e.g. dose, rate, site, route, etc.

    • setDosage

      Sets the value(s) for dosage ()

      Definition: Describes the medication dosage information details e.g. dose, rate, site, route, etc.

    • 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