Class ChEmedEprMedicationStatementPmlc

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.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, ChEmedEprDocumentAuthorable<ChEmedEprMedicationStatementPmlBase>, ChEmedEprEntry

public class ChEmedEprMedicationStatementPmlc extends ChEmedEprMedicationStatementPmlBase
The HAPI custom structure for CH-EMED-EPR MedicationStatement (PMLC).
Author:
Quentin Ligier
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.MedicationStatement

    org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus, org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatusEnumFactory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected @Nullable ChEmedExtPrescription
    Reference to the PRE that introduced this medication in the treatment plan.
    protected @Nullable ChEmedExtTreatmentPlan
    Reference to the MTP that introduced this medication in the treatment plan.

    Fields inherited from class org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationStatementPmlBase

    authorDocument

    Fields inherited from class org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationStatement

    substitution

    Fields inherited from class org.hl7.fhir.r4.model.MedicationStatement

    basedOn, basedOnTarget, category, CATEGORY, CODE, context, CONTEXT, contextTarget, dateAsserted, derivedFrom, derivedFromTarget, dosage, effective, EFFECTIVE, identifier, IDENTIFIER, INCLUDE_CONTEXT, INCLUDE_MEDICATION, INCLUDE_PART_OF, INCLUDE_PATIENT, INCLUDE_SOURCE, INCLUDE_SUBJECT, informationSource, informationSourceTarget, medication, MEDICATION, note, PART_OF, partOf, partOfTarget, PATIENT, reasonCode, reasonReference, reasonReferenceTarget, SOURCE, SP_CATEGORY, SP_CODE, SP_CONTEXT, SP_EFFECTIVE, SP_IDENTIFIER, SP_MEDICATION, SP_PART_OF, SP_PATIENT, SP_SOURCE, SP_STATUS, SP_SUBJECT, status, STATUS, statusReason, subject, SUBJECT, subjectTarget

    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

    Constructors
    Constructor
    Description
    Empty constructor for the parser.
    Constructor that pre-populates fields.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    copyValues(org.hl7.fhir.r4.model.MedicationStatement dst)
    Copies the content from this statement to a destination statement.
    Gets the prescription element.
    Gets the treatment plan element.
    boolean
    Returns whether the prescription reference.
    boolean
    Returns whether the treatment plan reference.
    static boolean
    isPmlcStatementShownInMedicationCard(Instant evaluationTime, org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus status, ChEmedEprDosage baseDosage)
    Checks whether a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified evaluation time or not.
    boolean
    Checks whether a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified evaluation time or not.
    Sets the prescription reference.
    Sets the treatment plan reference.

    Methods inherited from class org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprMedicationStatementPmlBase

    getAuthorDocument, resolveInformationSource, setAuthorDocument

    Methods inherited from class org.hl7.fhir.r4.model.MedicationStatement

    addBasedOn, addBasedOn, addChild, addDerivedFrom, addDerivedFrom, addIdentifier, addIdentifier, addNote, addNote, addPartOf, addPartOf, addReasonCode, addReasonCode, addReasonReference, addReasonReference, addStatusReason, addStatusReason, equalsDeep, equalsShallow, fhirType, getBasedOn, getBasedOnFirstRep, getBasedOnTarget, getCategory, getContext, getContextTarget, getDateAsserted, getDateAssertedElement, getDerivedFrom, getDerivedFromFirstRep, getDerivedFromTarget, getEffective, getEffectiveDateTimeType, getEffectivePeriod, getIdentifier, getIdentifierFirstRep, getInformationSource, getInformationSourceTarget, getMedication, getMedicationCodeableConcept, getMedicationReference, getNamedProperty, getNote, getNoteFirstRep, getPartOf, getPartOfFirstRep, getPartOfTarget, getProperty, getReasonCode, getReasonCodeFirstRep, getReasonReference, getReasonReferenceFirstRep, getReasonReferenceTarget, getResourceType, getStatus, getStatusElement, getStatusReason, getStatusReasonFirstRep, getSubject, getSubjectTarget, getTypesForProperty, hasBasedOn, hasCategory, hasContext, hasDateAsserted, hasDateAssertedElement, hasDerivedFrom, hasDosage, hasEffective, hasEffectiveDateTimeType, hasEffectivePeriod, hasIdentifier, hasInformationSource, hasMedication, hasMedicationCodeableConcept, hasMedicationReference, hasNote, hasPartOf, hasReasonCode, hasReasonReference, hasStatus, hasStatusElement, hasStatusReason, hasSubject, isEmpty, listChildren, makeProperty, removeChild, setBasedOn, setCategory, setContext, setContextTarget, setDateAsserted, setDateAssertedElement, setDerivedFrom, setDosage, setEffective, setIdentifier, setInformationSource, setInformationSourceTarget, setMedication, setNote, setPartOf, setProperty, setProperty, setReasonCode, setReasonReference, setStatus, setStatusElement, setStatusReason, setSubject, setSubjectTarget, 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

    • treatmentPlan

      protected @Nullable ChEmedExtTreatmentPlan treatmentPlan
      Reference to the MTP that introduced this medication in the treatment plan.
    • prescription

      protected @Nullable ChEmedExtPrescription prescription
      Reference to the PRE that introduced this medication in the treatment plan.
  • Constructor Details

    • ChEmedEprMedicationStatementPmlc

      public ChEmedEprMedicationStatementPmlc()
      Empty constructor for the parser.
    • ChEmedEprMedicationStatementPmlc

      public ChEmedEprMedicationStatementPmlc(UUID entryUuid)
      Constructor that pre-populates fields.
      Parameters:
      entryUuid - the uuid of the medication statement.
  • Method Details

    • getTreatmentPlanElement

      public ChEmedExtTreatmentPlan getTreatmentPlanElement()
      Gets the treatment plan element. If it doesn't exist, it is created.
      Returns:
      the treatment plan element.
    • getPrescriptionElement

      public ChEmedExtPrescription getPrescriptionElement()
      Gets the prescription element. If it doesn't exist, it is created.
      Returns:
      the prescription element.
    • setTreatmentPlanElement

      public ChEmedEprMedicationStatementPmlc setTreatmentPlanElement(ChEmedExtTreatmentPlan treatmentPlan)
      Sets the treatment plan reference.
      Parameters:
      treatmentPlan - the treatment plan reference.
      Returns:
      this.
    • setTreatmentPlanElement

      public ChEmedEprMedicationStatementPmlc setTreatmentPlanElement(ChEmedExtPrescription prescription)
      Sets the prescription reference.
      Parameters:
      prescription - the prescription reference.
      Returns:
      this.
    • hasTreatmentPlan

      public boolean hasTreatmentPlan()
      Returns whether the treatment plan reference.
      Returns:
      true if the treatment plan reference exists, false otherwise.
    • hasPrescription

      public boolean hasPrescription()
      Returns whether the prescription reference.
      Returns:
      true if the prescription reference exists, false otherwise.
    • copy

      Overrides:
      copy in class org.hl7.fhir.r4.model.MedicationStatement
    • copyValues

      public void copyValues(org.hl7.fhir.r4.model.MedicationStatement dst)
      Description copied from class: ChEmedEprMedicationStatementPmlBase
      Copies the content from this statement to a destination statement.
      Overrides:
      copyValues in class ChEmedEprMedicationStatementPmlBase
      Parameters:
      dst - The destination statement.
    • isShownInMedicationCard

      public boolean isShownInMedicationCard(Instant evaluationTime)
      Checks whether a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified evaluation time or not. Relies on isPmlcStatementShownInMedicationCard().
      Parameters:
      evaluationTime - Time of generation of the medication card.
      Returns:
      True if a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified time. False otherwise.
    • isPmlcStatementShownInMedicationCard

      public static boolean isPmlcStatementShownInMedicationCard(Instant evaluationTime, org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatus status, ChEmedEprDosage baseDosage)
      Checks whether a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified evaluation time or not.
      Parameters:
      evaluationTime - Time of generation of the medication card.
      status - The status of the medication statement.
      baseDosage - The base dosage resource of the medication statement.
      Returns:
      True if a medication statement with the specified status and base dosage is to be included in a generated medication card at the specified time. False otherwise.