Class FhirXdTransaction
java.lang.Object
org.projecthusky.fhir.communication.FhirXdTransaction
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/"
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The class Transaction is a derived FHIR resource containing all information about destination and submission-set including documents for a transaction (e.g. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAffinityDomain
(FhirXdTransaction.Transaction transaction) Gets the eHC affinity domain object from the FHIR resourcegetAuthor
(org.hl7.fhir.r4.model.DocumentManifest fhirObject) Gets an eHC author object from the FHIR DocumentManifest objectgetAuthor
(org.hl7.fhir.r4.model.DocumentReference fhirObject) Gets an eHC author object from the FHIR DocumentReference objectgetDocumentMetadatas
(FhirXdTransaction.Transaction transaction, String receiverFacilityOid, String senderFacilityOid) Gets a list containing all document metadatas from the FHIR resourcegetRegistry
(org.hl7.fhir.r4.model.DocumentManifest docManifest) Gets the registry as eHC Destination object from the FHIR resourcegetRepositories
(org.hl7.fhir.r4.model.DocumentManifest docManifest) Gets a list of repositories as eHC Destination objects from the FHIR resourceList<org.hl7.fhir.r4.model.Resource>
getResources
(org.hl7.fhir.r4.model.DocumentManifest docManifest) Gets a list of ResourcesgetSubmissionSetMetadata
(FhirXdTransaction.Transaction transaction, String receiverFacilityOid) Gets the eHC submission-set metadata from the FHIR resourcereadTransactionFromFile
(String fileName) Read the transaction object from the FHIR resource file
-
Constructor Details
-
FhirXdTransaction
public FhirXdTransaction()
-
-
Method Details
-
getAffinityDomain
Gets the eHC affinity domain object from the FHIR resource- Parameters:
transaction
- the FHIR resource- Returns:
- the eHC affinity domain object
-
getAuthor
Gets an eHC author object from the FHIR DocumentManifest object- Parameters:
fhirObject
- the FHIR object- Returns:
- eHC author object
-
getAuthor
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 resourcereceiverFacilityOid
- the receiverFacilityOid will be used to determine which of the patient ids is the destination patient idsenderFacilityOid
- the senderFacilityOid will be used to determine which of the patient ids is the source patient id- Returns:
- list containing all document metadatas
-
getRegistry
Gets the registry as eHC Destination object from the FHIR resource- Parameters:
docManifest
- the FHIR resource- Returns:
- the registry as eHC Destination object
-
getRepositories
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 resourcereceiverFacilityOid
- the receiverFacilityOid will be used to determine which of the patient ids is the destination patient id- Returns:
- the submission-set metadata
-
readTransactionFromFile
Read the transaction object from the FHIR resource file- Parameters:
fileName
- the file name- Returns:
- the transaction
-