Class 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:
    Serialized Form
    • Field Detail

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

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

      • 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:
        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_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:
        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

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

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

      • 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:
        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_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:
        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]

      • 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".
    • Method Detail

      • 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

        public List<IdentifierDtgetIdentifier()
        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

        public MedicationAdministration setIdentifier​(List<IdentifierDt> theValue)
        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

        public IdentifierDt 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

        public MedicationAdministration addIdentifier​(IdentifierDt theValue)
        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

        public IdentifierDt 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<MedicationAdministrationStatusEnumgetStatusElement()
        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

        public MedicationAdministration setStatus​(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.

      • getPatient

        public ResourceReferenceDt 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.

      • getPractitioner

        public ResourceReferenceDt 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.

      • getEncounter

        public ResourceReferenceDt 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

        public MedicationAdministration setEncounter​(ResourceReferenceDt theValue)
        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

        public ResourceReferenceDt 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.

      • 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

        public Boolean 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

        public List<CodeableConceptDtgetReasonNotGiven()
        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.

      • addReasonNotGiven

        public CodeableConceptDt addReasonNotGiven()
        Adds and returns a new value for reasonNotGiven ()

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

      • getReasonNotGivenFirstRep

        public CodeableConceptDt 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

        public List<CodeableConceptDtgetReasonGiven()
        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.

      • addReasonGiven

        public CodeableConceptDt addReasonGiven()
        Adds and returns a new value for reasonGiven ()

        Definition: A code indicating why the medication was given.

      • getReasonGivenFirstRep

        public CodeableConceptDt 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

        public List<ResourceReferenceDtgetDevice()
        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

      • addDevice

        public ResourceReferenceDt 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

        public MedicationAdministration setNote​(String theString)
        Sets the value for note ()

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

      • getDosage

        public MedicationAdministration.Dosage 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.

      • getResourceName

        public String 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