Class EMediplanPatientMedicalData

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatientMedicalData
All Implemented Interfaces:
EMediplanExtendable, EMediplanObject

public class EMediplanPatientMedicalData extends Object implements EMediplanExtendable, EMediplanObject
  • Field Details

    • TIME_OF_GESTATION_PATTERN

      public static final Pattern TIME_OF_GESTATION_PATTERN
    • PREMATURE_BABY_FIELD_NAME

      protected static final String PREMATURE_BABY_FIELD_NAME
      See Also:
    • lastMenstruation

      protected @Nullable LocalDate lastMenstruation
      First day of last menstruation, format: yyyy-mm-dd (ISO 86017 Date). Only required in case of risk code 78, category code 3 (see EMediplanRisk).
    • prematureBaby

      protected @Nullable Boolean prematureBaby
      True if it is a premature baby (and only if age <= 18 months), false otherwise.
    • timeOfGestation

      protected @Nullable String timeOfGestation
      The time of gestation, should usually only be filled if prematureBaby is true. Format: {week}-{day}, week is a natural number including 0, day excluding 0.
    • risks

      protected @Nullable List<@NonNull EMediplanRiskList> risks
      Risks per category. See EMediplanRisk and EMediplanRiskList.

      If a risk category is specified but empty, is considered as explicitly excluded for the current patient. If the category does not exist, the risks are considered to be unknown for the patient.

    • weight

      protected @Nullable Double weight
      Weight in kg.
    • height

      protected @Nullable Double height
      Height in cm.
    • extensions

      protected @Nullable List<@NonNull EMediplanExtension> extensions
      Extensions.
  • Constructor Details

    • EMediplanPatientMedicalData

      public EMediplanPatientMedicalData()
  • Method Details

    • getRisks

      public List<@NonNull EMediplanRiskList> getRisks()
    • getExtensions

      public List<@NonNull EMediplanExtension> getExtensions()
      Description copied from interface: EMediplanExtendable
      Gets the list of this object's extensions.
      Specified by:
      getExtensions in interface EMediplanExtendable
      Returns:
      The list of extensions.
    • 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.
    • validate

      public ValidationResult validate(@Nullable String basePath, @Nullable Period age)
      Performs context-aware validation of the object, including the base context-unaware validation.
      Parameters:
      basePath - The object's JSON path.
      age - The age of the patient at the time of the document creation.
      Returns:
      The validation result.
    • trim

      public void trim()
      Description copied from interface: EMediplanObject
      Trims the eMediplan object, that is, removes any redundant info and sets to null values that match the default assumed value by the specs, to shorten the serialized result.
      Specified by:
      trim in interface EMediplanObject
    • addRisk

      @ExpectsValidResource public void addRisk(EMediplanRisk risk)
      Convenience method to add a risk to a medical data object. It will search for the appropriate list per category to which to append the new risk and, if the category does not exist in the list, it creates it.
      Parameters:
      risk - The risk to be added to the lists of risks.