Class DocumentMetadata
java.lang.Object
org.projecthusky.common.communication.DocumentMetadata
- Direct Known Subclasses:
DocumentMetadataAt
,DocumentMetadataCh
Provides metadata attributes as specified in [IHE ITI TF-3], Table 4.1-5:
Document Metadata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The Class MetadataExtractionMode -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new document metadata.DocumentMetadata
(String language) Instantiates a new document meta data.DocumentMetadata
(org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry documentEntryType) Instantiates a new document metadata.DocumentMetadata
(POCDMT000040ClinicalDocument cdaDoc, String language) Instantiates a new document metadata.DocumentMetadata
(POCDMT000040ClinicalDocument cdaDoc, org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry documentEntryType, String language) Instantiates a new document metadata. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an (optional) author element.void
Adds an (optional) author element.void
Adds the (optional) confidentialityCode code (e.g.void
addConfidentialityCode
(Code code) Adds the (optional) confidentialityCode code (e.g.void
clear()
Clears all the metadata attributes and lists (except the documentEntyUuid)void
Clears all (unsafe) automatically extracted metadata attributes and listsboolean
boolean
equals
(DocumentMetadata other) Returns an (optional) author element.org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus
Method to get the AvailabilityStatusgetCda()
Gets the classCodeGets the codedLanguageGets the confidentialityCode listGets the creationTimeGets the document source actors organization idGets the document descriptor of the documentorg.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry
Gets the mdht document entry type.Gets the EntryUUIDGets the formatCodeGets the healthcareFacilityTypeCodeGets the meta data languageGets the mimeTypeGets the patient.Gets the patient id.Gets the practice setting code.Gets the source patient id.getTitle()
Gets the title.Gets the typeCode.Gets the unique id.getUri()
Gets the uri of the document.org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry
getXDoc()
int
hashCode()
void
setAvailabilityStatus
(org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus availabilityStatus) Method to set the AvailabilityStatusType;void
setClassCode
(Code code) Sets the (required, but in principle computable) class code, which defines the class of the document (e.g.void
setCodedLanguage
(String codedLanguage) Sets the (required) coded language (e.g.void
setCreationTime
(ZonedDateTime dateAndTime) Sets the (required) creation time of the document.void
Sets the (required) destination patient id, which is used in the affinity domain (typically retrieved from a Master Patient Index (MPI))void
setDocSourceActorOrganizationId
(String docSourceActorOrgId) Sets the document source actors organization idvoid
setDocumentDescriptor
(DocumentDescriptor documentDescriptor) Sets the document descriptor of the documentvoid
setEntryUUID
(String entryUuid) Sets the entry uuid.void
setFormatCode
(Code code) Sets the (required) format code.void
Sets the (required) healthcare facility type code (e.g.void
setMetadata
(DocumentMetadata metaData) void
setMetadataLanguage
(String language) Sets the language of the document meta datavoid
setMimeType
(String mimeType) Sets the (required) mime type (e.g.void
setPatient
(Patient patient) Sets the (required) patient.void
setPracticeSettingCode
(Code code) Sets the (required) practice setting code.void
Sets the (required) source patient id.void
Sets the (optional) title.void
setTypeCode
(Code code) Sets the (required) type code.void
setUniqueId
(String id) Sets the unique id.void
Sets the uri of the document.
-
Constructor Details
-
DocumentMetadata
public DocumentMetadata()Instantiates a new document metadata. -
DocumentMetadata
public DocumentMetadata(org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry documentEntryType) Instantiates a new document metadata.- Parameters:
documentEntryType
- the document entry type
-
DocumentMetadata
Instantiates a new document meta data.- Parameters:
language
- language of the meta data
-
DocumentMetadata
Instantiates a new document metadata.- Parameters:
cdaDoc
- CDA document of metadatalanguage
- language of the meta data
-
DocumentMetadata
public DocumentMetadata(POCDMT000040ClinicalDocument cdaDoc, org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry documentEntryType, String language) Instantiates a new document metadata.- Parameters:
cdaDoc
- CDA document of metadatadocumentEntryType
- the document entry type
-
-
Method Details
-
addAuthor
public void addAuthor()Adds an (optional) author element. All information relevant for the XDS Document Metadata will be extracted from the Convenience API Author. -
addAuthor
Adds an (optional) author element. All information relevant for the XDS Document Metadata will be extracted from the Convenience API Author. -
addConfidentialityCode
Adds the (optional) confidentialityCode code (e.g. 'N' for 'normal')- Parameters:
code
- the code
-
addConfidentialityCode
Adds the (optional) confidentialityCode code (e.g. 'N' for 'normal')- Parameters:
code
- the code
-
clear
public void clear()Clears all the metadata attributes and lists (except the documentEntyUuid) -
clearExtracted
public void clearExtracted()Clears all (unsafe) automatically extracted metadata attributes and lists -
equals
-
equals
-
getAuthors
Returns an (optional) author element. All information contained in the XDS Document Metadata will be extracted to the Convenience API Author.- Returns:
- ArrayList with Author objects
-
getAvailabilityStatus
public org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus getAvailabilityStatus()Method to get the AvailabilityStatus- Returns:
- the Availabilitystatus of the document
-
getClassCode
Gets the classCode- Returns:
- Code element with classCode
-
getCodedLanguage
Gets the codedLanguage- Returns:
- codedLanguage as String
-
getComments
-
getConfidentialityCodes
Gets the confidentialityCode list- Returns:
- the ArrayList with ConfidentialityCodes
-
getCreationTime
Gets the creationTime- Returns:
- creationTime as Date
-
getDocSourceActorOrganizationId
Gets the document source actors organization id- Returns:
- the document source actors organization id
-
getDocumentDescriptor
Gets the document descriptor of the document- Returns:
- the document descriptor of the document
-
getEntryUUID
Gets the EntryUUID- Returns:
- the EntryUUID
-
getFormatCode
Gets the formatCode- Returns:
- formatCode as Code
-
getHealthcareFacilityTypeCode
Gets the healthcareFacilityTypeCode- Returns:
- healthcareFacilityTypeCode as Code
-
getDocumentEntry
public org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry getDocumentEntry()Gets the mdht document entry type.- Returns:
- the mdht document entry type
-
getMetadataLanguage
Gets the meta data language- Returns:
- the meta data language
-
getMimeType
Gets the mimeType- Returns:
- mimeType as String
-
getPatient
Gets the patient. All information from the XDS Document Metadata will be extracted to the Convenience API Patient object.- Returns:
- patient
-
getPatientId
Gets the patient id.- Returns:
- patientId as Identificator
-
getPracticeSettingCode
Gets the practice setting code. This is the medical speciality of the practice where the document was produced (e.g. Code for "General Medicine")- Returns:
- the practiceSettingCode as Code
-
getSourcePatientId
Gets the source patient id. This is the local patient id, e.g. inside a hospital.- Returns:
- the sourcePatientId as Identificator
-
getTitle
Gets the title.- Returns:
- the title as String
-
getTypeCode
Gets the typeCode. Specifies the type of the document (like the class code, but more specific) (e.g. Code for "Summarization of Episode Note")- Returns:
- the typeCode as Code
-
getUniqueId
Gets the unique id. The UUID of the document.- Returns:
- the uniqueId
-
getUri
Gets the uri of the document.- Returns:
- the uri
-
hashCode
public int hashCode() -
setAvailabilityStatus
public void setAvailabilityStatus(org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus availabilityStatus) Method to set the AvailabilityStatusType;- Parameters:
availabilityStatus
- the availability status to set
-
setClassCode
Sets the (required, but in principle computable) class code, which defines the class of the document (e.g. Code for "Consultation")- Parameters:
code
- the new class code
-
setCodedLanguage
Sets the (required) coded language (e.g. "de-CH"). This code can be extracted from CDA Documents, automatically.- Parameters:
codedLanguage
- the new language code
-
setCreationTime
Sets the (required) creation time of the document. If not set, the current time will be used.- Parameters:
dateAndTime
- the new creation time
-
setDestinationPatientId
Sets the (required) destination patient id, which is used in the affinity domain (typically retrieved from a Master Patient Index (MPI))- Parameters:
id
- the new patient id
-
setDocSourceActorOrganizationId
Sets the document source actors organization id- Parameters:
docSourceActorOrgId
- the document source actors organization id
-
setDocumentDescriptor
Sets the document descriptor of the document- Parameters:
documentDescriptor
- the document descriptor of the document
-
setEntryUUID
Sets the entry uuid.- Parameters:
entryUuid
- the uuid to be set
-
setFormatCode
Sets the (required) format code. If not set, the system will try to derive it from the Document MimeType.- Parameters:
code
- the new format code
-
setHealthcareFacilityTypeCode
Sets the (required) healthcare facility type code (e.g. Code for "Hospital")- Parameters:
code
- the new healthcare facility type code
-
setMetadata
-
setMetadataLanguage
Sets the language of the document meta data- Parameters:
language
- the language
-
setMimeType
Sets the (required) mime type (e.g. "text/xml")- Parameters:
mimeType
- the new mime type
-
setPatient
Sets the (required) patient. All information relevant for the XDS Document Metadata will be extracted from the Convencience API Patient.- Parameters:
patient
- the new patient
-
setPracticeSettingCode
Sets the (required) practice setting code. This is the medical speciality of the practice where the document was produced (e.g. Code for "General Medicine")- Parameters:
code
- the new practice setting code
-
setSourcePatientId
Sets the (required) source patient id. This is the local patient id, e.g. inside a hospital.- Parameters:
id
- the new source patient id
-
setTitle
Sets the (optional) title.- Parameters:
title
- the title object to set
-
setTypeCode
Sets the (required) type code. Specifies the type of the document (like the class code, but more specific) (e.g. Code for "Summarization of Episode Note")- Parameters:
code
- the new type code
-
setUniqueId
Sets the unique id. The UUID of the document. Will be generated, when the instance of class is retrieved from ConvenienceCommunication.addDocument()- Parameters:
id
- the new unique id
-
setUri
Sets the uri of the document.- Parameters:
uri
- the new unique id
-
getCda
-
getXDoc
public org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry getXDoc()- Returns:
- the wrapped IPF document entry object (metadata)
-