Class DocumentMetadata

java.lang.Object
org.projecthusky.common.communication.DocumentMetadata
Direct Known Subclasses:
DocumentMetadataAt, DocumentMetadataCh

public class DocumentMetadata extends Object
Provides metadata attributes as specified in [IHE ITI TF-3], Table 4.1-5: Document Metadata
  • 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

      public DocumentMetadata(String language)
      Instantiates a new document meta data.
      Parameters:
      language - language of the meta data
    • DocumentMetadata

      public DocumentMetadata(POCDMT000040ClinicalDocument cdaDoc, String language)
      Instantiates a new document metadata.
      Parameters:
      cdaDoc - CDA document of metadata
      language - 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 metadata
      documentEntryType - 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

      public void addAuthor(Author author)
      Adds an (optional) author element. All information relevant for the XDS Document Metadata will be extracted from the Convenience API Author.
    • addConfidentialityCode

      public void addConfidentialityCode(Code code)
      Adds the (optional) confidentialityCode code (e.g. 'N' for 'normal')
      Parameters:
      code - the code
    • addConfidentialityCode

      public void addConfidentialityCode(ConfidentialityCode code)
      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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(DocumentMetadata other)
    • getAuthors

      public List<Author> 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

      public Code getClassCode()
      Gets the classCode
      Returns:
      Code element with classCode
    • getCodedLanguage

      public String getCodedLanguage()
      Gets the codedLanguage
      Returns:
      codedLanguage as String
    • getComments

      public String getComments()
    • getConfidentialityCodes

      public List<Code> getConfidentialityCodes()
      Gets the confidentialityCode list
      Returns:
      the ArrayList with ConfidentialityCodes
    • getCreationTime

      public ZonedDateTime getCreationTime()
      Gets the creationTime
      Returns:
      creationTime as Date
    • getDocSourceActorOrganizationId

      public String getDocSourceActorOrganizationId()
      Gets the document source actors organization id
      Returns:
      the document source actors organization id
    • getDocumentDescriptor

      public DocumentDescriptor getDocumentDescriptor()
      Gets the document descriptor of the document
      Returns:
      the document descriptor of the document
    • getEntryUUID

      public String getEntryUUID()
      Gets the EntryUUID
      Returns:
      the EntryUUID
    • getFormatCode

      public Code getFormatCode()
      Gets the formatCode
      Returns:
      formatCode as Code
    • getHealthcareFacilityTypeCode

      public 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

      public String getMetadataLanguage()
      Gets the meta data language
      Returns:
      the meta data language
    • getMimeType

      public String getMimeType()
      Gets the mimeType
      Returns:
      mimeType as String
    • getPatient

      public Patient getPatient()
      Gets the patient. All information from the XDS Document Metadata will be extracted to the Convenience API Patient object.
      Returns:
      patient
    • getPatientId

      public Identificator getPatientId()
      Gets the patient id.
      Returns:
      patientId as Identificator
    • getPracticeSettingCode

      public Code 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

      public Identificator getSourcePatientId()
      Gets the source patient id. This is the local patient id, e.g. inside a hospital.
      Returns:
      the sourcePatientId as Identificator
    • getTitle

      public String getTitle()
      Gets the title.
      Returns:
      the title as String
    • getTypeCode

      public Code 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

      public String getUniqueId()
      Gets the unique id. The UUID of the document.
      Returns:
      the uniqueId
    • getUri

      public String getUri()
      Gets the uri of the document.
      Returns:
      the uri
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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

      public void setClassCode(Code code)
      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

      public void setCodedLanguage(String codedLanguage)
      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

      public void setCreationTime(ZonedDateTime dateAndTime)
      Sets the (required) creation time of the document. If not set, the current time will be used.
      Parameters:
      dateAndTime - the new creation time
    • setDestinationPatientId

      public void setDestinationPatientId(Identificator id)
      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

      public void setDocSourceActorOrganizationId(String docSourceActorOrgId)
      Sets the document source actors organization id
      Parameters:
      docSourceActorOrgId - the document source actors organization id
    • setDocumentDescriptor

      public void setDocumentDescriptor(DocumentDescriptor documentDescriptor)
      Sets the document descriptor of the document
      Parameters:
      documentDescriptor - the document descriptor of the document
    • setEntryUUID

      public void setEntryUUID(String entryUuid)
      Sets the entry uuid.
      Parameters:
      entryUuid - the uuid to be set
    • setFormatCode

      public void setFormatCode(Code code)
      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

      public void setHealthcareFacilityTypeCode(Code code)
      Sets the (required) healthcare facility type code (e.g. Code for "Hospital")
      Parameters:
      code - the new healthcare facility type code
    • setMetadata

      public void setMetadata(DocumentMetadata metaData)
    • setMetadataLanguage

      public void setMetadataLanguage(String language)
      Sets the language of the document meta data
      Parameters:
      language - the language
    • setMimeType

      public void setMimeType(String mimeType)
      Sets the (required) mime type (e.g. "text/xml")
      Parameters:
      mimeType - the new mime type
    • setPatient

      public void setPatient(Patient patient)
      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

      public void setPracticeSettingCode(Code code)
      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

      public void setSourcePatientId(Identificator id)
      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

      public void setTitle(String title)
      Sets the (optional) title.
      Parameters:
      title - the title object to set
    • setTypeCode

      public void setTypeCode(Code code)
      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

      public void setUniqueId(String id)
      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

      public void setUri(String uri)
      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)