Class EMediplanPosology
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.posology.EMediplanPosology
- All Implemented Interfaces:
EMediplanObject
Describes when and what amount of medication must be taken.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable String
Application instructions.protected @Nullable Boolean
Reserve medication.protected static final boolean
protected PosologyDetail
Dosage details.protected static final String
protected @Nullable Instant
To date.protected @Nullable String
protected @Nullable RelativeToMeal
Indicates whether a medication has to be taken relative to a meal.protected @Nullable String
protected @Nullable Instant
From date.protected @Nullable CdTyp9
The quantity unit.protected static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected boolean
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.validate
(@Nullable String basePath, EMediplanType mediplanType) Performs validation of the eMediplan object taking into account whether it belongs to an eMediplan medication plan document or to an eMediplan prescription document.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.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
DEFAULT_AS_NEEDED_VALUE
protected static final boolean DEFAULT_AS_NEEDED_VALUE- See Also:
-
DETAIL_FIELD_NAME
- See Also:
-
UNIT_FIELD_NAME
- See Also:
-
start
From date. Format: YYYY-MM-DDThh:mm:ss+02:00 or YYYY-MM-DD (ISO 860113 Combined date and time including time zone or date only) (e.g. 2016-06-16T16:26:15+02:00). -
end
To date. Format: YYYY-MM-DDThh:mm:ss+02:00 or YYYY-MM-DD (ISO 860114 Combined date and time including time zone or date only) (e.g. 2016-06-16T16:26:15+02:00). The DtTo must be considered as inclusive. For example, DtTo: 2015-05-01, the patient must apply the medicament also on 2015-05-01. -
asNeeded
Reserve medication. True if in reserve, false otherwise. By default, false is assumed. -
detail
Dosage details. -
relativeToMeal
Indicates whether a medication has to be taken relative to a meal. -
unit
The quantity unit. See allowed values. -
applicationInstructions
Application instructions. Further information on how to apply the medication. Do not use for unstructured dosage information; use the inner posology object's free text instead. -
routeOfAdministration
-
methodOfAdministration
-
-
Constructor Details
-
EMediplanPosology
public EMediplanPosology()
-
-
Method Details
-
isAsNeeded
protected boolean isAsNeeded() -
isInReserve
protected boolean isInReserve() -
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 validation of the eMediplan object taking into account whether it belongs to an eMediplan medication plan document or to an eMediplan prescription document. This performs the base checks ofvalidate(String)
plus extra validation checks tied to the eMediplan document type.- Parameters:
basePath
- The base path of the object.mediplanType
- The type of eMediplan document.- 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
-