org.eclipse.ohf.bridge.xds
Class AbstractXdsBridge

java.lang.Object
  extended by org.eclipse.ohf.bridge.xds.AbstractXdsBridge
All Implemented Interfaces:
XdsBridge

public abstract class AbstractXdsBridge
extends java.lang.Object
implements XdsBridge


Constructor Summary
AbstractXdsBridge()
           
 
Method Summary
 SubmitDocumentResponseType addCDADocumentUsingTemplateMetadataNoExtraction(java.lang.String cdaXml)
           
protected abstract  SubmitDocumentResponseType doAddCDADocumentWithoutExtractingMetadata(java.lang.String pCdaXml, java.io.InputStream pDocEntryStream, java.io.InputStream pSubmitSetStream)
           
 SubmitDocumentResponseType embedInCdaAndSendDocument(XDSDocType doc)
          Prepares, constructs and and submits a CDA R2 to an XDS registry/repository Takes a set datatype of variables for inclusion and constructs a properly-formatted CDA R2 document that corresponds to the data types.
protected abstract  QueryDocumentsResponseType goQueryDocuments(FindDocumentQueryType pFindDocumentQueryType, DocumentQueryPreferencesType searchPreferencesQuery)
           
protected abstract  QueryDocumentsResponseType goQueryDocuments(GetDocumentQueryType pGetDocumentQueryType, DocumentQueryPreferencesType pSearchPreferences)
           
protected abstract  QueryDocumentsResponseType goQueryDocumentsByPatientId(PatientIdType pPatientId, DocumentQueryPreferencesType searchPreferences)
           
protected abstract  XDSDocType goRetrieveDocument(java.lang.String pSearchId, boolean pIsUUID)
           
protected abstract  XDSDocType goRetrieveDocumentByUrl(java.lang.String pUrl)
           
 QueryDocumentsResponseType queryDocuments(FindDocumentQueryType pFindDocumentQueryType, DocumentQueryPreferencesType searchPreferences)
          Queries an XDS registry and returns an array of serializable objects of the form XDSBridgeDocument containing information about the resulting document or null if no matching documents are found.
 QueryDocumentsResponseType queryDocuments(GetDocumentQueryType pGetDocumentQueryType, DocumentQueryPreferencesType searchPreferences)
           
 QueryDocumentsResponseType queryDocumentsByPatientId(PatientIdType patientId, DocumentQueryPreferencesType searchPreferences)
          Queries an XDS registry and returns an array of serializable objects of the form XDSBridgeDocument containing information about the resulting document or null if no matching documents are found.
 RetrieveDocumentResponseType retrieveDocument(java.lang.String uniqueId, java.lang.String uuid)
          Performsn the final XDS registry search and returns a specific document by its Universally Unique Id (UUID) or registry-assigned Unique ID.
 RetrieveDocumentResponseType retrieveDocumentByUrl(java.lang.String pUrl)
          Performsn the final XDS registry search and returns a specific document by its URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ohf.bridge.xds.XdsBridge
addCDADocument
 

Constructor Detail

AbstractXdsBridge

public AbstractXdsBridge()
Method Detail

queryDocumentsByPatientId

public QueryDocumentsResponseType queryDocumentsByPatientId(PatientIdType patientId,
                                                            DocumentQueryPreferencesType searchPreferences)
                                                     throws java.lang.Exception
Description copied from interface: XdsBridge
Queries an XDS registry and returns an array of serializable objects of the form XDSBridgeDocument containing information about the resulting document or null if no matching documents are found. Returned object contains relevant metadata about the documents found in the search, including document title, size and MIME Type. Single parameter, patientId, should be obtained via a secondary search from either a PDQ or PIX repository.

Specified by:
queryDocumentsByPatientId in interface XdsBridge
Parameters:
patientId - The patient ID on which to search the XDS registry for matching documents.
Returns:
Array of document metadata that matched the search criteria
Throws:
java.lang.Exception
See Also:
org.eclipse.ohf.ihe.xds.consumer.Consumer, org.eclipse.ohf.ihe.xds.consumer.query.Query, org.eclipse.ohf.bridge.xds.XDSBridgeDocument

goQueryDocumentsByPatientId

protected abstract QueryDocumentsResponseType goQueryDocumentsByPatientId(PatientIdType pPatientId,
                                                                          DocumentQueryPreferencesType searchPreferences)
                                                                   throws java.lang.Exception
Throws:
java.lang.Exception

retrieveDocument

public RetrieveDocumentResponseType retrieveDocument(java.lang.String uniqueId,
                                                     java.lang.String uuid)
                                              throws java.lang.Exception
Description copied from interface: XdsBridge
Performsn the final XDS registry search and returns a specific document by its Universally Unique Id (UUID) or registry-assigned Unique ID. Returns an XDSBridgeDocument containing relevant metadata about the document and a Base64-encoded-equivalent of the document's binary or ASCII contents. Null is returned if the document is not found. The uniqueId or UUID can be obtained by using the queryDocumentByPatientId method.

