The constructor described before also generates the followoing CDA header elements automatically:
id (with a new, generated UUID)
code (incl. translation to Swiss EPR metadata)
effectiveTime (with the current timestamp)
confidentialityCode (Normal; coding according to Swiss EPR metadata)
setId (same as the created id)
versionNumber (set to 1)
When creating a CDA document, you ...
need to add more elements (e.g. Patient, Author, Custodian, ...)
want to change some of the automatically created elements (e.g. id, set, effectiveTime, languageCode...).
When receiving a CDA document, you ...
want to process its content. Therefore, use the available convenience methods for the CDA header.
See also: Convenience methods of CDA-CH V2 for the CDA header.
Note: CdaChLrep does not provide own CDA header methods, but concentrates on the CDA body.
The data model for the CDA-CH-LREP profile defines at least one LaboratorySpecialtySection, containing exactly one LaboratoryReportDataProcessingEntry, containing exactly one SpeciemAct, containing one or more LaboratoryBatteryOrganizers.
Instead of adding all these elements by hand, just use the convenience method, which will create all necessary elements. It is important to add the underlying LaboratoryObservations and the SpecimenCollection entry before, so that the API can derive information for the created elements automatically.
See also: Convenience methods of CDA-CH V2 for the CDA body.
Narrative text in the CDA body
The narrative text is generated automatically as described for CDA-CH V2.
The analysis of the Demo Applications is recommended for getting started.
Use the DemoLREP demo for the current use case. It will generate example document instances following the case study in the specification and save them in a temp path. Further more, these documents are reloaded and updated by the demo in order to show and proof serialization and deserialization. And last but not least, all generated CDA documents are validated using the eHealth Connector built-in CDA Validator. The validaton is based on the Schematron rules, that have been exported from ART-DECOR.
If you are an application programmer and want to see, how the API is used to generate CDA-CH-LREP documents, take a look inside the java or dotnet demo project. The methods “org.ehealth_connector.demo.cda.DemoLrep.doDemo()” (java demo application) and “eHealthConnectorDemo.DemoLrep.doDemo()” (dotnet demo application) are good starting points.