The constructor will also generate an empty custodian element, according to the Lrtp specification automatically. If you want to add more elements (e.g. another Author), just use the according method:
The data model for the Lrtp profile defines three sections (StudiesSummary, CodedVitalSigns, LaboratorySpecialtySection). Instead of adding all these elements by hand the API provides convenience functions, which will create the necessary elements (such as the sections):
creates / gets LaboratorySpecialtySection, LaboratoryReportDataProcessingEntry, SpecimenAct automatically: addLaboratoryBatteryOrganizer(LaboratoryBatteryOrganizer organizer), getLaboratoryBatteryOrganizerList() (It is important that you add the underlying LaboratoryObservation first so that the API can derive information for the created elements automatically.)
You will find more of these convenience "shortcuts" and other helpful functions in the API, e.g.:
setting / getting the human readable section text: setNarrativeTextSection(...), getNarrativeTextSection(...)
getting the SpecimenAct from the fist LaboratorySpecialtySection of the Document: getSpecimenAct(...);
anonymization of the RecordTarget-element, according to the Lrtp specification: applyPrivacyFilter()
creates and sets an emtpy Custodian element, according to the Lrtp specification: setEmtyCustodian()
Narrative text in the CDA body
Using the Convenience API, you may either compile and set the narrative text yourself or you may use the automatic text generation which is currently implemented for CDA-CH documents. In both cases, you set the narrative section text using one of the following methods:
setNarrativeTextSectionStudiesSummarySection() for the blood group
If you want to use the automatic text generation, you simply pass the return value of the corresponding method:
These are implemented in the base Classes AbstractCdaCh and AbstractLaboratoryReport and therefore available with identical output for all laboratory specialty sections, coded vital sign sections and all blood group sections in all CDA-CH documents.
The automatic text generation is currently available in English, German, French and Italian.
The analysis of the Demo Applications is recommended for getting started.
Use the DemoLRTP demo for the current use case. It will generate example document instances and save them in a temp path.
There exist also some HL7 FHIR resources that can be used to demonstrate the functionality. If you provide path and filename to DemoLRTP, it will generate appropriate CDA documents. The FHIR resources can be found in rsc\demoCdaChLrxx.
If you are an application programmer and want to see, how the API is used to generate CDA-CH-LRTP documents, take a look inside the java or dotnet demo project. The methods “org.ehealth_connector.demo.cda.DemoLRTP.doDemo()” (java demo application) and “eHealthConnectorDemo.MainForm.btnCDACHDemo_Click()” (dotnet demo application) are good starting points.