Class MedicationAdministration

  • 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 MedicationAdministration
    extends DomainResource
    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.
    See Also:
    Serialized Form
    • Field Detail

      • identifier

        protected List<Identifier> identifier
        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.
      • medication

        protected Type medication
        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.
      • patient

        protected Reference patient
        The person or animal receiving the medication.
      • patientTarget

        protected Patient patientTarget
        The actual object that is the target of the reference (The person or animal receiving the medication.)
      • encounter

        protected Reference encounter
        The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.
      • encounterTarget

        protected Encounter encounterTarget
        The actual object that is the target of the reference (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.)
      • effectiveTime

        protected Type effectiveTime
        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.
      • practitioner

        protected Reference practitioner
        The individual who was responsible for giving the medication to the patient.
      • practitionerTarget

        protected Resource practitionerTarget
        The actual object that is the target of the reference (The individual who was responsible for giving the medication to the patient.)
      • prescription

        protected Reference prescription
        The original request, instruction or authority to perform the administration.
      • prescriptionTarget

        protected MedicationOrder prescriptionTarget
        The actual object that is the target of the reference (The original request, instruction or authority to perform the administration.)
      • wasNotGiven

        protected BooleanType wasNotGiven
        Set this to true if the record is saying that the medication was NOT administered.
      • device

        protected List<Reference> device
        The device used in administering the medication to the patient. For example, a particular infusion pump.
      • deviceTarget

        protected List<Device> deviceTarget
        The actual objects that are the target of the reference (The device used in administering the medication to the patient. For example, a particular infusion pump.)
      • note

        protected List<Annotation> note
        Extra information about the medication administration that is not conveyed by the other attributes.
      • SP_MEDICATION

        public static final String SP_MEDICATION
        Search parameter: medication

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

        See Also:
        Constant Field Values
      • 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

      • 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".
      • SP_EFFECTIVETIME

        public static final String SP_EFFECTIVETIME
        Search parameter: effectivetime

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

        See Also:
        Constant Field Values
      • 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_PATIENT

        public static final String SP_PATIENT
        Search parameter: patient

        Description: The identity of a patient to list administrations for
        Type: reference
        Path: MedicationAdministration.patient

        See Also:
        Constant Field Values
      • 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

      • 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".
      • SP_PRACTITIONER

        public static final String SP_PRACTITIONER
        Search parameter: practitioner

        Description: Who administered substance
        Type: reference
        Path: MedicationAdministration.practitioner

        See Also:
        Constant Field Values
      • PRACTITIONER

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

        Description: Who administered substance
        Type: reference
        Path: MedicationAdministration.practitioner

      • 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".
      • SP_STATUS

        public static final String SP_STATUS
        Search parameter: status

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

        See Also:
        Constant Field Values
      • 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_PRESCRIPTION

        public static final String SP_PRESCRIPTION
        Search parameter: prescription

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

        See Also:
        Constant Field Values
      • 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

      • 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".
      • SP_DEVICE

        public static final String SP_DEVICE
        Search parameter: device

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

        See Also:
        Constant Field Values
      • 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

      • 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".
      • SP_CODE

        public static final String SP_CODE
        Search parameter: code

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

        See Also:
        Constant Field Values
      • 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_ENCOUNTER

        public static final String SP_ENCOUNTER
        Search parameter: encounter

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

        See Also:
        Constant Field Values
      • 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

      • 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".
      • SP_IDENTIFIER

        public static final String SP_IDENTIFIER
        Search parameter: identifier

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

        See Also:
        Constant Field Values
      • 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_WASNOTGIVEN

        public static final String SP_WASNOTGIVEN
        Search parameter: wasnotgiven

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

        See Also:
        Constant Field Values
      • WASNOTGIVEN

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

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

    • Method Detail

      • getIdentifier

        public List<IdentifiergetIdentifier()
        Returns:
        identifier (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

        public Identifier addIdentifier()
        Returns:
        identifier (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 Enumeration<MedicationAdministration.MedicationAdministrationStatusgetStatusElement()
        Returns:
        status (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.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
      • getStatus

        public MedicationAdministration.MedicationAdministrationStatus getStatus()
        Returns:
        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.
      • getMedication

        public Type getMedication()
        Returns:
        medication (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.)
      • getMedicationCodeableConcept

        public CodeableConcept getMedicationCodeableConcept()
                                                     throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        medication (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.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • getMedicationReference

        public Reference getMedicationReference()
                                         throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        medication (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.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • setMedication

        public MedicationAdministration setMedication​(Type value)
        Parameters:
        value - medication (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.)
      • getPatientTarget

        public Patient getPatientTarget()
        Returns:
        patient The 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 person or animal receiving the medication.)
      • setPatientTarget

        public MedicationAdministration setPatientTarget​(Patient value)
        Parameters:
        value - patient The 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 person or animal receiving the medication.)
      • getEncounter

        public Reference getEncounter()
        Returns:
        encounter (The visit, admission or other contact between patient and health care provider the medication administration was performed as part of.)
      • getEncounterTarget

        public Encounter getEncounterTarget()
        Returns:
        encounter The 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 visit, admission or other contact between patient and health care provider the medication administration was performed as part of.)
      • setEncounterTarget

        public MedicationAdministration setEncounterTarget​(Encounter value)
        Parameters:
        value - encounter The 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 visit, admission or other contact between patient and health care provider the medication administration was performed as part of.)
      • getEffectiveTime

        public Type getEffectiveTime()
        Returns:
        effectiveTime (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.)
      • getEffectiveTimeDateTimeType

        public DateTimeType getEffectiveTimeDateTimeType()
                                                  throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        effectiveTime (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.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • getEffectiveTimePeriod

        public Period getEffectiveTimePeriod()
                                      throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        effectiveTime (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.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • setEffectiveTime

        public MedicationAdministration setEffectiveTime​(Type value)
        Parameters:
        value - effectiveTime (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.)
      • getPractitionerTarget

        public Resource getPractitionerTarget()
        Returns:
        practitioner The 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 individual who was responsible for giving the medication to the patient.)
      • setPractitionerTarget

        public MedicationAdministration setPractitionerTarget​(Resource value)
        Parameters:
        value - practitioner The 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 individual who was responsible for giving the medication to the patient.)
      • getPrescriptionTarget

        public MedicationOrder getPrescriptionTarget()
        Returns:
        prescription The 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 original request, instruction or authority to perform the administration.)
      • setPrescriptionTarget

        public MedicationAdministration setPrescriptionTarget​(MedicationOrder value)
        Parameters:
        value - prescription The 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 original request, instruction or authority to perform the administration.)
      • getWasNotGivenElement

        public BooleanType getWasNotGivenElement()
        Returns:
        wasNotGiven (Set this to true if the record is saying that the medication was NOT administered.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value
      • setWasNotGivenElement

        public MedicationAdministration setWasNotGivenElement​(BooleanType value)
        Parameters:
        value - wasNotGiven (Set this to true if the record is saying that the medication was NOT administered.). This is the underlying object with id, value and extensions. The accessor "getWasNotGiven" gives direct access to the value
      • getWasNotGiven

        public boolean getWasNotGiven()
        Returns:
        Set this to true if the record is saying that the medication was NOT administered.
      • getDevice

        public List<ReferencegetDevice()
        Returns:
        device (The device used in administering the medication to the patient. For example, a particular infusion pump.)
      • addDevice

        public Reference addDevice()
        Returns:
        device (The device used in administering the medication to the patient. For example, a particular infusion pump.)
      • getDeviceTarget

        public List<DevicegetDeviceTarget()
        Returns:
        device (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The device used in administering the medication to the patient. For example, a particular infusion pump.)
      • addDeviceTarget

        public Device addDeviceTarget()
        Returns:
        device (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The device used in administering the medication to the patient. For example, a particular infusion pump.)
      • getNote

        public List<AnnotationgetNote()
        Returns:
        note (Extra information about the medication administration that is not conveyed by the other attributes.)
      • hasNote

        public boolean hasNote()
      • addNote

        public Annotation addNote()
        Returns:
        note (Extra information about the medication administration that is not conveyed by the other attributes.)
      • getProperty

        public Base[] getProperty​(int hash,
                                  String name,
                                  boolean checkValid)
                           throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        getProperty in class DomainResource
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • makeProperty

        public Base makeProperty​(int hash,
                                 String name)
                          throws org.hl7.fhir.exceptions.FHIRException
        Description copied from class: Base
        make an instance of a property. If the property is a repeating property, make a new instance. if the property is not repeating, return the property
        Overrides:
        makeProperty in class DomainResource
        Returns:
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        isEmpty in class DomainResource