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 Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable List<@NonNull EMediplanExtension>
Extensions.protected @Nullable Double
Height in cm.protected @Nullable LocalDate
First day of last menstruation, format: yyyy-mm-dd (ISO 86017 Date).protected static final String
protected @Nullable Boolean
True if it is a premature baby (and only if age <= 18 months), false otherwise.protected @Nullable List<@NonNull EMediplanRiskList>
Risks per category.static final Pattern
protected @Nullable String
The time of gestation, should usually only be filled if prematureBaby is true.protected @Nullable Double
Weight in kg. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRisk
(EMediplanRisk risk) Convenience method to add a risk to a medical data object.List<@NonNull EMediplanExtension>
Gets the list of this object's extensions.List<@NonNull EMediplanRiskList>
getRisks()
void
trim()
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.Validates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.Performs context-aware validation of the object, including the base context-unaware validation.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.model.emediplan.EMediplanExtendable
addExtension, findExtension
Methods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
TIME_OF_GESTATION_PATTERN
-
PREMATURE_BABY_FIELD_NAME
- See Also:
-
lastMenstruation
First day of last menstruation, format: yyyy-mm-dd (ISO 86017 Date). Only required in case of risk code 78, category code 3 (seeEMediplanRisk
). -
prematureBaby
True if it is a premature baby (and only if age <= 18 months), false otherwise. -
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
Risks per category. SeeEMediplanRisk
andEMediplanRiskList
.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
Weight in kg. -
height
Height in cm. -
extensions
Extensions.
-
-
Constructor Details
-
EMediplanPatientMedicalData
public EMediplanPatientMedicalData()
-
-
Method Details
-
getRisks
-
getExtensions
Description copied from interface:EMediplanExtendable
Gets the list of this object's extensions.- Specified by:
getExtensions
in interfaceEMediplanExtendable
- Returns:
- The list of extensions.
-
validate
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 interfaceEMediplanObject
- Parameters:
basePath
- The JSON path of this object. Ifnull
, 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
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 interfaceEMediplanObject
-
addRisk
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.
-