Class EMediplanPosology

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPosology
All Implemented Interfaces:
EMediplanObject
Direct Known Subclasses:
ChMed16APosology, ChMed23APosology

public abstract class EMediplanPosology extends Object implements EMediplanObject
Base class for an eMediplan posology object.
  • Field Details

    • DEFAULT_AS_NEEDED_VALUE

      protected static final boolean DEFAULT_AS_NEEDED_VALUE
      See Also:
  • Constructor Details

    • EMediplanPosology

      public EMediplanPosology()
  • Method Details

    • getStart

      public abstract @Nullable Instant getStart()
    • getEnd

      public abstract @Nullable Instant getEnd()
    • isAsNeeded

      public final boolean isAsNeeded()
      An alias for isInReserve().
    • isInReserve

      protected abstract boolean isInReserve()
      Returns:
      Whether the medication is in reserve or not. That is, whether it is to be taken only when needed (true) or strictly as defined by the posology (false).
    • setAsNeeded

      public abstract void setAsNeeded(@Nullable Boolean inReserve)
    • validate

      public ValidationResult validate(@Nullable String basePath)
      Description copied from interface: EMediplanObject
      Validates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.
      Specified by:
      validate in interface EMediplanObject
      Parameters:
      basePath - The JSON path of this object. If null, the object is considered to be root. Any validation issues produced by the validation will use this path as a base for each issue's path.
      Returns:
      The validation result containing all the encountered validation issues, if any.