Class ChMed16AEMediplan<M extends ChMed16AMedicament>
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplan<ChMed16AExtension,ChMed16AGender,M,ChMed16APatientId>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed16a.ChMed16AEMediplan<M>
- Type Parameters:
M- The type of ChMed16AMedicament. This is needed since revision 3 has added a new version of the medicament object for the ePrescription.
- All Implemented Interfaces:
ChMed16AExtendable,EMediplanExtendable<ChMed16AExtension>,EMediplanObject
- Direct Known Subclasses:
EPrescription
public class ChMed16AEMediplan<M extends ChMed16AMedicament>
extends EMediplan<ChMed16AExtension,ChMed16AGender,M,ChMed16APatientId>
implements ChMed16AExtendable
This is the main eMediplan object, called
Medication in CHMED16A specification. It contains exactly one
patient and a list of medications (named medicament in CHMED16A).
Based on the CHMED16A specs doc as published on its GitHub site as of 2025-06-25.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringAuthor (GLN2 if available, otherwise name).protected static final Stringprotected static final Stringstatic final Stringprotected @Nullable List<@NonNull ChMed16AExtension> The list of private fields.protected static final Stringprotected @Nullable StringThe schema of the private fields.protected StringThe ID of the eMediplan object.protected static final StringThe list of medicaments.protected static final Stringprotected ChMed16APatientThe patient.protected static final Stringprotected @Nullable List<@NonNull ChMed16ARecommendation> The list of recommendations.protected static final Stringprotected @Nullable StringRemark (any information/advice the author would like to share independently of a specific medicament).protected static final Stringprotected InstantThe date of creation.protected static final Stringprotected EMediplanTypeThe type of the Medication object.protected static final Stringprotected @Nullable InstantValidate date: Date of validation, Format: YYYY-MM-DDThh:mm:ss±hh:mm (ISO 8601 Date and time with the offset)protected @Nullable StringValidate by: the GLN of the healthcare professional who has validated the medication plan.protected static final Stringprotected @Nullable StringZSR (Zahlstellenregister) number of the author or their organisation.protected static final StringFields inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplan
EMEDIPLAN_TIMEZONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<@NonNull ChMed16AExtension> Gets the list of this object's extensions.booleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.Resolves the eMediplan type, which can be missing for ChMed23A eMediplan objects authored by a patient, because a Medication Plan is assumed (since they are not allowed to author prescriptions).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.EMediplan
addMedicament, compressJson, getId, getPatient, getRemark, getTimestamp, getType, toChTransmissionFormat, uncompressJsonMethods 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
-
EMEDIPLAN_VERSION
- See Also:
-
PATIENT_FIELD_NAME
- See Also:
-
MEDICAMENTS_FIELD_NAME
- See Also:
-
RECOMMENDATIONS_FIELD_NAME
- See Also:
-
EMEDIPLAN_TYPE_FIELD_NAME
- See Also:
-
ID_FIELD_NAME
- See Also:
-
AUTHOR_FIELD_NAME
- See Also:
-
ZSR_FIELD_NAME
- See Also:
-
TIMESTAMP_FIELD_NAME
- See Also:
-
REMARKS_FIELD_NAME
- See Also:
-
VALIDATOR_FIELD_NAME
- See Also:
-
VALIDATION_TIMESTAMP_FIELD_NAME
- See Also:
-
EXTENSIONS_SCHEMA_FIELD_NAME
- See Also:
-
patient
The patient. -
medicaments
The list of medicaments. -
recommendations
The list of recommendations. -
type
The type of the Medication object. -
id
The ID of the eMediplan object. -
author
Author (GLN2 if available, otherwise name).eMediplan: GLN of a person or organisation
ePrescription: GLN of a person
The patient can also be the author of the eMediplan. In this case, the minimum requirement is that the term "patient" is used to designate the author. Optionally, the patient's first name, last name and date of birth can also be specified additionally.
-
zsr
ZSR (Zahlstellenregister) number of the author or their organisation. -
timestamp
The date of creation. Format: yyyy-mm-ddThh:mm:ss+02:00 (ISO 86012 Combined date and time in UTC) (e.g. 2016-06-16T16:26:15+02:00) -
remark
Remark (any information/advice the author would like to share independently of a specific medicament). -
validator
Validate by: the GLN of the healthcare professional who has validated the medication plan. -
validationTimestamp
Validate date: Date of validation, Format: YYYY-MM-DDThh:mm:ss±hh:mm (ISO 8601 Date and time with the offset) -
extensionsSchema
The schema of the private fields. When empty or not specified, all private fields must be ignored. -
extensions
The list of private fields.
-
-
Constructor Details
-
ChMed16AEMediplan
public ChMed16AEMediplan()
-
-
Method Details
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<M extends ChMed16AMedicament>- Returns:
- The list of extensions.
-
getMedicaments
- Specified by:
getMedicamentsin classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId>
-
resolveType
Description copied from class:EMediplanResolves the eMediplan type, which can be missing for ChMed23A eMediplan objects authored by a patient, because a Medication Plan is assumed (since they are not allowed to author prescriptions).- Specified by:
resolveTypein classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId> - Returns:
- The resolved
EMediplanType.
-
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 classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId> - 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.
-
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<M extends ChMed16AMedicament>- Specified by:
trimin interfaceEMediplanObject- Overrides:
trimin classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId>
-
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.
-
getEmediplanVersion
- Specified by:
getEmediplanVersionin classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId>
-
getChTransmissionFormatPrefix
- Specified by:
getChTransmissionFormatPrefixin classEMediplan<ChMed16AExtension,ChMed16AGender, M extends ChMed16AMedicament, ChMed16APatientId>
-