Class ChEmedEprMedicationDispensePml
java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.BaseResource
org.hl7.fhir.r4.model.Resource
org.hl7.fhir.r4.model.DomainResource
org.hl7.fhir.r4.model.MedicationDispense
org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationDispense
org.projecthusky.fhir.emed.ch.epr.resource.pml.ChEmedEprMedicationDispensePml
- 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
,ChEmedEprDocumentAuthorable<ChEmedEprMedicationDispensePml>
,ChEmedEprEntry
public class ChEmedEprMedicationDispensePml
extends ChEmedEprMedicationDispense
implements ChEmedEprDocumentAuthorable<ChEmedEprMedicationDispensePml>
The HAPI custom structure for CH-EMED-EPR MedicationDispense (PML).
- Author:
- Ronaldo Loureiro
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.MedicationDispense
org.hl7.fhir.r4.model.MedicationDispense.MedicationDispensePerformerComponent, org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatus, org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseStatusEnumFactory, org.hl7.fhir.r4.model.MedicationDispense.MedicationDispenseSubstitutionComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable org.hl7.fhir.r4.model.Reference
Author of the original document if different from the author of the medical decision (MedicationDispense.performer.actor).protected @Nullable ChEmedExtDispense
Reference to the original document.Fields inherited from class org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationDispense
pharmaceuticalAdvice, prescription, treatmentPlan, treatmentReason
Fields inherited from class org.hl7.fhir.r4.model.MedicationDispense
authorizingPrescription, authorizingPrescriptionTarget, category, CODE, context, CONTEXT, contextTarget, daysSupply, destination, DESTINATION, destinationTarget, detectedIssue, detectedIssueTarget, dosageInstruction, eventHistory, eventHistoryTarget, identifier, IDENTIFIER, INCLUDE_CONTEXT, INCLUDE_DESTINATION, INCLUDE_MEDICATION, INCLUDE_PATIENT, INCLUDE_PERFORMER, INCLUDE_PRESCRIPTION, INCLUDE_RECEIVER, INCLUDE_RESPONSIBLEPARTY, INCLUDE_SUBJECT, location, locationTarget, medication, MEDICATION, note, partOf, partOfTarget, PATIENT, performer, PERFORMER, PRESCRIPTION, quantity, receiver, RECEIVER, receiverTarget, RESPONSIBLEPARTY, SP_CODE, SP_CONTEXT, SP_DESTINATION, SP_IDENTIFIER, SP_MEDICATION, SP_PATIENT, SP_PERFORMER, SP_PRESCRIPTION, SP_RECEIVER, SP_RESPONSIBLEPARTY, SP_STATUS, SP_SUBJECT, SP_TYPE, SP_WHENHANDEDOVER, SP_WHENPREPARED, status, STATUS, statusReason, subject, SUBJECT, subjectTarget, substitution, supportingInformation, supportingInformationTarget, type, TYPE, whenHandedOver, WHENHANDEDOVER, whenPrepared, WHENPREPARED
Fields inherited from class org.hl7.fhir.r4.model.DomainResource
contained, extension, modifierExtension, text
Fields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, meta
Fields inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
RES_ID, SP_RES_ID
Fields inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
INCLUDE_ALL, WILDCARD_ALL_SET
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for the parser.ChEmedEprMedicationDispensePml
(UUID entryUuid, Instant whenHandedOver) Constructor that pre-populates fields. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
void
copyValues
(org.hl7.fhir.r4.model.MedicationDispense dst) org.hl7.fhir.r4.model.Reference
Gets the author document element in the medication dispense.Gets the parent document element.boolean
Returns whether the parent document reference exists.Resolves the medication or throws.Resolves the author and her/his organization of the medical decision.setAuthorDocument
(org.hl7.fhir.r4.model.Reference reference) Sets the authorDocument element in the resource.setParentDocumentElement
(ChEmedExtDispense parentDocument) Sets the parent document reference.setPerformer
(Author actor) Sets the author as performer (medical author) of the dispense.Sets the author and her/his organization of the medical decision.Methods inherited from class org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationDispense
addDosageAdditionalEntry, addDosageInstruction, addDosageInstruction, getDosageInstruction, getDosageInstructionFirstRep, getEmedType, getPharmaceuticalAdviceElement, getPrescriptionElement, getTreatmentPlanElement, getTreatmentReason, hasDosageAdditionalEntry, hasDosageBaseEntry, hasPharmaceuticalAdvice, hasPrescription, hasTreatmentPlan, hasTreatmentReason, resolveAdditionalDosage, resolveBaseDosage, resolveEffectiveDosageInstructions, resolveIdentifier, resolveMedicalAuthor, resolveMedicalAuthorshipTimestamp, resolveMtpReference, resolvePerformer, resolvePreReference, resolveQuantity, resolveSubject, resolveWhenHandedOver, setDosageBaseEntry, setIdentifier, setMedicationReference, setPharmaceuticalAdviceElement, setPrescriptionElement, setQuantity, setTreatmentPlanElement, setTreatmentReason, setWhenHandedOver
Methods inherited from class org.hl7.fhir.r4.model.MedicationDispense
addAuthorizingPrescription, addAuthorizingPrescription, addAuthorizingPrescriptionTarget, addChild, addDetectedIssue, addDetectedIssue, addDetectedIssueTarget, addEventHistory, addEventHistory, addEventHistoryTarget, addIdentifier, addIdentifier, addNote, addNote, addPartOf, addPartOf, addPartOfTarget, addPerformer, addPerformer, addReceiver, addReceiver, addSupportingInformation, addSupportingInformation, equalsDeep, equalsShallow, fhirType, getAuthorizingPrescription, getAuthorizingPrescriptionFirstRep, getAuthorizingPrescriptionTarget, getCategory, getContext, getContextTarget, getDaysSupply, getDestination, getDestinationTarget, getDetectedIssue, getDetectedIssueFirstRep, getDetectedIssueTarget, getEventHistory, getEventHistoryFirstRep, getEventHistoryTarget, getIdentifier, getIdentifierFirstRep, getLocation, getLocationTarget, getMedication, getMedicationCodeableConcept, getMedicationReference, getNamedProperty, getNote, getNoteFirstRep, getPartOf, getPartOfFirstRep, getPartOfTarget, getPerformer, getPerformerFirstRep, getProperty, getQuantity, getReceiver, getReceiverFirstRep, getReceiverTarget, getResourceType, getStatus, getStatusElement, getStatusReason, getStatusReasonCodeableConcept, getStatusReasonReference, getSubject, getSubjectTarget, getSubstitution, getSupportingInformation, getSupportingInformationFirstRep, getSupportingInformationTarget, getType, getTypesForProperty, getWhenHandedOver, getWhenHandedOverElement, getWhenPrepared, getWhenPreparedElement, hasAuthorizingPrescription, hasCategory, hasContext, hasDaysSupply, hasDestination, hasDetectedIssue, hasDosageInstruction, hasEventHistory, hasIdentifier, hasLocation, hasMedication, hasMedicationCodeableConcept, hasMedicationReference, hasNote, hasPartOf, hasPerformer, hasQuantity, hasReceiver, hasStatus, hasStatusElement, hasStatusReason, hasStatusReasonCodeableConcept, hasStatusReasonReference, hasSubject, hasSubstitution, hasSupportingInformation, hasType, hasWhenHandedOver, hasWhenHandedOverElement, hasWhenPrepared, hasWhenPreparedElement, isEmpty, listChildren, makeProperty, removeChild, setAuthorizingPrescription, setCategory, setContext, setContextTarget, setDaysSupply, setDestination, setDestinationTarget, setDetectedIssue, setDosageInstruction, setEventHistory, setIdentifier, setLocation, setLocationTarget, setMedication, setNote, setPartOf, setPerformer, setProperty, setProperty, setQuantity, setReceiver, setStatus, setStatusElement, setStatusReason, setSubject, setSubjectTarget, setSubstitution, setSupportingInformation, setType, setWhenHandedOver, setWhenHandedOverElement, setWhenPrepared, setWhenPreparedElement, typedCopy
Methods inherited from class org.hl7.fhir.r4.model.DomainResource
addContained, addExtension, addExtension, addExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyValues, getContained, getExtension, getExtensionByUrl, getExtensionsByUrl, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasExtension, hasModifierExtension, hasText, setContained, setExtension, setModifierExtension, setText
Methods inherited from class org.hl7.fhir.r4.model.Resource
copyValues, getId, getIdBase, getIdElement, getIdPart, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
Methods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setId
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, listChildrenByName, 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.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprDocumentAuthorable
copyAuthorDocumentValues, hasAuthorDocument, resolveAuthorDocument, setAuthorDocument, setAuthorDocument
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, hasFormatComment, isEmpty
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
getMeta, getStructureFhirVersionEnum, isDeleted, setId
-
Field Details
-
authorDocument
protected @Nullable org.hl7.fhir.r4.model.Reference authorDocumentAuthor of the original document if different from the author of the medical decision (MedicationDispense.performer.actor). -
parentDocument
Reference to the original document.
-
-
Constructor Details
-
ChEmedEprMedicationDispensePml
public ChEmedEprMedicationDispensePml()Empty constructor for the parser. -
ChEmedEprMedicationDispensePml
Constructor that pre-populates fields.- Parameters:
entryUuid
- The medication dispense id.
-
-
Method Details
-
resolvePerformerActor
@ExpectsValidResource public ChEmedEprPractitionerRole resolvePerformerActor() throws InvalidEmedContentExceptionResolves the author and her/his organization of the medical decision.- Returns:
- the author and her/his organization of the medical decision.
- Throws:
InvalidEmedContentException
- if the author and her/his organization of the medical decision are missing or aren't of the right type.
-
resolveMedication
@ExpectsValidResource public ChEmedEprMedicationDis resolveMedication() throws InvalidEmedContentExceptionResolves the medication or throws.In a PML, the parser has unserialized a ChEmedEprMedication instead of a ChEmedEprMedicationDis, so this method will convert it to the right class.
- Overrides:
resolveMedication
in classChEmedEprMedicationDispense
- Returns:
- the medication.
- Throws:
InvalidEmedContentException
- if the medication is missing or if it isn't of the right type.
-
getAuthorDocument
public org.hl7.fhir.r4.model.Reference getAuthorDocument()Gets the author document element in the medication dispense.- Specified by:
getAuthorDocument
in interfaceChEmedEprDocumentAuthorable<ChEmedEprMedicationDispensePml>
- Returns:
- the author document element.
-
setAuthorDocument
Description copied from interface:ChEmedEprDocumentAuthorable
Sets the authorDocument element in the resource.- Specified by:
setAuthorDocument
in interfaceChEmedEprDocumentAuthorable<ChEmedEprMedicationDispensePml>
- Parameters:
reference
- The reference to be set as authorDocument.- Returns:
- this.
-
setPerformer
Sets the author and her/his organization of the medical decision.- Parameters:
actor
- the author and her/his organization of the medical decision.- Returns:
- this.
-
setPerformer
Sets the author as performer (medical author) of the dispense.- Parameters:
actor
- The author to set as performer.- Returns:
- this.
-
getParentDocumentElement
Gets the parent document element. If it doesn't exist, it is created.- Returns:
- the parent document element.
-
setParentDocumentElement
Sets the parent document reference.- Parameters:
parentDocument
- the parent document reference.- Returns:
- this.
-
hasParentDocument
public boolean hasParentDocument()Returns whether the parent document reference exists.- Returns:
true
if the parent document reference exists,false
otherwise.
-
copy
- Overrides:
copy
in classorg.hl7.fhir.r4.model.MedicationDispense
-
copyValues
public void copyValues(org.hl7.fhir.r4.model.MedicationDispense dst) - Overrides:
copyValues
in classChEmedEprMedicationDispense
-