Class EMediplanMedicament
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanMedicament
- All Implemented Interfaces:
EMediplanExtendable,EMediplanObject
Information about a medication as well as its dosage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Doubleprotected static final Repetitionprotected @Nullable List<@NonNull EMediplanExtension>The list of extensions.protected static final Stringprotected @Nullable Booleantrueif the medication should not be substituted,falseotherwise.protected StringThe id defined of the type specified by idType.protected static final Stringprotected static final Stringprotected MedicamentIdTypeThe type of id.protected static final Stringprotected @Nullable DoubleNumber of packages to be delivered.protected List<@NonNull EMediplanPosology>List of posologies (dosage information).protected static final Stringprotected @Nullable StringPrescribed by: the GLN or designation of the prescriber (e.g.protected static final Stringprotected @Nullable StringReason for applying the medication, i.e.protected @Nullable RepetitionThe repetition object indicates how often a prescription can be repeated or how long the prescription is valid.protected static final Stringprotected static final Stringprotected @Nullable BooleanWhether it is self-medication treatment (true) or not (false).protected @Nullable BooleanSic era scriptum.protected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<@NonNull EMediplanExtension>Gets the list of this object's extensions.booleanbooleanisSic()booleanvoidtrim()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) Context-aware validation, that takes into account whether the eMediplan document is a treatment plan or a prescription.protected ValidationResultvalidateBase(@Nullable String basePath, boolean contextAwareCaller) Methods 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.EMediplanExtendable
addExtension, findExtensionMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
ID_FIELD_NAME
- See Also:
-
ID_TYPE_FIELD_NAME
- See Also:
-
POSOLOGY_FIELD_NAME
- See Also:
-
SELF_MEDICATION_FIELD_NAME
- See Also:
-
PRESCRIBER_FIELD_NAME
- See Also:
-
REPETITION_FIELD_NAME
- See Also:
-
SIC_FIELD_NAME
- See Also:
-
NUMBER_OF_PACKAGES_FIELD_NAME
- See Also:
-
EXTENSIONS_FIELD_NAME
- See Also:
-
DEFAULT_NUMBER_OF_PACKAGES
-
DEFAULT_REPETITION
-
id
The id defined of the type specified by idType. If idType is NONE, then add a free text description here. -
idType
The type of id. -
posology
List of posologies (dosage information). -
reason
Reason for applying the medication, i.e. reason for treatment. -
selfMedication
Whether it is self-medication treatment (true) or not (false). -
prescriber
Prescribed by: the GLN or designation of the prescriber (e.g. physician, pharmacist...). -
repetition
The repetition object indicates how often a prescription can be repeated or how long the prescription is valid.If no repetition object is set, a
RepetitionDurationis assumed with value 1, that is: the prescription can be repeated once. This means the prescription would be allow to be dispensed twice: the initial dispense that is always allowed plus the one repetition that is assumed by default.If the dispense is not to be allowed to be done more than once, it is required to set a repetition object with value 0 (no repetition).
-
forbidSubstitution
trueif the medication should not be substituted,falseotherwise. By default, false is assumed. -
sic
Sic era scriptum. This field is intended to avoid misunderstandings between the physician and pharmacist and indicates to the pharmacist that the physician has deliberately chosen the prescription and wishes to prescribe the drug in exactly this way and not otherwise. By default, false is assumed. -
numberOfPackages
Number of packages to be delivered. By default, 1 is assumed for prescriptions, for medication plans it is ignored. -
extensions
The list of extensions. Optional if empty.
-
-
Constructor Details
-
EMediplanMedicament
public EMediplanMedicament()
-
-
Method Details
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable- Returns:
- The list of extensions.
-
isSubstitutionForbidden
public boolean isSubstitutionForbidden() -
isSic
public boolean isSic() -
resolveNumberOfPackages
-
isSelfMedication
-
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- 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.
-
validateBase
- Parameters:
basePath- The object's JSON path.contextAwareCaller- Whether the method was called from a basic object validation (i.e.validate(String)) or with context (i.e.validate(String, EMediplanType)). This allows avoiding redundant checks, if the context-aware caller will also invoke children validation that are context-aware, thus the basic validator will skip those.- Returns:
-
validate
Context-aware validation, that takes into account whether the eMediplan document is a treatment plan or a prescription.- Parameters:
basePath- The object's JSON path.mediplanType- The eMediplan document type.- Returns:
- The validation result.
-
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 interfaceEMediplanObject
-