Class ChMed16AMedicament
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanMedicament<ChMed16AExtension>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed16a.ChMed16AMedicament
- All Implemented Interfaces:
ChMed16AExtendable,EMediplanExtendable<ChMed16AExtension>,EMediplanObject
- Direct Known Subclasses:
EPrescriptionMedicament
public class ChMed16AMedicament
extends EMediplanMedicament<ChMed16AExtension>
implements ChMed16AExtendable
Information about a medication as well as its dosage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable StringApplication instructions (further information on how to apply the medication, e.g. take before meals).protected @Nullable List<@NonNull ChMed16AExtension> Extensions.protected static final Stringprotected @Nullable Integer1 if medicament should not be substituted, 0 otherwise.protected StringThe ID defined in the IdType below.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 ChMed16APosology> The list of posologies.protected static final Stringprotected static final Stringprotected @Nullable StringPrescribed by: the GLN or designation of the person who prescribed the medicament (e.g. physician, pharmacist etc.)protected @Nullable StringTaking reason (the reason for the medication treatment).protected @Nullable IntegerInteger which defines the number of repetitions in months, e.g. permanent prescription for 6 months.protected static final Stringprotected static final Stringprotected @Nullable CdTyp26Route of administration.protected static final Stringprotected @Nullable IntegerAuto-medication (self-medication), 1 if it is auto-medication, 0 otherwise.protected static final Stringprotected @Nullable CdTyp9The quantity unit.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 substitutionForbidden) List<@NonNull ChMed16AExtension> Gets the list of this object's extensions.List<@NonNull ChMed16APosology> booleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.booleanThis method expects the Medicament object to be valid.booleanvoidsetSelfMedication(boolean selfMedication) Convenience method to set the self-medication property using a boolean.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.validate(@Nullable String basePath, EMediplanType mediplanType) Context-aware validation, that takes into account whether the eMediplan document is a treatment plan or a prescription.validateBase(@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.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, validate
-
Field Details
-
ID_FIELD_NAME
- See Also:
-
ID_TYPE_FIELD_NAME
- See Also:
-
POSOLOGY_FIELD_NAME
- See Also:
-
UNIT_FIELD_NAME
- See Also:
-
TAKING_REASON_FIELD_NAME
- See Also:
-
SELF_MEDICATION_FIELD_NAME
- See Also:
-
PRESCRIBED_BY_FIELD_NAME
- See Also:
-
ROUTE_OF_ADMINISTRATION_FIELD_NAME
- See Also:
-
REPETITION_FIELD_NAME
- See Also:
-
FORBID_SUBSTITUTION_FIELD_NAME
- See Also:
-
NUMBER_OF_PACKAGES_FIELD_NAME
- See Also:
-
id
The ID defined in the IdType below. If the IdType is 'None', add a free text description here. -
idType
The type of id. -
posology
The list of posologies. -
unit
The quantity unit. Mandatory if Pos is defined. (The unit must be based on the standardized substance in the INDEX database.) -
reason
Taking reason (the reason for the medication treatment). -
applicationInstructions
Application instructions (further information on how to apply the medication, e.g. take before meals). -
selfMedication
Auto-medication (self-medication), 1 if it is auto-medication, 0 otherwise. -
prescriber
Prescribed by: the GLN or designation of the person who prescribed the medicament (e.g. physician, pharmacist etc.) -
routeOfAdministration
Route of administration. Possible values: CDTYP 26 in HCI's INDEX database/CODE schema. -
repetition
Integer which defines the number of repetitions in months, e.g. permanent prescription for 6 months. -
forbidSubstitution
1 if medicament should not be substituted, 0 otherwise. Default: 0 -
numberOfPackages
Number of packages to be delivered. Default: 1 -
extensions
Extensions.
-
-
Constructor Details
-
ChMed16AMedicament
public ChMed16AMedicament()
-
-
Method Details
-
getRepetitionFieldName
-
getNumberOfPackagesFieldName
-
getIdFieldName
- Specified by:
getIdFieldNamein classEMediplanMedicament<ChMed16AExtension>
-
getIdTypeFieldName
- Specified by:
getIdTypeFieldNamein classEMediplanMedicament<ChMed16AExtension>
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<ChMed16AExtension>- Returns:
- The list of extensions.
-
getPosology
-
setSelfMedication
public void setSelfMedication(boolean selfMedication) Convenience method to set the self-medication property using a boolean. -
isSelfMedication
This method expects the Medicament object to be valid. This means that it expects that the only case for the self-medication property to benullis when the document is a prescription and, in this case, it assumes that it is therefore not a self-medication. When not-null, the value returned is that of the property.- Specified by:
isSelfMedicationin classEMediplanMedicament<ChMed16AExtension>- Returns:
- Whether the medication is a self-medication treatment or a prescribed one.
-
isSubstitutionForbidden
public boolean isSubstitutionForbidden()- Specified by:
isSubstitutionForbiddenin classEMediplanMedicament<ChMed16AExtension>
-
forbidSubstitution
- Specified by:
forbidSubstitutionin classEMediplanMedicament<ChMed16AExtension>
-
validateBase
- Overrides:
validateBasein classEMediplanMedicament<ChMed16AExtension>- 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<ChMed16AExtension>- 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<ChMed16AExtension>- Specified by:
trimin interfaceEMediplanObject- Overrides:
trimin classEMediplanMedicament<ChMed16AExtension>
-
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.
-