Class ChCorePatient
java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.BaseResource
org.hl7.fhir.r4.model.Resource
org.hl7.fhir.r4.model.DomainResource
org.hl7.fhir.r4.model.Patient
org.projecthusky.fhir.core.ch.resource.r4.ChCorePatient
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IAnyResource,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions,org.hl7.fhir.instance.model.api.IBaseResource,org.hl7.fhir.instance.model.api.IDomainResource,ChCoreContactPointCarrier
- Direct Known Subclasses:
ChCorePatientEpr
public class ChCorePatient
extends org.hl7.fhir.r4.model.Patient
implements ChCoreContactPointCarrier
The HAPI custom structure for CH-Core patient.
- Author:
- Roeland Luykx
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.Patient
org.hl7.fhir.r4.model.Patient.ContactComponent, org.hl7.fhir.r4.model.Patient.LinkType, org.hl7.fhir.r4.model.Patient.LinkTypeEnumFactory, org.hl7.fhir.r4.model.Patient.PatientCommunicationComponent, org.hl7.fhir.r4.model.Patient.PatientLinkComponentNested classes/interfaces inherited from interface org.projecthusky.fhir.core.ch.resource.r4.ChCoreContactPointCarrier
ChCoreContactPointCarrier.ContactPointRankComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable List<ChCoreCitizenshipExt> Extension for a citizenship.static final Stringstatic final Stringprotected @Nullable CHCoreAddressEch11PlaceOfBirthExtension for a placeOfBirth.protected @Nullable List<CHCoreAddressECH11PlaceOfOrigin> Extension for a placeOfOrigin.protected @Nullable org.hl7.fhir.r4.model.CodeableConceptExtension for a religion.Fields inherited from class org.hl7.fhir.r4.model.Patient
active, ACTIVE, address, ADDRESS, ADDRESS_CITY, ADDRESS_COUNTRY, ADDRESS_POSTALCODE, ADDRESS_STATE, ADDRESS_USE, birthDate, BIRTHDATE, communication, contact, DEATH_DATE, deceased, DECEASED, EMAIL, FAMILY, gender, GENDER, GENERAL_PRACTITIONER, generalPractitioner, generalPractitionerTarget, GIVEN, identifier, IDENTIFIER, INCLUDE_GENERAL_PRACTITIONER, INCLUDE_LINK, INCLUDE_ORGANIZATION, LANGUAGE, link, LINK, managingOrganization, managingOrganizationTarget, maritalStatus, multipleBirth, name, NAME, ORGANIZATION, PHONE, PHONETIC, photo, SP_ACTIVE, SP_ADDRESS, SP_ADDRESS_CITY, SP_ADDRESS_COUNTRY, SP_ADDRESS_POSTALCODE, SP_ADDRESS_STATE, SP_ADDRESS_USE, SP_BIRTHDATE, SP_DEATH_DATE, SP_DECEASED, SP_EMAIL, SP_FAMILY, SP_GENDER, SP_GENERAL_PRACTITIONER, SP_GIVEN, SP_IDENTIFIER, SP_LANGUAGE, SP_LINK, SP_NAME, SP_ORGANIZATION, SP_PHONE, SP_PHONETIC, SP_TELECOM, telecom, TELECOMFields inherited from class org.hl7.fhir.r4.model.DomainResource
contained, extension, modifierExtension, textFields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, metaFields inherited from interface org.projecthusky.fhir.core.ch.resource.r4.ChCoreContactPointCarrier
contactPointRankComparatorFields inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
RES_ID, RES_LAST_UPDATED, RES_PROFILE, RES_SECURITY, RES_TAG, SP_RES_ID, SP_RES_LAST_UPDATED, SP_RES_PROFILE, SP_RES_SECURITY, SP_RES_TAGFields inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
INCLUDE_ALL, WILDCARD_ALL_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.r4.model.IdentifieraddIdentifier(String system, String value) Adds a new local patient identifier.copy()voidcopyValues(org.hl7.fhir.r4.model.Patient dst) List<@NonNull org.hl7.fhir.r4.model.Identifier> Gets the list of Swiss insurance card numbers of the patient as a list ofIdentifier.List<@NonNull org.hl7.fhir.r4.model.Identifier> getInsuranceCardNumbers(boolean activeOnly) Gets the list of Swiss insurance card numbers of the patient as a list ofIdentifier.List<@NonNull org.hl7.fhir.r4.model.Identifier> Resolves the first local patient identifier or throws.@Nullable CHCoreAddressEch11PlaceOfBirth@Nullable org.hl7.fhir.r4.model.CodeableConceptbooleanReturns whether the citizenship of the patient is specified.booleanReturns whether religion code exists.booleanReturns the place of origin of the patient is specified.booleanReturns whether religion code exists.@Nullable org.hl7.fhir.r4.model.AddressResolves the address.Resolves the patient's birthdate or throws.org.hl7.fhir.r4.model.Enumerations.AdministrativeGenderResolves patient's gender if possible.@Nullable org.hl7.fhir.r4.model.Patient.PatientCommunicationComponentResolves the language of correspondence (i.e. preferred communication language) of the patient.org.hl7.fhir.r4.model.HumanNameResolves the human name.@Nullable ReligiousAffiliationResolves the patient's religion.setBirthDate(LocalDate birthDate) Sets the patient's birthdate.setCitizenship(List<ChCoreCitizenshipExt> citizenship) setPlaceOfBirth(CHCoreAddressEch11PlaceOfBirth placeOfBirth) setPlaceOfOrigin(List<CHCoreAddressECH11PlaceOfOrigin> placeOfOrigin) setReligion(ReligiousAffiliation religion) Sets patient's religion.Methods inherited from class org.hl7.fhir.r4.model.Patient
addAddress, addAddress, addChild, addCommunication, addCommunication, addContact, addContact, addGeneralPractitioner, addGeneralPractitioner, addIdentifier, addIdentifier, addLink, addLink, addName, addName, addPhoto, addPhoto, addTelecom, addTelecom, equalsDeep, equalsShallow, fhirType, getActive, getActiveElement, getAddress, getAddressFirstRep, getBirthDate, getBirthDateElement, getCommunication, getCommunicationFirstRep, getContact, getContactFirstRep, getDeceased, getDeceasedBooleanType, getDeceasedDateTimeType, getGender, getGenderElement, getGeneralPractitioner, getGeneralPractitionerFirstRep, getIdentifier, getIdentifierFirstRep, getLink, getLinkFirstRep, getManagingOrganization, getManagingOrganizationTarget, getMaritalStatus, getMultipleBirth, getMultipleBirthBooleanType, getMultipleBirthIntegerType, getName, getNamedProperty, getNameFirstRep, getPhoto, getPhotoFirstRep, getProperty, getResourceType, getTelecom, getTelecomFirstRep, getTypesForProperty, hasActive, hasActiveElement, hasAddress, hasBirthDate, hasBirthDateElement, hasCommunication, hasContact, hasDeceased, hasDeceasedBooleanType, hasDeceasedDateTimeType, hasGender, hasGenderElement, hasGeneralPractitioner, hasIdentifier, hasLink, hasManagingOrganization, hasMaritalStatus, hasMultipleBirth, hasMultipleBirthBooleanType, hasMultipleBirthIntegerType, hasName, hasPhoto, hasTelecom, isEmpty, listChildren, makeProperty, removeChild, setActive, setActiveElement, setAddress, setBirthDate, setBirthDateElement, setCommunication, setContact, setDeceased, setGender, setGenderElement, setGeneralPractitioner, setIdentifier, setLink, setManagingOrganization, setManagingOrganizationTarget, setMaritalStatus, setMultipleBirth, setName, setPhoto, setProperty, setProperty, setTelecom, typedCopyMethods inherited from class org.hl7.fhir.r4.model.DomainResource
addContained, addExtension, addExtension, addExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyValues, getContained, getContained, getExtension, getExtensionByUrl, getExtensionsByUrl, getExtensionString, getExtensionString, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasExtension, hasModifierExtension, hasPrimitiveExtension, hasText, setContained, setExtension, setModifierExtension, setTextMethods inherited from class org.hl7.fhir.r4.model.Resource
copyValues, getId, getIdBase, getIdElement, getIdPart, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMetaMethods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setIdMethods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getChildValueByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN, setXhtmlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.projecthusky.fhir.core.ch.resource.r4.ChCoreContactPointCarrier
addEmailAddress, addPhoneNumber, getTelecom, hasTelecom, resolveEmailAddresses, resolveEmailAddressesAsStrings, resolveEmailAddressesAsStrings, resolveInternetAddresses, resolvePhoneNumbers, resolvePhoneNumbersAsStrings, resolvePhoneNumbersAsStrings, resolvePreferredEmailAddress, resolvePreferredInternetAddress, resolvePreferredPhoneNumber, resolveTelecomMethods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, hasFormatCommentMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
getMeta, getStructureFhirVersionEnum, isDeleted, setId
-
Field Details
-
LOCAL_PID_TYPE_SYSTEM
- See Also:
-
LOCAL_PID_TYPE_VALUE
- See Also:
-
placeOfBirth
Extension for a placeOfBirth. -
placeOfOrigin
Extension for a placeOfOrigin. -
citizenship
Extension for a citizenship. -
religion
protected @Nullable org.hl7.fhir.r4.model.CodeableConcept religionExtension for a religion.
-
-
Constructor Details
-
ChCorePatient
public ChCorePatient()
-
-
Method Details
-
getPlaceOfBirth
-
setPlaceOfBirth
-
getPlaceOfOrigin
-
setPlaceOfOrigin
-
getCitizenship
-
setCitizenship
-
hasPlaceOfBirth
public boolean hasPlaceOfBirth()Returns whether religion code exists.- Returns:
trueif the religion code exists,falseotherwise.
-
hasPlaceOfOrigin
public boolean hasPlaceOfOrigin()Returns the place of origin of the patient is specified.- Returns:
trueif the religion code exists,falseotherwise.
-
hasCitizenship
public boolean hasCitizenship()Returns whether the citizenship of the patient is specified.- Returns:
trueif the religion code exists,falseotherwise.
-
getReligion
public @Nullable org.hl7.fhir.r4.model.CodeableConcept getReligion() -
hasReligion
public boolean hasReligion()Returns whether religion code exists.- Returns:
trueif the religion code exists,falseotherwise.
-
setReligion
Sets patient's religion.- Parameters:
religion- Religious Affiliation - the patient's religion.- Returns:
- this.
-
setBirthDate
Sets the patient's birthdate.- Parameters:
birthDate- the patient's birthdate.- Returns:
- this.
-
resolveName
@ExpectsValidResource public org.hl7.fhir.r4.model.HumanName resolveName() throws InvalidContentExceptionResolves the human name.- Returns:
- the human name.
- Throws:
InvalidContentException- if the human name is missing.
-
resolveGender
@ExpectsValidResource public org.hl7.fhir.r4.model.Enumerations.AdministrativeGender resolveGender() throws InvalidContentExceptionResolves patient's gender if possible.- Returns:
- practitioner's gender.
- Throws:
InvalidContentException- if the gender is not available.
-
resolveReligion
Resolves the patient's religion.- Returns:
- The religion or
null.
-
getLocalIds
Resolves the first local patient identifier or throws.- Returns:
- the first local patient identifier.
-
getInsuranceCardNumbers
Gets the list of Swiss insurance card numbers of the patient as a list ofIdentifier. The list might be empty. -
getInsuranceCardNumbers
Gets the list of Swiss insurance card numbers of the patient as a list ofIdentifier. The list might be empty.- Parameters:
activeOnly- Whether to consider only valid identifiers at the current date-time (iftrue) or any identifiers.- Returns:
- The list of insurance card number identifiers of this patient.
-
resolveBirthDate
Resolves the patient's birthdate or throws.- Returns:
- the patient's birthdate.
- Throws:
InvalidContentException- if the patient's birthdate is missing.
-
addIdentifier
Adds a new local patient identifier.- Parameters:
system- The namespace for the identifier value.value- The value that is unique.- Returns:
- the created identifier.
-
resolveLanguageOfCorrespondence
public @Nullable org.hl7.fhir.r4.model.Patient.PatientCommunicationComponent resolveLanguageOfCorrespondence()Resolves the language of correspondence (i.e. preferred communication language) of the patient. If the patient has more than one preferred communication language, only one of them (any) will be returned by this method.- Returns:
- the preferred patient component with the language of correspondence.
-
resolveAddress
Resolves the address.- Returns:
- the address or
null.
-
copy
- Overrides:
copyin classorg.hl7.fhir.r4.model.Patient
-
copyValues
public void copyValues(org.hl7.fhir.r4.model.Patient dst) - Overrides:
copyValuesin classorg.hl7.fhir.r4.model.Patient
-