The Document Consumer actor is a part of the eHealth Connector project. It provides a convenient implementation of the IHE Document Consumer actor, which queries a document registry for documents and retrieves documents from a document repository.
The main entry in the convenience API for the Document Consumer actor is the following class:
It supports the following main convenience methods:
These methods allow the query for documents in a document registry by using query parameters at your needs
These methods allow the retrieval of documents from a document repository by using the queried document ids from the
Most important API features
In general, the ehealth Connector simplifies the way to use standardized (IHE-based) documents and communication functions within healthcare applications. The convenience API uses simple datatypes and provides an intuitive and easy to use API to minimize the effort for reaching interoperability.
The package org.ehealth_connector.communication.xds.storedquery
contains query classes, which can be used with easy to use datatypes to create the document metadata
The class org.ehealth_connector.communication.DocumentRequest
represents the documentRequest itself. Typically you will get all of this information you need (repositoryId, repositoryUri, documentId) from the previously performed document query. Just look at the Javadoc, which gives specific instructions where you can find them.
The class org.ehealth_connector.communication.ConvenienceCommunication
can be used with the common datatypes or with the national (currently for Switzerland defined) enums. The class bundles IHE compliant communication functions:
queryDocuments: query for documents at a registry with different parameter sets (e.g. just the patientID)
retrieveDocument / retrieveDocuments: retrieve one or more document from one or a set of document repositories
Country specific implementations:
The package org.ehealth_connector.communication.ch.enums
contains enum classes, representing the current set of document metadata for Switzerland recommended by eHealth Suisse. You can access all the available attributes and display them in your application. The classes contain all the available (multilingual) descriptions as javadoc.
The package org.ehealth_connector.communication.ch.xds.storedquery
contains query classes, which can be used with the Swiss metadata enums described before.
The easiest way to get used to the API is to look at the provided examples in the eHealthConnector Demo Project, which can be downloaded from the sourceforge SVN (/demo).
There is a dotnet demo application which provides a UI to send files to the NIST Registry/Repository and to the Swiss EPR reference environment Registry/Repository. The latter demonstrates how the ehealth Connector simplifys the usage of document metadata that was defined for a specific affinity domain (also called community). In case of Swiss EPR reference environment Registry/Repository the metadata was defined for Switzerland. You will find the demo under: /demo/dotnet.
Another way is to start the java demo application via the Main.java class in /demo/java/ehealthconnectorDemo. This can either be done from your IDE (e.g. Eclipse) or from the shell. When you start the main class with the parameter “DemoDocConsumer”, the application performs the Document Consumer demo.
The demo does the following steps (.Net and Java demo are identical):
query for document references at the registry
query for document metadata for the last 10 document references
retrieves one xml document and stores it to disc
retrieves one pdf document and stores it to disc
The two documents will be queried and retrieved once via a secured (TLS) and once via an unencrypted (NON-TLS) transmission. Some information (document metadata), as well as the transaction results (success or fail) will be displayed on your console. You might want to check the Repository, if the transactions were well done. This can be done via the NIST log reader: http://ihexds.nist.gov/LogReader/ or the Swiss EPR reference environment simulator logs: https://ehealthsuisse.ihe-europe.net/xdstools4/
If you are an application programmer and want to see, how the API is used to perform the transmission, take a look inside the java demo project. The source class “org.ehealth_connector.demo.iti.xd.DemoDocConsumer” is a good starting point. Beside some helper methods, the method doDemo() demonstrates the usage of the API. Have a look at the comments of the source code to get further information.