Class ChMed23AEMediplan
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplan<ChMed23AExtension,ChMed23AGender,ChMed23AMedicament,ChMed23APatientId>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed23a.ChMed23AEMediplan
- All Implemented Interfaces:
ChMed23AExtendable,EMediplanExtendable<ChMed23AExtension>,EMediplanHealthcareProCarrier<ChMed23AHealthcarePerson,,ChMed23AHealthcareOrganization> EMediplanObject
public class ChMed23AEMediplan
extends EMediplan<ChMed23AExtension,ChMed23AGender,ChMed23AMedicament,ChMed23APatientId>
implements ChMed23AExtendable, EMediplanHealthcareProCarrier<ChMed23AHealthcarePerson,ChMed23AHealthcareOrganization>
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 EMediplanAuthorThe type of author of the document.static final Stringprotected @Nullable List<@NonNull ChMed23AExtension> The list of extensions.protected static final Stringprotected static final Stringprotected @Nullable ChMed23AHealthcareOrganizationThe healthcare organization in which the HealthcarePerson works.protected @Nullable ChMed23AHealthcarePersonThe healthcare person author of the document, required if the document author type is an HCP.protected @Nullable StringThe id of the Medication object.protected List<@NonNull ChMed23AMedicament> List of medications.protected ChMed23APatientThe patient.protected @Nullable StringThe recipient (GLN) of the electronic prescription.protected @Nullable StringRemark.protected InstantThe date of creation.protected @Nullable EMediplanTypeThe type of Medication object, seeEMediplanType.Fields inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplan
EMEDIPLAN_TIMEZONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<@NonNull ChMed23AExtension> Gets the list of this object's extensions.List<@NonNull ChMed23AMedicament> booleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.booleanWhether the author of the eMediplan is of a professional nature (pro/org) or a patient.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.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.EMediplanHealthcareProCarrier
getHealthcareOrganization, getHealthcarePerson, validateHealtcareProInfoMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate
-
Field Details
-
EMEDIPLAN_VERSION
- See Also:
-
HEALTHCARE_PERSON_FIELD_NAME
- See Also:
-
HEALTHCARE_ORGANIZATION_FIELD_NAME
- See Also:
-
patient
The patient. -
healthcarePerson
The healthcare person author of the document, required if the document author type is an HCP. -
healthcareOrganization
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
-
ChMed23AEMediplan
public ChMed23AEMediplan()
-
-
Method Details
-
getHealthcarePersonFieldName
- Specified by:
getHealthcarePersonFieldNamein interfaceEMediplanHealthcareProCarrier<ChMed23AHealthcarePerson,ChMed23AHealthcareOrganization>
-
getHealthcareOrganizationFieldName
- Specified by:
getHealthcareOrganizationFieldNamein interfaceEMediplanHealthcareProCarrier<ChMed23AHealthcarePerson,ChMed23AHealthcareOrganization>
-
getMedicaments
- Specified by:
getMedicamentsin classEMediplan<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId>
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<ChMed23AExtension>- Returns:
- The list of extensions.
-
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<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId> - Returns:
- The resolved
EMediplanType.
-
isAuthorProfessional
public boolean isAuthorProfessional()Description copied from interface:EMediplanHealthcareProCarrierWhether the author of the eMediplan is of a professional nature (pro/org) or a patient.- Specified by:
isAuthorProfessionalin interfaceEMediplanHealthcareProCarrier<ChMed23AHealthcarePerson,ChMed23AHealthcareOrganization> - Returns:
trueif the author is a professional,falseotherwise.
-
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<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId> - 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.
-
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.
-
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 classEMediplan<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId>
-
getEmediplanVersion
- Specified by:
getEmediplanVersionin classEMediplan<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId>
-
getChTransmissionFormatPrefix
- Specified by:
getChTransmissionFormatPrefixin classEMediplan<ChMed23AExtension,ChMed23AGender, ChMed23AMedicament, ChMed23APatientId>
-