Class ChEmedEprDosage

java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.Element
org.hl7.fhir.r4.model.Type
org.hl7.fhir.r4.model.BackboneType
org.hl7.fhir.r4.model.Dosage
org.projecthusky.fhir.emed.ch.epr.datatypes.ChEmedEprDosage
All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseBackboneElement, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions, org.hl7.fhir.instance.model.api.ICompositeType

public class ChEmedEprDosage extends org.hl7.fhir.r4.model.Dosage
The HAPI custom structure for CH-EMED-Dosage.
Author:
Ronaldo Loureiro
See Also:
  • Nested Class Summary

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

    org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent
  • Field Summary

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

    additionalInstruction, asNeeded, doseAndRate, maxDosePerAdministration, maxDosePerLifetime, maxDosePerPeriod, method, patientInstruction, route, sequence, site, text, timing

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

    modifierExtension

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

    extension, id
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds an event timing for time period occurrence.
     
    org.hl7.fhir.r4.model.Period
    Gets the start and/or end of treatment.
    @Nullable Instant
    Returns the bounds period end time as an inclusive instant, or null if it is not specified.
    @Nullable Instant
    Returns the bounds period start time as an inclusive instant, or null if it is not specified.
    @Nullable String
    Returns the site text, either the `site.text` element or the first `site.coding.text` that is filled.
    boolean
    Return whether the start and/or end of treatment.
    boolean
    Return whether a code for time period of occurrence.
    boolean
    Returns whether the dosage is 'as needed'.
    @Nullable Duration
    Resolves the treatment duration, if specified.
    @Nullable Dose
    Resolve the dose.
    @Nullable AmountQuantity
    Returns the resolved max dose per administration, or null if it is not specified.
    @Nullable AmountQuantity
    Returns the resolved max dose per lifetime, or null if it is not specified.
    Returns the resolved max dose per period, or null if it is not specified.
    Resolve the routeOfAdministration of administration.
    Resolves the list of with event timings.
    setBoundsPeriod(org.hl7.fhir.r4.model.Period boundsPeriod)
    Sets start and/or end of treatment.
    Sets the dose quantity.
    Sets the dose range.
    setPatientInstruction(String patientInstruction)
    Sets patient medication instructions.
    Sets routeOfAdministration of administration.

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

    addAdditionalInstruction, addAdditionalInstruction, addChild, addDoseAndRate, addDoseAndRate, copyValues, equalsDeep, equalsShallow, fhirType, getAdditionalInstruction, getAdditionalInstructionFirstRep, getAsNeeded, getAsNeededBooleanType, getAsNeededCodeableConcept, getDoseAndRate, getDoseAndRateFirstRep, getMaxDosePerAdministration, getMaxDosePerLifetime, getMaxDosePerPeriod, getMethod, getNamedProperty, getPatientInstruction, getPatientInstructionElement, getProperty, getRoute, getSequence, getSequenceElement, getSite, getText, getTextElement, getTiming, getTypesForProperty, hasAdditionalInstruction, hasAsNeeded, hasAsNeededBooleanType, hasAsNeededCodeableConcept, hasDoseAndRate, hasMaxDosePerAdministration, hasMaxDosePerLifetime, hasMaxDosePerPeriod, hasMethod, hasPatientInstruction, hasPatientInstructionElement, hasRoute, hasSequence, hasSequenceElement, hasSite, hasText, hasTextElement, hasTiming, isEmpty, listChildren, makeProperty, removeChild, setAdditionalInstruction, setAsNeeded, setDoseAndRate, setMaxDosePerAdministration, setMaxDosePerLifetime, setMaxDosePerPeriod, setMethod, setPatientInstructionElement, setProperty, setProperty, setRoute, setSequence, setSequenceElement, setSite, setText, setTextElement, setTiming, typedCopy

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

    addModifierExtension, addModifierExtension, checkNoModifiers, copyExtensions, copyNewExtensions, copyValues, getExtensionsByUrl, getModifierExtension, getModifierExtensionFirstRep, hasExtension, hasExtension, hasModifierExtension, setModifierExtension

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

    addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement

    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, isResource, 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.hl7.fhir.instance.model.api.IBase

    getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData

    Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement

    getUserData, setUserData

    Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasExtensions

    addExtension, getExtension, hasExtension
  • Constructor Details

    • ChEmedEprDosage

      public ChEmedEprDosage()
      Empty constructor
  • Method Details

    • resolveWhen

      Resolves the list of with event timings.
      Returns:
      the list of with event timings.
      Throws:
      InvalidEmedContentException - if dosage for time period of occurrence is invalid.
    • resolveRouteOfAdministration

      @ExpectsValidResource public @Nullable RouteOfAdministrationEdqm resolveRouteOfAdministration() throws InvalidEmedContentException
      Resolve the routeOfAdministration of administration.
      Returns:
      the routeOfAdministration of administration or null.
      Throws:
      InvalidEmedContentException - if the routeOfAdministration of administration is invalid.
    • resolveDose

      @ExpectsValidResource public @Nullable Dose resolveDose() throws InvalidEmedContentException
      Resolve the dose.
      Returns:
      the dose or null if it is not specified.
      Throws:
      InvalidEmedContentException
    • isAsNeeded

      public boolean isAsNeeded()
      Returns whether the dosage is 'as needed'.
    • getBoundsPeriod

      public org.hl7.fhir.r4.model.Period getBoundsPeriod()
      Gets the start and/or end of treatment. If it doesn't exist, it is created.
      Returns:
      the start and/or end of treatment.
    • resolveBoundsDuration

      @ExpectsValidResource public @Nullable Duration resolveBoundsDuration()
      Resolves the treatment duration, if specified.
      Returns:
      the treatment duration or null.
    • setPatientInstruction

      public ChEmedEprDosage setPatientInstruction(String patientInstruction)
      Sets patient medication instructions.
      Overrides:
      setPatientInstruction in class org.hl7.fhir.r4.model.Dosage
      Parameters:
      patientInstruction - Instructions in terms that are understood by the patient or consumer.
      Returns:
      this.
    • setBoundsPeriod

      public ChEmedEprDosage setBoundsPeriod(org.hl7.fhir.r4.model.Period boundsPeriod)
      Sets start and/or end of treatment.
      Parameters:
      boundsPeriod - start and/or end of treatment.
      Returns:
      this.
    • setRouteOfAdministration

      public ChEmedEprDosage setRouteOfAdministration(RouteOfAdministrationEdqm routeOfAdministration)
      Sets routeOfAdministration of administration.
      Parameters:
      routeOfAdministration - the routeOfAdministration of administration.
      Returns:
      this.
    • setDoseQuantity

      public ChEmedEprDosage setDoseQuantity(ChEmedQuantityWithEmedUnits doseQuantity)
      Sets the dose quantity.
      Parameters:
      doseQuantity - the dose quantity.
      Returns:
      this.
    • setDoseRange

      public ChEmedEprDosage setDoseRange(ChEmedQuantityWithEmedUnits doseRange)
      Sets the dose range.
      Parameters:
      doseRange - the dose range.
      Returns:
      this.
    • addWhen

      public ChEmedEprDosage addWhen(TimingEventAmbu timing)
      Adds an event timing for time period occurrence.
      Parameters:
      timing - the event timing.
      Returns:
      this.
    • hasWhen

      public boolean hasWhen()
      Return whether a code for time period of occurrence.
      Returns:
      true if a code for time period of occurrence exists, false otherwise.
    • hasBoundsPeriod

      public boolean hasBoundsPeriod()
      Return whether the start and/or end of treatment.
      Returns:
      true if the start and/or end of treatment exists, false otherwise.
    • getInclusiveStartTime

      public @Nullable Instant getInclusiveStartTime()
      Returns the bounds period start time as an inclusive instant, or null if it is not specified.
      Returns:
      the bounds period start time or null.
    • getInclusiveEndTime

      public @Nullable Instant getInclusiveEndTime()
      Returns the bounds period end time as an inclusive instant, or null if it is not specified.
      Returns:
      the bounds period end time or null.
      Implementation Note:
      boundsPeriod.getEnd().toInstant() returns the earliest instant covered by the partial date. Here, we want the latest instant so we use Husky's time utilities.
    • getSiteText

      public @Nullable String getSiteText()
      Returns the site text, either the `site.text` element or the first `site.coding.text` that is filled.
    • resolveMaxDosePerPeriod

      @ExpectsValidResource public @Nullable AmountPerDuration resolveMaxDosePerPeriod()
      Returns the resolved max dose per period, or null if it is not specified. Throws if it is specified but invalid.
    • resolveMaxDosePerAdministration

      @ExpectsValidResource public @Nullable AmountQuantity resolveMaxDosePerAdministration()
      Returns the resolved max dose per administration, or null if it is not specified. Throws if it is specified but invalid.
    • resolveMaxDosePerLifetime

      @ExpectsValidResource public @Nullable AmountQuantity resolveMaxDosePerLifetime()
      Returns the resolved max dose per lifetime, or null if it is not specified. Throws if it is specified but invalid.
    • copy

      public ChEmedEprDosage copy()
      Overrides:
      copy in class org.hl7.fhir.r4.model.Dosage