Class EMediplan
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplan
- All Implemented Interfaces:
EMediplanExtendable
,EMediplanObject
This is the main eMediplan object, called
Medication
in ChMed23A specification. It contains exactly one
patient and a list of medications (named medicament in ChMed23A).
Based on the CHMed23A specs doc version 2.1 and the CHMed23A posology specs doc version 2.1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EMediplanAuthor
The type of author of the document.static final String
static final String
protected @Nullable List<@NonNull EMediplanExtension>
The list of extensions.protected @Nullable EMediplanHealthcareOrganization
The healthcare organization in which the HealthcarePerson works.protected @Nullable EMediplanHealthcarePerson
The healthcare person author of the document, required if the document author type is an HCP.protected @Nullable String
The id of the Medication object.protected List<@NonNull EMediplanMedicament>
List of medications.protected EMediplanPatient
The patient.protected @Nullable String
The recipient (GLN) of the electronic prescription.protected @Nullable String
Remark.protected Instant
The date of creation.protected @Nullable EMediplanType
The type of Medication object, seeEMediplanType
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMedicament
(@NonNull EMediplanMedicament medicament) List<@NonNull EMediplanExtension>
Gets the list of this object's extensions.List<@NonNull EMediplanMedicament>
Resolves the eMediplan type, which can be missing for eMediplan objects authored by a patient, because a Medication Plan is assumed (since they are not allowed to author prescriptions).Converts the eMediplan format to the ChTransmissionFormat specified by ChMed23A.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.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.EMediplanExtendable
addExtension, findExtension
Methods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
EMEDIPLAN_VERSION
- See Also:
-
EMEDIPLAN_TIMEZONE
- See Also:
-
patient
The patient. -
hcPerson
The healthcare person author of the document, required if the document author type is an HCP. -
hcOrg
The healthcare organization in which the HealthcarePerson works. Required if the document author type is an HCP. -
medicaments
List of medications. -
extensions
The list of extensions. Optional if empty. -
type
The type of Medication object, seeEMediplanType
. It is allowed to be missing if the author is a person, in which case it is assumed that it is aEMediplanType.MEDICATION_PLAN
. -
id
The id of the Medication object. The eMediplan document creator is responsible for assigning the id. -
author
The type of author of the document. -
recipient
The recipient (GLN) of the electronic prescription. To be used if the electronic prescription is to be transmitted electronically to a healthcare professional. -
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 or advice the author would like to share independently of a specific medicament.
-
-
Constructor Details
-
EMediplan
public EMediplan()
-
-
Method Details
-
getMedicaments
-
addMedicament
-
getExtensions
Description copied from interface:EMediplanExtendable
Gets the list of this object's extensions.- Specified by:
getExtensions
in interfaceEMediplanExtendable
- Returns:
- The list of extensions.
-
resolveType
Resolves the eMediplan type, which can be missing for eMediplan objects authored by a patient, because a Medication Plan is assumed (since they are not allowed to author prescriptions).- Returns:
- The resolved
EMediplanType
.
-
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.
-
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
-
toChTransmissionFormat
Converts the eMediplan format to the ChTransmissionFormat specified by ChMed23A. This is useful for data transmission as well as used for the QR code to be embedded in the eMediplan paper/PDF format.- Returns:
- The ChTransmissionFormat string with the eMediplan object information.
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- The eMediplan object could not be serialized to JSON.IOException
- The eMediplan object could not be serialized and compressed to ChTransmissionFormat.
-