Record Class EffectiveDosageInstructions

java.lang.Object
java.lang.Record
org.projecthusky.fhir.emed.ch.epr.model.common.EffectiveDosageInstructions

public record EffectiveDosageInstructions(@Nullable String patientInstructions, String narrative, boolean isAsNeeded, List<DosageIntake> intakes, @Nullable Dose simpleDose, @Nullable List<TimingEventAmbu> simpleEventTimings, @Nullable String site, @Nullable RouteOfAdministrationEdqm routeOfAdministration, @Nullable org.hl7.fhir.r4.model.Period period, @Nullable AmountPerDuration maxDosePerPeriod, @Nullable AmountQuantity maxDosePerAdministration) extends Record
A model of the effective dosage, resolved from a list of FHIR Dosages.
Author:
Quentin Ligier
  • Constructor Details

    • EffectiveDosageInstructions

      public EffectiveDosageInstructions(@Nullable String patientInstructions, String narrative, boolean isAsNeeded, List<DosageIntake> intakes, @Nullable Dose simpleDose, @Nullable List<TimingEventAmbu> simpleEventTimings, @Nullable String site, @Nullable RouteOfAdministrationEdqm routeOfAdministration, @Nullable org.hl7.fhir.r4.model.Period period, @Nullable AmountPerDuration maxDosePerPeriod, @Nullable AmountQuantity maxDosePerAdministration)
      Creates an instance of a EffectiveDosageInstructions record class.
      Parameters:
      patientInstructions - the value for the patientInstructions record component
      narrative - the value for the narrative record component
      isAsNeeded - the value for the isAsNeeded record component
      intakes - the value for the intakes record component
      simpleDose - the value for the simpleDose record component
      simpleEventTimings - the value for the simpleEventTimings record component
      site - the value for the site record component
      routeOfAdministration - the value for the routeOfAdministration record component
      period - the value for the period record component
      maxDosePerPeriod - the value for the maxDosePerPeriod record component
      maxDosePerAdministration - the value for the maxDosePerAdministration record component
  • Method Details

    • hasPatientInstructions

      public boolean hasPatientInstructions()
    • hasRouteOfAdministration

      public boolean hasRouteOfAdministration()
    • hasIntakes

      public boolean hasIntakes()
    • hasMaxDose

      public boolean hasMaxDose()
    • hasSimpleDose

      public boolean hasSimpleDose()
    • hasSimpleEventTimings

      public boolean hasSimpleEventTimings()
    • hasSimpleEventTiming

      public boolean hasSimpleEventTiming(TimingEventAmbu timing)
    • hasMorningSimpleEventTiming

      public boolean hasMorningSimpleEventTiming()
    • hasNoonSimpleEventTiming

      public boolean hasNoonSimpleEventTiming()
    • hasEveningSimpleEventTiming

      public boolean hasEveningSimpleEventTiming()
    • hasNightSimpleEventTiming

      public boolean hasNightSimpleEventTiming()
    • getMornIntake

      public @Nullable DosageIntake getMornIntake()
    • getNoonIntake

      public @Nullable DosageIntake getNoonIntake()
    • getEveIntake

      public @Nullable DosageIntake getEveIntake()
    • getNightIntake

      public @Nullable DosageIntake getNightIntake()
    • getIntake

      public @Nullable DosageIntake getIntake(TimingEventAmbu eventTiming)
    • isRegular

      public boolean isRegular()
      Whether the treatment is "regular" (i.e. to be taken without condition). If false, it's as needed.
    • fromDosages

      public static EffectiveDosageInstructions fromDosages(ChEmedEprDosage baseDosage, List<ChEmedEprDosage> additionalDosages)
      Creates an instance from the base and additional dosages.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • patientInstructions

      public @Nullable String patientInstructions()
      Returns the value of the patientInstructions record component.
      Returns:
      the value of the patientInstructions record component
    • narrative

      public String narrative()
      Returns the value of the narrative record component.
      Returns:
      the value of the narrative record component
    • isAsNeeded

      public boolean isAsNeeded()
      Returns the value of the isAsNeeded record component.
      Returns:
      the value of the isAsNeeded record component
    • intakes

      public List<DosageIntake> intakes()
      Returns the value of the intakes record component.
      Returns:
      the value of the intakes record component
    • simpleDose

      public @Nullable Dose simpleDose()
      Returns the value of the simpleDose record component.
      Returns:
      the value of the simpleDose record component
    • simpleEventTimings

      public @Nullable List<TimingEventAmbu> simpleEventTimings()
      Returns the value of the simpleEventTimings record component.
      Returns:
      the value of the simpleEventTimings record component
    • site

      public @Nullable String site()
      Returns the value of the site record component.
      Returns:
      the value of the site record component
    • routeOfAdministration

      public @Nullable RouteOfAdministrationEdqm routeOfAdministration()
      Returns the value of the routeOfAdministration record component.
      Returns:
      the value of the routeOfAdministration record component
    • period

      public @Nullable org.hl7.fhir.r4.model.Period period()
      Returns the value of the period record component.
      Returns:
      the value of the period record component
    • maxDosePerPeriod

      public @Nullable AmountPerDuration maxDosePerPeriod()
      Returns the value of the maxDosePerPeriod record component.
      Returns:
      the value of the maxDosePerPeriod record component
    • maxDosePerAdministration

      public @Nullable AmountQuantity maxDosePerAdministration()
      Returns the value of the maxDosePerAdministration record component.
      Returns:
      the value of the maxDosePerAdministration record component