Class ChMed16APatientMedicalData
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatientMedicalData<ChMed16AExtension>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed16a.ChMed16APatientMedicalData
- All Implemented Interfaces:
ChMed16AExtendable,EMediplanExtendable<ChMed16AExtension>,EMediplanObject
public class ChMed16APatientMedicalData
extends EMediplanPatientMedicalData<ChMed16AExtension>
implements ChMed16AExtendable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable List<@NonNull ChMed16AExtension> protected static final Stringprotected @Nullable LocalDateFirst day of last menstruation, format: yyyy-mm-dd (ISO 86017 Date).protected @Nullable List<@NonNull ChMed16APatientMedicalDataMeasurement> protected static final Stringprotected static final Stringprotected @Nullable Integer1 if it is a premature baby, 0 otherwise (only if age invalid input: '<'= 18 months)protected @Nullable List<@NonNull EMediplanRiskList> Risks per category.protected static final Stringprotected @Nullable StringThe time of gestation, should usually only be filled if prematureBaby is true.Fields inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatientMedicalData
TIME_OF_GESTATION_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMeasurement(ChMed16APatientMedicalDataMeasurement measurement) List<@NonNull ChMed16AExtension> Gets the list of this object's extensions.List<@NonNull ChMed16APatientMedicalDataMeasurement> @Nullable BooleanList<@NonNull EMediplanRiskList> getRisks()booleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.@Nullable BooleanWhether the patient is a premature baby or not.voidtrim()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.Methods inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatientMedicalData
addRisk, getLastMenstruation, getTimeOfGestation, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed16a.ChMed16AExtendable
findExtension, getExtensionsFieldNameMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanExtendable
addExtension, validateExtensionsMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
PREMATURE_BABY_FIELD_NAME
- See Also:
-
TIME_OF_GESTATION_FIELD_NAME
- See Also:
-
LAST_MENSTRUATION_FIELD_NAME
- See Also:
-
MEASUREMENTS_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
1 if it is a premature baby, 0 otherwise (only if age invalid input: '<'= 18 months) -
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. SeeEMediplanRiskandEMediplanRiskList.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.
-
measurements
-
extensions
-
-
Constructor Details
-
ChMed16APatientMedicalData
public ChMed16APatientMedicalData()
-
-
Method Details
-
isPrematureBaby
Whether the patient is a premature baby or not. Take into account that calling this method makes sense only when the age of the patient is lesser or equal than 18 months, but this method does not perform any such checks and will return the result solely based on the content of the underlying property.- Specified by:
isPrematureBabyin classEMediplanPatientMedicalData<ChMed16AExtension>- Returns:
trueif the eMediplan document explicitly declares the baby to be prematurefalseif the eMediplan document explicitly declares the baby not to be prematurenullif there is no explicit declaration or if there is but its content is not valid (i.e. neither0nor1)
invalid input: '<'/ul
-
getPrematureBabyFieldName
- Specified by:
getPrematureBabyFieldNamein classEMediplanPatientMedicalData<ChMed16AExtension>
-
getTimeOfGestationFieldName
- Specified by:
getTimeOfGestationFieldNamein classEMediplanPatientMedicalData<ChMed16AExtension>
-
getLastMenstruationFieldName
- Specified by:
getLastMenstruationFieldNamein classEMediplanPatientMedicalData<ChMed16AExtension>
-
getPrematureBaby
-
getRisks
- Specified by:
getRisksin classEMediplanPatientMedicalData<ChMed16AExtension>
-
getMeasurements
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<ChMed16AExtension>- Returns:
- The list of extensions.
-
addMeasurement
-
validate
Description copied from interface:EMediplanObjectValidates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.- Specified by:
validatein interfaceEMediplanObject- Overrides:
validatein classEMediplanPatientMedicalData<ChMed16AExtension>- 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.
-
hasExtensions
public boolean hasExtensions(boolean inDepth) Description copied from interface:EMediplanObjectWhether the eMediplan object has any extension or not.- Specified by:
hasExtensionsin interfaceEMediplanObject- Parameters:
inDepth- Iftrue, the called object, and all its children objects, are subject to the check. Iffalse, only the called object is checked for extensions.- Returns:
trueif the object contains any extensions;falseotherwise.
-
trim
public void trim()Description copied from interface:EMediplanObjectTrims 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:
trimin interfaceEMediplanExtendable<ChMed16AExtension>- Specified by:
trimin interfaceEMediplanObject- Overrides:
trimin classEMediplanPatientMedicalData<ChMed16AExtension>
-