Class ChMed16APatient
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatient<ChMed16AExtension,ChMed16AGender,ChMed16APatientId>
org.projecthusky.fhir.emed.ch.epr.model.emediplan.chmed16a.ChMed16APatient
- All Implemented Interfaces:
ChMed16AExtendable,EMediplanExtendable<ChMed16AExtension>,EMediplanObject
public class ChMed16APatient
extends EMediplanPatient<ChMed16AExtension,ChMed16AGender,ChMed16APatientId>
implements ChMed16AExtendable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable ChMed16APostalAddressPostal address of the patient.protected static final Stringprotected @Nullable LocalDateDate of birth, day precision.protected @Nullable StringEmail addressprotected static final Stringprotected @Nullable List<@NonNull ChMed16AExtension> Extensions.protected static final Stringprotected @Nullable StringFirst name.protected @Nullable ChMed16AGenderGender of patient.protected @Nullable List<@NonNull ChMed16APatientId> The list of patient identifiersprotected static final Stringprotected static final Stringprotected @Nullable StringThe patient's language (ISO 639-16 language code) (e.g. de).protected static final Stringprotected @Nullable StringLast name.protected static final Stringprotected @Nullable ChMed16APatientMedicalDataMedical data information.protected @Nullable StringPhone number.protected static final Stringprotected @Nullable StringReceiver (GLN) of the electronic prescription. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChMed16APatientfromEprFhir(ChEmedEprPatient eprFhirPatient, @Nullable org.hl7.fhir.r4.model.Observation weightObservation, List<org.hl7.fhir.r4.model.Reference> informationRecipients, EMediplanType mediplanType) Gets an EMediplanPatient from an CH EPR patient.protected StringList<@NonNull ChMed16AExtension> Gets the list of this object's extensions.protected static @Nullable StringgetFirstProfessionalRecipient(List<org.hl7.fhir.r4.model.Reference> recipients) protected Stringprotected Stringprotected Stringprotected StringbooleanhasExtensions(boolean inDepth) Whether the eMediplan object has any extension or not.Gets a string to be set at the eMediplan document object level, if the patient is the author, according to the CHMED16A specs.validate(@Nullable String basePath, EMediplanType mediplanType, Instant timestamp) Validates the patient object taking into account which type of eMediplan document it belongs to.Methods inherited from class org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPatient
fhirLanguageCodeToEMediplanLanguageCode, getAddress, getBirthDate, getFirstName, getGender, getIds, getLanguageCode, getLastName, getMedicalData, toFhir, trim, validate, validateBase, validateEmailAddress, validatePhoneMethods 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, trim, validateExtensionsMethods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, validate, validate
-
Field Details
-
FIRST_NAME_FIELD_NAME
- See Also:
-
LAST_NAME_FIELD_NAME
- See Also:
-
BIRTH_DATE_FIELD_NAME
- See Also:
-
LANGUAGE_FIELD_NAME
- See Also:
-
IDS_FIELD_NAME
- See Also:
-
MEDICAL_DATA_FIELD_NAME
- See Also:
-
PHONE_FIELD_NAME
- See Also:
-
EMAIL_FIELD_NAME
- See Also:
-
firstName
First name. -
lastName
Last name. -
birthDate
Date of birth, day precision. Format: yyyy-mm-dd (ISO 8601 Date) -
gender
Gender of patient. -
address
Postal address of the patient. -
languageCode
The patient's language (ISO 639-16 language code) (e.g. de). Note that while the lowercase version is preferred, the codes are also valid in uppercase (e.g. DE). -
phone
Phone number. -
email
Email address -
receiver
Receiver (GLN) of the electronic prescription. To be used if the electronic prescription is to be transmitted electronically to a healthcare professional. -
ids
The list of patient identifiers -
medicalData
Medical data information. -
extensions
Extensions.
-
-
Constructor Details
-
ChMed16APatient
public ChMed16APatient()
-
-
Method Details
-
getExtensions
Description copied from interface:EMediplanExtendableGets the list of this object's extensions.- Specified by:
getExtensionsin interfaceEMediplanExtendable<ChMed16AExtension>- Returns:
- The list of extensions.
-
getLanguageFieldName
- Specified by:
getLanguageFieldNamein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getIdsFieldName
- Specified by:
getIdsFieldNamein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getMedicalDataFieldName
- Specified by:
getMedicalDataFieldNamein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getPhonesFieldName
- Specified by:
getPhonesFieldNamein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getEmailsFieldName
- Specified by:
getEmailsFieldNamein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getPhones
- Specified by:
getPhonesin classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
getEmails
- Specified by:
getEmailsin classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId>
-
validate
public ValidationResult validate(@Nullable String basePath, EMediplanType mediplanType, Instant timestamp) Description copied from class:EMediplanPatientValidates the patient object taking into account which type of eMediplan document it belongs to. It performs the basic check done byEMediplanPatient.validate(String)plus extra validation taking into account the document type.- Overrides:
validatein classEMediplanPatient<ChMed16AExtension,ChMed16AGender, ChMed16APatientId> - Parameters:
basePath- The base path of the JSON object.mediplanType- The type of eMediplan document.timestamp- The timestamp of the eMediplan document creation.- Returns:
- The validation result.
-
fromEprFhir
public static ChMed16APatient fromEprFhir(ChEmedEprPatient eprFhirPatient, @Nullable org.hl7.fhir.r4.model.Observation weightObservation, List<org.hl7.fhir.r4.model.Reference> informationRecipients, EMediplanType mediplanType) Gets an EMediplanPatient from an CH EPR patient.- Parameters:
eprFhirPatient- The CH EMED EPR patient to be converted.weightObservation- The CH EMED EPR weight observation, if any.informationRecipients- The recipients of the CH EMED EPR content.mediplanType- The type of eMediplan document for which to get the patient. Some fields should be omitted depending on the document type.- Returns:
- The eMediplan patient.
-
getFirstProfessionalRecipient
-
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.
-
toAuthorString
Gets a string to be set at the eMediplan document object level, if the patient is the author, according to the CHMED16A specs.- Returns:
- The resulting author string.
-