Class ChMed23AMedicament
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanMedicament<ChMed23AExtension>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed23a.ChMed23AMedicament
- All Implemented Interfaces:
ChMed23AExtendable,EMediplanExtendable<ChMed23AExtension>,EMediplanObject
public class ChMed23AMedicament
extends EMediplanMedicament<ChMed23AExtension>
implements ChMed23AExtendable
Information about a medication as well as its dosage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Repetitionprotected @Nullable List<@NonNull ChMed23AExtension> 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 ChMed23APosology> List of posologies (dosage information).protected static final Stringprotected @Nullable StringPrescribed by: the GLN or designation of the prescriber (e.g. physician, pharmacist...).protected static final Stringprotected @Nullable StringReason for applying the medication, i.e. reason for treatment.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 StringFields inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanMedicament
DEFAULT_NUMBER_OF_PACKAGES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidforbidSubstitution(@Nullable Boolean selfMedication) List<@NonNull ChMed23AExtension> Gets the list of this object's extensions.booleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.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.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 org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanMedicament
getId, getIdType, getNumberOfPackages, getPrescriber, getReason, resolveNumberOfPackages, 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.chmed23a.ChMed23AExtendable
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, 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_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
-
ChMed23AMedicament
public ChMed23AMedicament()
-
-
Method Details
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<ChMed23AExtension>- Returns:
- The list of extensions.
-
isSubstitutionForbidden
public boolean isSubstitutionForbidden()- Specified by:
isSubstitutionForbiddenin classEMediplanMedicament<ChMed23AExtension>
-
forbidSubstitution
- Specified by:
forbidSubstitutionin classEMediplanMedicament<ChMed23AExtension>
-
isSic
public boolean isSic() -
isSelfMedication
- Specified by:
isSelfMedicationin classEMediplanMedicament<ChMed23AExtension>
-
getIdFieldName
- Specified by:
getIdFieldNamein classEMediplanMedicament<ChMed23AExtension>
-
getIdTypeFieldName
- Specified by:
getIdTypeFieldNamein classEMediplanMedicament<ChMed23AExtension>
-
validateBase
- Overrides:
validateBasein classEMediplanMedicament<ChMed23AExtension>- Parameters:
basePath- The object's JSON path.contextAwareCaller- Whether the method was called from a basic object validation (i.e.EMediplanMedicament.validate(String)) or with context (i.e.EMediplanMedicament.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:
- The validation result.
-
validate
Description copied from class:EMediplanMedicamentContext-aware validation, that takes into account whether the eMediplan document is a treatment plan or a prescription.- Overrides:
validatein classEMediplanMedicament<ChMed23AExtension>- 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 interfaceEMediplanExtendable<ChMed23AExtension>- Specified by:
trimin interfaceEMediplanObject- Overrides:
trimin classEMediplanMedicament<ChMed23AExtension>
-
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.
-