Package org.hl7.fhir.dstu2.model
Class MedicationAdministration
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.model.DomainResource
-
- org.hl7.fhir.dstu2.model.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedicationAdministration.MedicationAdministrationDosageComponentstatic classMedicationAdministration.MedicationAdministrationStatusstatic classMedicationAdministration.MedicationAdministrationStatusEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected List<Reference>deviceThe device used in administering the medication to the patient.protected List<Device>deviceTargetThe actual objects that are the target of the reference (The device used in administering the medication to the patient.protected MedicationAdministration.MedicationAdministrationDosageComponentdosageDescribes the medication dosage information details e.g.protected TypeeffectiveTimeA specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true).protected ReferenceencounterThe visit, admission or other contact between patient and health care provider the medication administration was performed as part of.protected EncounterencounterTargetThe 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.)protected List<Identifier>identifierExternal identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource.protected TypemedicationIdentifies the medication that was administered.protected StringTypenoteExtra information about the medication administration that is not conveyed by the other attributes.protected ReferencepatientThe person or animal receiving the medication.protected PatientpatientTargetThe actual object that is the target of the reference (The person or animal receiving the medication.)protected ReferencepractitionerThe individual who was responsible for giving the medication to the patient.protected ResourcepractitionerTargetThe actual object that is the target of the reference (The individual who was responsible for giving the medication to the patient.)protected ReferenceprescriptionThe original request, instruction or authority to perform the administration.protected MedicationOrderprescriptionTargetThe actual object that is the target of the reference (The original request, instruction or authority to perform the administration.)protected List<CodeableConcept>reasonGivenA code indicating why the medication was given.protected List<CodeableConcept>reasonNotGivenA code indicating why the administration was not performed.static StringSP_CODEstatic StringSP_DEVICEstatic StringSP_EFFECTIVETIMEstatic StringSP_ENCOUNTERstatic StringSP_IDENTIFIERstatic StringSP_MEDICATIONstatic StringSP_NOTGIVENstatic StringSP_PATIENTstatic StringSP_PRACTITIONERstatic StringSP_PRESCRIPTIONstatic StringSP_STATUSprotected Enumeration<MedicationAdministration.MedicationAdministrationStatus>statusWill generally be set to show that the administration has been completed.protected BooleanTypewasNotGivenSet this to true if the record is saying that the medication was NOT administered.-
Fields inherited from class org.hl7.fhir.dstu2.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.dstu2.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description MedicationAdministration()MedicationAdministration(Enumeration<MedicationAdministration.MedicationAdministrationStatus> status, Reference patient, Type effectiveTime, Type medication)
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.DomainResource
addContained, addExtension, addExtension, addModifierExtension, addModifierExtension, copyValues, getContained, getExtension, getModifierExtension, getText, hasContained, hasExtension, hasModifierExtension, hasText, setText
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
-
-
-
-
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.
-
status
protected Enumeration<MedicationAdministration.MedicationAdministrationStatus> 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.
-
patientTarget
protected Patient patientTarget
The actual object that is the target of the reference (The person or animal receiving the medication.)
-
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.)
-
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.)
-
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.
-
reasonNotGiven
protected List<CodeableConcept> reasonNotGiven
A code indicating why the administration was not performed.
-
reasonGiven
protected List<CodeableConcept> reasonGiven
A code indicating why the medication was given.
-
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.
-
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.
-
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 StringType note
Extra information about the medication administration that is not conveyed by the other attributes.
-
dosage
protected MedicationAdministration.MedicationAdministrationDosageComponent dosage
Describes the medication dosage information details e.g. dose, rate, site, route, etc.
-
SP_IDENTIFIER
public static final String SP_IDENTIFIER
- See Also:
- Constant Field Values
-
SP_CODE
public static final String SP_CODE
- See Also:
- Constant Field Values
-
SP_PRESCRIPTION
public static final String SP_PRESCRIPTION
- See Also:
- Constant Field Values
-
SP_EFFECTIVETIME
public static final String SP_EFFECTIVETIME
- See Also:
- Constant Field Values
-
SP_PRACTITIONER
public static final String SP_PRACTITIONER
- See Also:
- Constant Field Values
-
SP_PATIENT
public static final String SP_PATIENT
- See Also:
- Constant Field Values
-
SP_MEDICATION
public static final String SP_MEDICATION
- See Also:
- Constant Field Values
-
SP_ENCOUNTER
public static final String SP_ENCOUNTER
- See Also:
- Constant Field Values
-
SP_DEVICE
public static final String SP_DEVICE
- See Also:
- Constant Field Values
-
SP_NOTGIVEN
public static final String SP_NOTGIVEN
- See Also:
- Constant Field Values
-
SP_STATUS
public static final String SP_STATUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MedicationAdministration
public MedicationAdministration()
-
MedicationAdministration
public MedicationAdministration(Enumeration<MedicationAdministration.MedicationAdministrationStatus> status, Reference patient, Type effectiveTime, Type medication)
-
-
Method Detail
-
getIdentifier
public List<Identifier> getIdentifier()
- 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.)
-
hasIdentifier
public boolean hasIdentifier()
-
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.)
-
addIdentifier
public MedicationAdministration addIdentifier(Identifier t)
-
getStatusElement
public Enumeration<MedicationAdministration.MedicationAdministrationStatus> getStatusElement()
- 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
-
hasStatusElement
public boolean hasStatusElement()
-
hasStatus
public boolean hasStatus()
-
setStatusElement
public MedicationAdministration setStatusElement(Enumeration<MedicationAdministration.MedicationAdministrationStatus> value)
- Parameters:
value-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.
-
setStatus
public MedicationAdministration setStatus(MedicationAdministration.MedicationAdministrationStatus value)
- Parameters:
value- 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 Reference getPatient()
- Returns:
patient(The person or animal receiving the medication.)
-
hasPatient
public boolean hasPatient()
-
setPatient
public MedicationAdministration setPatient(Reference value)
- Parameters:
value-patient(The person or animal receiving the medication.)
-
getPatientTarget
public Patient getPatientTarget()
- Returns:
patientThe 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-patientThe 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.)
-
getPractitioner
public Reference getPractitioner()
- Returns:
practitioner(The individual who was responsible for giving the medication to the patient.)
-
hasPractitioner
public boolean hasPractitioner()
-
setPractitioner
public MedicationAdministration setPractitioner(Reference value)
- Parameters:
value-practitioner(The individual who was responsible for giving the medication to the patient.)
-
getPractitionerTarget
public Resource getPractitionerTarget()
- Returns:
practitionerThe 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-practitionerThe 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.)
-
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.)
-
hasEncounter
public boolean hasEncounter()
-
setEncounter
public MedicationAdministration setEncounter(Reference value)
- Parameters:
value-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:
encounterThe 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-encounterThe 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.)
-
getPrescription
public Reference getPrescription()
- Returns:
prescription(The original request, instruction or authority to perform the administration.)
-
hasPrescription
public boolean hasPrescription()
-
setPrescription
public MedicationAdministration setPrescription(Reference value)
- Parameters:
value-prescription(The original request, instruction or authority to perform the administration.)
-
getPrescriptionTarget
public MedicationOrder getPrescriptionTarget()
- Returns:
prescriptionThe 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-prescriptionThe 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
-
hasWasNotGivenElement
public boolean hasWasNotGivenElement()
-
hasWasNotGiven
public boolean hasWasNotGiven()
-
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.
-
setWasNotGiven
public MedicationAdministration setWasNotGiven(boolean value)
- Parameters:
value- Set this to true if the record is saying that the medication was NOT administered.
-
getReasonNotGiven
public List<CodeableConcept> getReasonNotGiven()
- Returns:
reasonNotGiven(A code indicating why the administration was not performed.)
-
hasReasonNotGiven
public boolean hasReasonNotGiven()
-
addReasonNotGiven
public CodeableConcept addReasonNotGiven()
- Returns:
reasonNotGiven(A code indicating why the administration was not performed.)
-
addReasonNotGiven
public MedicationAdministration addReasonNotGiven(CodeableConcept t)
-
getReasonGiven
public List<CodeableConcept> getReasonGiven()
- Returns:
reasonGiven(A code indicating why the medication was given.)
-
hasReasonGiven
public boolean hasReasonGiven()
-
addReasonGiven
public CodeableConcept addReasonGiven()
- Returns:
reasonGiven(A code indicating why the medication was given.)
-
addReasonGiven
public MedicationAdministration addReasonGiven(CodeableConcept t)
-
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
-
hasEffectiveTimeDateTimeType
public boolean hasEffectiveTimeDateTimeType()
-
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
-
hasEffectiveTimePeriod
public boolean hasEffectiveTimePeriod()
-
hasEffectiveTime
public boolean hasEffectiveTime()
-
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.)
-
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
-
hasMedicationCodeableConcept
public boolean hasMedicationCodeableConcept()
-
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
-
hasMedicationReference
public boolean hasMedicationReference()
-
hasMedication
public boolean hasMedication()
-
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.)
-
getDevice
public List<Reference> getDevice()
- Returns:
device(The device used in administering the medication to the patient. For example, a particular infusion pump.)
-
hasDevice
public boolean hasDevice()
-
addDevice
public Reference addDevice()
- Returns:
device(The device used in administering the medication to the patient. For example, a particular infusion pump.)
-
addDevice
public MedicationAdministration addDevice(Reference t)
-
getDeviceTarget
public List<Device> getDeviceTarget()
- 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.)
-
getNoteElement
public StringType getNoteElement()
- Returns:
note(Extra information about the medication administration that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
-
hasNoteElement
public boolean hasNoteElement()
-
hasNote
public boolean hasNote()
-
setNoteElement
public MedicationAdministration setNoteElement(StringType value)
- Parameters:
value-note(Extra information about the medication administration that is not conveyed by the other attributes.). This is the underlying object with id, value and extensions. The accessor "getNote" gives direct access to the value
-
getNote
public String getNote()
- Returns:
- Extra information about the medication administration that is not conveyed by the other attributes.
-
setNote
public MedicationAdministration setNote(String value)
- Parameters:
value- Extra information about the medication administration that is not conveyed by the other attributes.
-
getDosage
public MedicationAdministration.MedicationAdministrationDosageComponent getDosage()
- Returns:
dosage(Describes the medication dosage information details e.g. dose, rate, site, route, etc.)
-
hasDosage
public boolean hasDosage()
-
setDosage
public MedicationAdministration setDosage(MedicationAdministration.MedicationAdministrationDosageComponent value)
- Parameters:
value-dosage(Describes the medication dosage information details e.g. dose, rate, site, route, etc.)
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classDomainResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
addChildin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
fhirType
public String fhirType()
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
fhirTypein classDomainResource
-
copy
public MedicationAdministration copy()
- Specified by:
copyin classDomainResource
-
typedCopy
protected MedicationAdministration typedCopy()
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classDomainResource
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classDomainResource
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classDomainResource
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-