The Document Source actor is a part of the eHealthConnector project. It provides a convenient implementation of the IHE Document Source Actor, which uploads documents contained in one submission set to a document repository and registers them at a document registry.
The main entry in the convenience API for the Document Source actor is the following class:
It supports the following main convenience methods:
Producing a document submission-set:
These methods allow the addition of documents to a submission-set
Submitting a document submission-set:
These methods allow the submission of a set of documents in one submission set to a document repository
Most important API features
In general, the ehealthConnector 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 class org.ehealth_connector.communication.Destination
contains the necessary information to connect to an endpoint (a webservice in the internet).
The class org.ehealth_connector.communication.DocumentMetadata
contains information about the document that should be transmitted. The class uses easy datatypes and indicates if attributes are required by the XDS specification or optional.
The class org.ehealth_connector.communication.SubmissionSetMetadata
contains information about the submission set, which contains one or more documents. The use of this class is optional, because most information can be derived by the convenience API, automatically. In some nations you it is required to provide some information in the submission set (e.g. AuthorRole in Switzerland).
The class org.ehealth_connector.communication.FolderMetadata
contains information about the folder that should be transmitted. The class uses easy datatypes and indicates if attributes are required by the XDS specification or optional.
The class org.ehealth_connector.communication.ConvenienceCommunication
can be used with the common datatypes or with the national (currently for Switzerland defined, only - see below) enums. The class bundles IHE compliant communication functions:
addDocument / addChDocument:
you will use these methods first to get a documentMetadata object, which can be filled with your document metadata. You just need to provide a DocumentDescriptor, which indicated the format of the document (e.g. CDA or PDF) and the location of the document on the hard disc.
you will use this methods to get a folderMetadata object, which can be filled with the folder metadata. You just need to to provide the submissionSetContentType.
you will use this method to add a new added document using the addDocument / addChDocument method first or an existing already registered document to the folder.
sends the prepared documents (with or without given submissionSetMetadata) to a document repository. For your convenience in a setting in Switzerland, you can also provide the AuthorRole without the need to create a whole SubmissionSetMetadata object.
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 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 ehealthconnector 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 “DemoDocSource”, the application performs the Document Sopurce demo.
The demo does the following steps (.Net and Java demo are identical):
Sending an sample CDA document and a sample PDF document to the NIST and also to the Swiss EPR reference environment repository. The two documents will be sent to NIST once via a secured (TLS) and once via an unencrypted (NON-TLS) transmission and also for Swiss EPR reference environment. Some information, as well as the transaction results (success or fail) will be displayed on your console. You might want to check, if the metadata has arrived in the registry. 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.DemoDocSource” 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.