Specified by:
retrieveDocument in interface XdsBridge
Parameters:
uniqueId - The Unique ID to retrieve the document
uuid - The UUID to retrieve the document
Returns:
The document requested and associated metadata
Throws:
java.lang.Exception

goRetrieveDocument

protected abstract XDSDocType goRetrieveDocument(java.lang.String pSearchId,
                                                 boolean pIsUUID)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

addCDADocumentUsingTemplateMetadataNoExtraction

public SubmitDocumentResponseType addCDADocumentUsingTemplateMetadataNoExtraction(java.lang.String cdaXml)
                                                                           throws java.lang.Exception
Throws:
java.lang.Exception

doAddCDADocumentWithoutExtractingMetadata

protected abstract SubmitDocumentResponseType doAddCDADocumentWithoutExtractingMetadata(java.lang.String pCdaXml,
                                                                                        java.io.InputStream pDocEntryStream,
                                                                                        java.io.InputStream pSubmitSetStream)
                                                                                 throws java.lang.Exception
Throws:
java.lang.Exception

embedInCdaAndSendDocument

public SubmitDocumentResponseType embedInCdaAndSendDocument(XDSDocType doc)
                                                     throws java.lang.Exception
Description copied from interface: XdsBridge
Prepares, constructs and and submits a CDA R2 to an XDS registry/repository Takes a set datatype of variables for inclusion and constructs a properly-formatted CDA R2 document that corresponds to the data types. Designed to allow EMR/EHR/PHR apps that do not handle CDA R2 natively to still submit documents to XDS.

Specified by:
embedInCdaAndSendDocument in interface XdsBridge
Parameters:
doc - XDSDocType containing necessary information to construct CDA R2 document
Returns:
Throws:
java.lang.Exception
See Also:
org.eclipse.ohf.ihe.xds.source

queryDocuments

public QueryDocumentsResponseType queryDocuments(FindDocumentQueryType pFindDocumentQueryType,
                                                 DocumentQueryPreferencesType searchPreferences)
                                          throws java.lang.Exception
Description copied from interface: XdsBridge
Queries an XDS registry and returns an array of serializable objects of the form XDSBridgeDocument containing information about the resulting document or null if no matching documents are found. Returned object contains relevant metadata about the documents found in the search, including document title, size and MIME Type. Single parameter, patientId, should be obtained via a secondary search from either a PDQ or PIX repository.

Specified by:
queryDocuments in interface XdsBridge
Returns:
Array of document metadata that matched the search criteria
Throws:
java.lang.Exception
See Also:
org.eclipse.ohf.ihe.xds.consumer.Consumer, org.eclipse.ohf.ihe.xds.consumer.query.Query, org.eclipse.ohf.bridge.xds.XDSBridgeDocument

queryDocuments

public QueryDocumentsResponseType queryDocuments(GetDocumentQueryType pGetDocumentQueryType,
                                                 DocumentQueryPreferencesType searchPreferences)
                                          throws java.lang.Exception
Specified by:
queryDocuments in interface XdsBridge
Throws:
java.lang.Exception

goQueryDocuments

protected abstract QueryDocumentsResponseType goQueryDocuments(GetDocumentQueryType pGetDocumentQueryType,
                                                               DocumentQueryPreferencesType pSearchPreferences)
                                                        throws java.lang.Exception
Throws:
java.lang.Exception

goQueryDocuments

protected abstract QueryDocumentsResponseType goQueryDocuments(FindDocumentQueryType pFindDocumentQueryType,
                                                               DocumentQueryPreferencesType searchPreferencesQuery)
                                                        throws java.lang.Exception
Throws:
java.lang.Exception

retrieveDocumentByUrl

public RetrieveDocumentResponseType retrieveDocumentByUrl(java.lang.String pUrl)
                                                   throws java.io.IOException,
                                                          ATNAAuditClientException,
                                                          java.security.GeneralSecurityException,
                                                          BridgeException
Description copied from interface: XdsBridge
Performsn the final XDS registry search and returns a specific document by its URL. Returns an XDSBridgeDocument containing relevant metadata about the document and a Base64-encoded-equivalent of the document's binary or ASCII contents. Null is returned if the document is not found. The uniqueId or UUID can be obtained by using the queryDocumentByPatientId method.

Specified by:
retrieveDocumentByUrl in interface XdsBridge
Returns:
The document requested and associated metadata
Throws:
java.net.MalformedURLException
java.io.IOException
ATNAAuditClientException
java.security.GeneralSecurityException
org.eclipse.ohf.bridge.conf.UnavailableResourcesException
BridgeException

goRetrieveDocumentByUrl

protected abstract XDSDocType goRetrieveDocumentByUrl(java.lang.String pUrl)
                                               throws java.io.IOException,
                                                      ATNAAuditClientException,
                                                      java.security.GeneralSecurityException,
                                                      org.eclipse.ohf.bridge.conf.UnavailableResourcesException,
                                                      BridgeException
Throws:
java.io.IOException
ATNAAuditClientException
java.security.GeneralSecurityException
org.eclipse.ohf.bridge.conf.UnavailableResourcesException
BridgeException