Package org.hl7.fhir.dstu2.model
Class MedicationStatement
- 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.MedicationStatement
-
- 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 MedicationStatement extends DomainResource
A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedicationStatement.MedicationStatementDosageComponentstatic classMedicationStatement.MedicationStatementStatusstatic classMedicationStatement.MedicationStatementStatusEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected DateTimeTypedateAssertedThe date when the medication statement was asserted by the information source.protected List<MedicationStatement.MedicationStatementDosageComponent>dosageIndicates how the medication is/was used by the patient.protected TypeeffectiveThe interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).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 ReferenceinformationSourceThe person who provided the information about the taking of this medication.protected ResourceinformationSourceTargetThe actual object that is the target of the reference (The person who provided the information about the taking of this medication.)protected TypemedicationIdentifies the medication being administered.protected StringTypenoteProvides extra information about the medication statement that is not conveyed by the other attributes.protected ReferencepatientThe person or animal who is/was taking the medication.protected PatientpatientTargetThe actual object that is the target of the reference (The person or animal who is/was taking the medication.)protected TypereasonForUseA reason for why the medication is being/was taken.protected List<CodeableConcept>reasonNotTakenA code indicating why the medication was not taken.static StringSP_CODEstatic StringSP_EFFECTIVEDATEstatic StringSP_IDENTIFIERstatic StringSP_MEDICATIONstatic StringSP_PATIENTstatic StringSP_SOURCEstatic StringSP_STATUSprotected Enumeration<MedicationStatement.MedicationStatementStatus>statusA code representing the patient or other source's judgment about the state of the medication used that this statement is about.protected List<Reference>supportingInformationAllows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.protected List<Resource>supportingInformationTargetThe actual objects that are the target of the reference (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.)protected BooleanTypewasNotTakenSet this to true if the record is saying that the medication was NOT taken.-
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 MedicationStatement()MedicationStatement(Reference patient, Enumeration<MedicationStatement.MedicationStatementStatus> status, 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.
-
patientTarget
protected Patient patientTarget
The actual object that is the target of the reference (The person or animal who is/was taking the medication.)
-
informationSource
protected Reference informationSource
The person who provided the information about the taking of this medication.
-
informationSourceTarget
protected Resource informationSourceTarget
The actual object that is the target of the reference (The person who provided the information about the taking of this medication.)
-
dateAsserted
protected DateTimeType dateAsserted
The date when the medication statement was asserted by the information source.
-
status
protected Enumeration<MedicationStatement.MedicationStatementStatus> status
A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.
-
wasNotTaken
protected BooleanType wasNotTaken
Set this to true if the record is saying that the medication was NOT taken.
-
reasonNotTaken
protected List<CodeableConcept> reasonNotTaken
A code indicating why the medication was not taken.
-
reasonForUse
protected Type reasonForUse
A reason for why the medication is being/was taken.
-
effective
protected Type effective
The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).
-
note
protected StringType note
Provides extra information about the medication statement that is not conveyed by the other attributes.
-
supportingInformation
protected List<Reference> supportingInformation
Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.
-
supportingInformationTarget
protected List<Resource> supportingInformationTarget
The actual objects that are the target of the reference (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.)
-
medication
protected Type medication
Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.
-
dosage
protected List<MedicationStatement.MedicationStatementDosageComponent> dosage
Indicates how the medication is/was used by the patient.
-
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_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_SOURCE
public static final String SP_SOURCE
- See Also:
- Constant Field Values
-
SP_EFFECTIVEDATE
public static final String SP_EFFECTIVEDATE
- See Also:
- Constant Field Values
-
SP_STATUS
public static final String SP_STATUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MedicationStatement
public MedicationStatement()
-
MedicationStatement
public MedicationStatement(Reference patient, Enumeration<MedicationStatement.MedicationStatementStatus> status, 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 MedicationStatement addIdentifier(Identifier t)
-
getPatient
public Reference getPatient()
- Returns:
patient(The person or animal who is/was taking the medication.)
-
hasPatient
public boolean hasPatient()
-
setPatient
public MedicationStatement setPatient(Reference value)
- Parameters:
value-patient(The person or animal who is/was taking 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 who is/was taking the medication.)
-
setPatientTarget
public MedicationStatement 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 who is/was taking the medication.)
-
getInformationSource
public Reference getInformationSource()
- Returns:
informationSource(The person who provided the information about the taking of this medication.)
-
hasInformationSource
public boolean hasInformationSource()
-
setInformationSource
public MedicationStatement setInformationSource(Reference value)
- Parameters:
value-informationSource(The person who provided the information about the taking of this medication.)
-
getInformationSourceTarget
public Resource getInformationSourceTarget()
- Returns:
informationSourceThe 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 who provided the information about the taking of this medication.)
-
setInformationSourceTarget
public MedicationStatement setInformationSourceTarget(Resource value)
- Parameters:
value-informationSourceThe 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 who provided the information about the taking of this medication.)
-
getDateAssertedElement
public DateTimeType getDateAssertedElement()
- Returns:
dateAsserted(The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value
-
hasDateAssertedElement
public boolean hasDateAssertedElement()
-
hasDateAsserted
public boolean hasDateAsserted()
-
setDateAssertedElement
public MedicationStatement setDateAssertedElement(DateTimeType value)
- Parameters:
value-dateAsserted(The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value
-
getDateAsserted
public Date getDateAsserted()
- Returns:
- The date when the medication statement was asserted by the information source.
-
setDateAsserted
public MedicationStatement setDateAsserted(Date value)
- Parameters:
value- The date when the medication statement was asserted by the information source.
-
getStatusElement
public Enumeration<MedicationStatement.MedicationStatementStatus> getStatusElement()
- Returns:
status(A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.). 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 MedicationStatement setStatusElement(Enumeration<MedicationStatement.MedicationStatementStatus> value)
- Parameters:
value-status(A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
getStatus
public MedicationStatement.MedicationStatementStatus getStatus()
- Returns:
- A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.
-
setStatus
public MedicationStatement setStatus(MedicationStatement.MedicationStatementStatus value)
- Parameters:
value- A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed.
-
getWasNotTakenElement
public BooleanType getWasNotTakenElement()
- Returns:
wasNotTaken(Set this to true if the record is saying that the medication was NOT taken.). This is the underlying object with id, value and extensions. The accessor "getWasNotTaken" gives direct access to the value
-
hasWasNotTakenElement
public boolean hasWasNotTakenElement()
-
hasWasNotTaken
public boolean hasWasNotTaken()
-
setWasNotTakenElement
public MedicationStatement setWasNotTakenElement(BooleanType value)
- Parameters:
value-wasNotTaken(Set this to true if the record is saying that the medication was NOT taken.). This is the underlying object with id, value and extensions. The accessor "getWasNotTaken" gives direct access to the value
-
getWasNotTaken
public boolean getWasNotTaken()
- Returns:
- Set this to true if the record is saying that the medication was NOT taken.
-
setWasNotTaken
public MedicationStatement setWasNotTaken(boolean value)
- Parameters:
value- Set this to true if the record is saying that the medication was NOT taken.
-
getReasonNotTaken
public List<CodeableConcept> getReasonNotTaken()
- Returns:
reasonNotTaken(A code indicating why the medication was not taken.)
-
hasReasonNotTaken
public boolean hasReasonNotTaken()
-
addReasonNotTaken
public CodeableConcept addReasonNotTaken()
- Returns:
reasonNotTaken(A code indicating why the medication was not taken.)
-
addReasonNotTaken
public MedicationStatement addReasonNotTaken(CodeableConcept t)
-
getReasonForUse
public Type getReasonForUse()
- Returns:
reasonForUse(A reason for why the medication is being/was taken.)
-
getReasonForUseCodeableConcept
public CodeableConcept getReasonForUseCodeableConcept() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
reasonForUse(A reason for why the medication is being/was taken.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasReasonForUseCodeableConcept
public boolean hasReasonForUseCodeableConcept()
-
getReasonForUseReference
public Reference getReasonForUseReference() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
reasonForUse(A reason for why the medication is being/was taken.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasReasonForUseReference
public boolean hasReasonForUseReference()
-
hasReasonForUse
public boolean hasReasonForUse()
-
setReasonForUse
public MedicationStatement setReasonForUse(Type value)
- Parameters:
value-reasonForUse(A reason for why the medication is being/was taken.)
-
getEffective
public Type getEffective()
- Returns:
effective(The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).)
-
getEffectiveDateTimeType
public DateTimeType getEffectiveDateTimeType() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
effective(The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasEffectiveDateTimeType
public boolean hasEffectiveDateTimeType()
-
getEffectivePeriod
public Period getEffectivePeriod() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
effective(The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasEffectivePeriod
public boolean hasEffectivePeriod()
-
hasEffective
public boolean hasEffective()
-
setEffective
public MedicationStatement setEffective(Type value)
- Parameters:
value-effective(The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).)
-
getNoteElement
public StringType getNoteElement()
- Returns:
note(Provides extra information about the medication statement 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 MedicationStatement setNoteElement(StringType value)
- Parameters:
value-note(Provides extra information about the medication statement 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:
- Provides extra information about the medication statement that is not conveyed by the other attributes.
-
setNote
public MedicationStatement setNote(String value)
- Parameters:
value- Provides extra information about the medication statement that is not conveyed by the other attributes.
-
getSupportingInformation
public List<Reference> getSupportingInformation()
- Returns:
supportingInformation(Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.)
-
hasSupportingInformation
public boolean hasSupportingInformation()
-
addSupportingInformation
public Reference addSupportingInformation()
- Returns:
supportingInformation(Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.)
-
addSupportingInformation
public MedicationStatement addSupportingInformation(Reference t)
-
getSupportingInformationTarget
public List<Resource> getSupportingInformationTarget()
- Returns:
supportingInformation(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. Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.)
-
getMedication
public Type getMedication()
- Returns:
medication(Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.)
-
getMedicationCodeableConcept
public CodeableConcept getMedicationCodeableConcept() throws org.hl7.fhir.exceptions.FHIRException
- Returns:
medication(Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.)- 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 being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.)- Throws:
org.hl7.fhir.exceptions.FHIRException
-
hasMedicationReference
public boolean hasMedicationReference()
-
hasMedication
public boolean hasMedication()
-
setMedication
public MedicationStatement setMedication(Type value)
- Parameters:
value-medication(Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.)
-
getDosage
public List<MedicationStatement.MedicationStatementDosageComponent> getDosage()
- Returns:
dosage(Indicates how the medication is/was used by the patient.)
-
hasDosage
public boolean hasDosage()
-
addDosage
public MedicationStatement.MedicationStatementDosageComponent addDosage()
- Returns:
dosage(Indicates how the medication is/was used by the patient.)
-
addDosage
public MedicationStatement addDosage(MedicationStatement.MedicationStatementDosageComponent t)
-
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 MedicationStatement copy()
- Specified by:
copyin classDomainResource
-
typedCopy
protected MedicationStatement 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
-
-