Class FhirXdTransaction

java.lang.Object
org.projecthusky.fhir.communication.FhirXdTransaction

public class FhirXdTransaction extends Object
FhirXdTransaction supports the creation of destination and submission-set including documents from a HL7 FHIR Resource. The content of these resources is not currently documented. They are derived resources from FHIR. These resources may be created by the class org.projecthusky.demo.fhir.XDResources. This is currently the one any only way to create valid FHIR document resources for XD Transactions. You may edit these FHIR resources in a text editor in order to change the payload of the resulting transaction on your own risk.
See Also:
  • "https://www.hl7.org/fhir/"
  • Constructor Details

    • FhirXdTransaction

      public FhirXdTransaction()
  • Method Details

    • getAffinityDomain

      public AffinityDomain getAffinityDomain(FhirXdTransaction.Transaction transaction)
      Gets the eHC affinity domain object from the FHIR resource
      Parameters:
      transaction - the FHIR resource
      Returns:
      the eHC affinity domain object
    • getAuthor

      public Author getAuthor(org.hl7.fhir.r4.model.DocumentManifest fhirObject)
      Gets an eHC author object from the FHIR DocumentManifest object
      Parameters:
      fhirObject - the FHIR object
      Returns:
      eHC author object
    • getAuthor

      public Author getAuthor(org.hl7.fhir.r4.model.DocumentReference fhirObject)
      Gets an eHC author object from the FHIR DocumentReference object
      Parameters:
      fhirObject - the FHIR object
      Returns:
      eHC author object
    • getDocumentMetadatas

      public List<DocumentMetadata> getDocumentMetadatas(FhirXdTransaction.Transaction transaction, String receiverFacilityOid, String senderFacilityOid)
      Gets a list containing all document metadatas from the FHIR resource
      Parameters:
      transaction - the FHIR resource
      receiverFacilityOid - the receiverFacilityOid will be used to determine which of the patient ids is the destination patient id
      senderFacilityOid - the senderFacilityOid will be used to determine which of the patient ids is the source patient id
      Returns:
      list containing all document metadatas
    • getRegistry

      public Destination getRegistry(org.hl7.fhir.r4.model.DocumentManifest docManifest)
      Gets the registry as eHC Destination object from the FHIR resource
      Parameters:
      docManifest - the FHIR resource
      Returns:
      the registry as eHC Destination object
    • getRepositories

      public List<Destination> getRepositories(org.hl7.fhir.r4.model.DocumentManifest docManifest)
      Gets a list of repositories as eHC Destination objects from the FHIR resource
      Parameters:
      docManifest - the FHIR resource
      Returns:
      list of repositories
    • getResources

      public List<org.hl7.fhir.r4.model.Resource> getResources(org.hl7.fhir.r4.model.DocumentManifest docManifest)
      Gets a list of Resources
      Parameters:
      docManifest - the FHIR document
      Returns:
      the list of Resources
    • getSubmissionSetMetadata

      public SubmissionSetMetadata getSubmissionSetMetadata(FhirXdTransaction.Transaction transaction, String receiverFacilityOid)
      Gets the eHC submission-set metadata from the FHIR resource
      Parameters:
      transaction - the FHIR resource
      receiverFacilityOid - the receiverFacilityOid will be used to determine which of the patient ids is the destination patient id
      Returns:
      the submission-set metadata
    • readTransactionFromFile

      public FhirXdTransaction.Transaction readTransactionFromFile(String fileName)
      Read the transaction object from the FHIR resource file
      Parameters:
      fileName - the file name
      Returns:
      the transaction