Class ChEmedEprComposition
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.Composition
org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprComposition
- 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
- Direct Known Subclasses:
ChEmedEprCompositionDis
,ChEmedEprCompositionMtp
,ChEmedEprCompositionPadv
,ChEmedEprCompositionPml
,ChEmedEprCompositionPmlc
,ChEmedEprCompositionPre
public abstract class ChEmedEprComposition
extends org.hl7.fhir.r4.model.Composition
The HAPI custom structure for CH-EMED-EPR Compositions.
- Author:
- Quentin Ligier
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The 'vital signs' section.Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.Composition
org.hl7.fhir.r4.model.Composition.CompositionAttestationMode, org.hl7.fhir.r4.model.Composition.CompositionAttestationModeEnumFactory, org.hl7.fhir.r4.model.Composition.CompositionAttesterComponent, org.hl7.fhir.r4.model.Composition.CompositionEventComponent, org.hl7.fhir.r4.model.Composition.CompositionRelatesToComponent, org.hl7.fhir.r4.model.Composition.CompositionStatus, org.hl7.fhir.r4.model.Composition.CompositionStatusEnumFactory, org.hl7.fhir.r4.model.Composition.DocumentConfidentiality, org.hl7.fhir.r4.model.Composition.DocumentConfidentialityEnumFactory, org.hl7.fhir.r4.model.Composition.DocumentRelationshipType, org.hl7.fhir.r4.model.Composition.DocumentRelationshipTypeEnumFactory, org.hl7.fhir.r4.model.Composition.SectionComponent, org.hl7.fhir.r4.model.Composition.SectionMode, org.hl7.fhir.r4.model.Composition.SectionModeEnumFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
protected @Nullable ChExtEprDataEnterer
Person who entered information into this document if it is a person other than the author.static final String
protected @Nullable List<org.hl7.fhir.r4.model.Reference>
Extension for a list of recipients of this document (corresponds to the addressee of a letter - person or organization), equivalent to CDA informationRecipient.static final String
static final String
static final String
static final String
static final String
protected @Nullable org.hl7.fhir.r4.model.UnsignedIntType
Version numberstatic final String
Fields inherited from class org.hl7.fhir.r4.model.Composition
attester, ATTESTER, author, AUTHOR, authorTarget, category, CATEGORY, confidentiality, CONFIDENTIALITY, CONTEXT, custodian, custodianTarget, date, DATE, encounter, ENCOUNTER, encounterTarget, ENTRY, event, identifier, IDENTIFIER, INCLUDE_ATTESTER, INCLUDE_AUTHOR, INCLUDE_ENCOUNTER, INCLUDE_ENTRY, INCLUDE_PATIENT, INCLUDE_RELATED_REF, INCLUDE_SUBJECT, PATIENT, PERIOD, RELATED_ID, RELATED_REF, relatesTo, section, SECTION, SP_ATTESTER, SP_AUTHOR, SP_CATEGORY, SP_CONFIDENTIALITY, SP_CONTEXT, SP_DATE, SP_ENCOUNTER, SP_ENTRY, SP_IDENTIFIER, SP_PATIENT, SP_PERIOD, SP_RELATED_ID, SP_RELATED_REF, SP_SECTION, SP_STATUS, SP_SUBJECT, SP_TITLE, SP_TYPE, status, STATUS, subject, SUBJECT, subjectTarget, title, TITLE, type, TYPE
Fields inherited from class org.hl7.fhir.r4.model.DomainResource
contained, extension, modifierExtension, text
Fields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, meta
Fields inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
RES_ID, SP_RES_ID
Fields inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
INCLUDE_ALL, WILDCARD_ALL_SET
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for the parser.ChEmedEprComposition
(UUID compositionId, Instant date, LanguageCode language) Constructor that pre-populates fields. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyValues
(org.hl7.fhir.r4.model.Composition dst) org.hl7.fhir.r4.model.Composition.SectionComponent
Returns the annotation section; if missing, it creates it.Gets the person who entered information into this document.List<org.hl7.fhir.r4.model.Reference>
Gets the list of recipients of this document.byte[]
Returns the PDF content of the original representation or throws.org.hl7.fhir.r4.model.Composition.SectionComponent
Returns the original representation section; if missing, it creates it.protected @Nullable org.hl7.fhir.r4.model.Composition.SectionComponent
getSectionByLoincCode
(String code) Finds a section by its LOINC code ornull
, without creating it.int
Gets the version number.org.hl7.fhir.r4.model.UnsignedIntType
Gets the version number element.boolean
Returns whether the person who entered information into this document.boolean
Returns whether the list of recipients of this document.boolean
Returns whether the original representation section exists.boolean
Returns whether the version number.boolean
Returns whether the vital signs section exists.Returns the custodian.Resolves the document's creation date and time.org.hl7.fhir.instance.model.api.IBaseResource
Resolves the composition first human author (the main one).@Nullable Instant
Resolves the document UUID or throws.Resolves the language of the document.Returns the targeted patient.@Nullable org.hl7.fhir.r4.model.Observation
Returns the patient weight observation if any, ornull
.setDataEnterer
(ChExtEprDataEnterer dataEnterer) Sets the person who entered information into this document.setIdentifier
(UUID documentUUID) Sets the document UUID.setInformationRecipient
(List<org.hl7.fhir.r4.model.Reference> informationRecipient) Sets list of recipients of this document.setLanguage
(CommonLanguages language) Sets the language of this document.setOriginalRepresentationPdf
(byte[] pdfContent) Sets the original representation from the PDF content.setOriginalRepresentationPdf
(String title, org.hl7.fhir.r4.model.Binary originalRepresentationPdf) Sets the original representation reference.setPatient
(ChCorePatientEpr chCorePatientEpr) Set the patient targeted.setVersionNumber
(int value) Sets the version number.setVersionNumberElement
(org.hl7.fhir.r4.model.UnsignedIntType versionNumber) Sets the version number element.Methods inherited from class org.hl7.fhir.r4.model.Composition
addAttester, addAttester, addAuthor, addAuthor, addCategory, addCategory, addChild, addEvent, addEvent, addRelatesTo, addRelatesTo, addSection, addSection, copy, equalsDeep, equalsShallow, fhirType, getAttester, getAttesterFirstRep, getAuthor, getAuthorFirstRep, getAuthorTarget, getCategory, getCategoryFirstRep, getConfidentiality, getConfidentialityElement, getCustodian, getCustodianTarget, getDate, getDateElement, getEncounter, getEncounterTarget, getEvent, getEventFirstRep, getIdentifier, getNamedProperty, getProperty, getRelatesTo, getRelatesToFirstRep, getResourceType, getSection, getSectionFirstRep, getStatus, getStatusElement, getSubject, getSubjectTarget, getTitle, getTitleElement, getType, getTypesForProperty, hasAttester, hasAuthor, hasCategory, hasConfidentiality, hasConfidentialityElement, hasCustodian, hasDate, hasDateElement, hasEncounter, hasEvent, hasIdentifier, hasRelatesTo, hasSection, hasStatus, hasStatusElement, hasSubject, hasTitle, hasTitleElement, hasType, isEmpty, listChildren, makeProperty, removeChild, setAttester, setAuthor, setCategory, setConfidentiality, setConfidentialityElement, setCustodian, setCustodianTarget, setDate, setDateElement, setEncounter, setEncounterTarget, setEvent, setIdentifier, setProperty, setProperty, setRelatesTo, setSection, setStatus, setStatusElement, setSubject, setSubjectTarget, setTitle, setTitleElement, setType, typedCopy
Methods inherited from class org.hl7.fhir.r4.model.DomainResource
addContained, addExtension, addExtension, addExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyValues, getContained, getExtension, getExtensionByUrl, getExtensionsByUrl, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasExtension, hasModifierExtension, hasText, setContained, setExtension, setModifierExtension, setText
Methods 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, setMeta
Methods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setId
Methods 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, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, hasFormatComment
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
getMeta, getStructureFhirVersionEnum, isDeleted, setId
-
Field Details
-
ORIGINAL_REPR_SECTION_CODE_VALUE
- See Also:
-
TREATMENT_PLAN_SECTION_CODE_VALUE
- See Also:
-
PRESCRIPTION_SECTION_CODE_VALUE
- See Also:
-
DISPENSE_SECTION_CODE_VALUE
- See Also:
-
PHARMACEUTICAL_ADVICE_SECTION_CODE_VALUE
- See Also:
-
LIST_SECTION_CODE_VALUE
- See Also:
-
CARD_SECTION_CODE_VALUE
- See Also:
-
ANNOTATION_SECTION_CODE_VALUE
- See Also:
-
VITAL_SIGNS_SECTION_CODE_VALUE
- See Also:
-
versionNumber
protected @Nullable org.hl7.fhir.r4.model.UnsignedIntType versionNumberVersion number -
informationRecipient
Extension for a list of recipients of this document (corresponds to the addressee of a letter - person or organization), equivalent to CDA informationRecipient. -
dataEnterer
Person who entered information into this document if it is a person other than the author.
-
-
Constructor Details
-
ChEmedEprComposition
public ChEmedEprComposition()Empty constructor for the parser. -
ChEmedEprComposition
Constructor that pre-populates fields.- Parameters:
compositionId
- Version-independent identifier for the Compositiondate
- The document's creation date and time
-
-
Method Details
-
resolvePatient
Returns the targeted patient. It's a shortcut for(ChCorePatientEpr) getSubject().getResource()
.- Returns:
- the patient.
- Throws:
InvalidEmedContentException
- if the patient is not set or not an instance ofChCorePatientEpr
.
-
resolveCustodian
@ExpectsValidResource public ChEmedOrganization resolveCustodian() throws InvalidEmedContentExceptionReturns the custodian. It's a shortcut for(ChCoreOrganizationEpr) getCustodian().getResource()
.- Returns:
- the custodian.
- Throws:
InvalidEmedContentException
- if the custodian is not set or not an instance ofChEmedOrganization
.
-
resolveIdentifier
Resolves the document UUID or throws.- Returns:
- the document UUID.
- Throws:
InvalidEmedContentException
- if the id is missing.
-
resolveLanguage
Resolves the language of the document.- Returns:
- the language of the document.
-
resolveDate
Resolves the document's creation date and time.- Returns:
- the document's creation date and time.
-
resolveFirstHumanAuthor
@ExpectsValidResource public org.hl7.fhir.instance.model.api.IBaseResource resolveFirstHumanAuthor()Resolves the composition first human author (the main one). -
resolveFirstHumanAuthorTime
-
getVersionNumberElement
public org.hl7.fhir.r4.model.UnsignedIntType getVersionNumberElement()Gets the version number element.- Returns:
- the version number element.
-
setVersionNumberElement
public ChEmedEprComposition setVersionNumberElement(org.hl7.fhir.r4.model.UnsignedIntType versionNumber) Sets the version number element.- Parameters:
versionNumber
- the version number element.- Returns:
- this.
-
getVersionNumber
public int getVersionNumber()Gets the version number.- Returns:
- the version number.
-
setVersionNumber
Sets the version number.- Parameters:
value
- the version number.- Returns:
- this.
-
getInformationRecipient
Gets the list of recipients of this document.- Returns:
- the list of recipients of this document.
-
setInformationRecipient
public ChEmedEprComposition setInformationRecipient(List<org.hl7.fhir.r4.model.Reference> informationRecipient) Sets list of recipients of this document.- Parameters:
informationRecipient
- the list of recipients of this document.- Returns:
- this.
-
getDataEnterer
Gets the person who entered information into this document.- Returns:
- the person who entered information into this document.
-
setDataEnterer
Sets the person who entered information into this document.- Parameters:
dataEnterer
- the person who entered information into this document.- Returns:
- this.
-
setLanguage
Sets the language of this document.- Parameters:
language
- the language of this document.- Returns:
- this.
-
getOriginalRepresentationSection
public org.hl7.fhir.r4.model.Composition.SectionComponent getOriginalRepresentationSection()Returns the original representation section; if missing, it creates it.- Returns:
- the original representation section.
-
getOriginalRepresentationPdf
@ExpectsValidResource public byte[] getOriginalRepresentationPdf() throws InvalidEmedContentExceptionReturns the PDF content of the original representation or throws.- Returns:
- the PDF content of the original representation.
- Throws:
InvalidEmedContentException
- if the original representation is missing.
-
setOriginalRepresentationPdf
public ChEmedEprComposition setOriginalRepresentationPdf(String title, org.hl7.fhir.r4.model.Binary originalRepresentationPdf) Sets the original representation reference.- Parameters:
originalRepresentationPdf
- The original representation.- Returns:
- this.
-
setOriginalRepresentationPdf
Sets the original representation from the PDF content.- Parameters:
pdfContent
- The byte content of the PDF representation.- Returns:
- the original representation section.
-
getAnnotationSection
public org.hl7.fhir.r4.model.Composition.SectionComponent getAnnotationSection()Returns the annotation section; if missing, it creates it.- Returns:
- the annotation section.
-
getSectionByLoincCode
protected @Nullable org.hl7.fhir.r4.model.Composition.SectionComponent getSectionByLoincCode(String code) Finds a section by its LOINC code ornull
, without creating it.- Returns:
- the section or
null
.
-
setIdentifier
Sets the document UUID.- Parameters:
documentUUID
- The document UUID- Returns:
- this.
-
setPatient
Set the patient targeted.- Parameters:
chCorePatientEpr
- the patient.- Returns:
- this.
-
hasVersionNumber
public boolean hasVersionNumber()Returns whether the version number.- Returns:
true
if the version exists,false
otherwise.
-
hasInformationRecipient
public boolean hasInformationRecipient()Returns whether the list of recipients of this document.- Returns:
true
if the list of recipients of this document exists,false
otherwise.
-
hasOriginalRepresentationSection
public boolean hasOriginalRepresentationSection()Returns whether the original representation section exists.- Returns:
true
if the original representation section exists,false
otherwise.
-
hasVitalSignsSection
public boolean hasVitalSignsSection()Returns whether the vital signs section exists.- Returns:
true
if the vital signs section exists,false
otherwise.
-
resolvePatientWeightObservation
@ExpectsValidResource public @Nullable org.hl7.fhir.r4.model.Observation resolvePatientWeightObservation() throws InvalidEmedContentExceptionReturns the patient weight observation if any, ornull
.- Returns:
- the patient weight observation or
null
. - Throws:
InvalidEmedContentException
-
hasDataEnterer
public boolean hasDataEnterer()Returns whether the person who entered information into this document.- Returns:
true
if the person who entered information into this document exists,false
otherwise.
-
copyValues
public void copyValues(org.hl7.fhir.r4.model.Composition dst) - Overrides:
copyValues
in classorg.hl7.fhir.r4.model.Composition
-