If you want to add more elements (e.g. another Author) just use the according method:
The data model for the Lrph profile defines one or more LaboratorySpecialtySection containing exactly one LaboratoryReportDataProcessingEntry containing exactly one SpeciemAct containing one or more LaboratoryBatteryOrganizer.
Instead of adding all these elements by hand just use the convenience method, which will create all necessary elements. 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: setNarrativeTextSectionLaboratorySpeciality(...), getNarrativeTextSectionLaboratorySpeciality(...)
getting the SpecimenAct from the fist LaboratorySpecialtySection of the Document: getSpecimenAct(...);
anonymization of the RecordTarget-element, according to the Lrph specification: applyPrivacyFilterHiv(), applyPrivacyFilterInitials()
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 the setNarrativeTextSectionLaboratorySpeciality() method.
If you want to use the automatic text generation, you simply pass the return value of the generateNarrativeTextLaboratoryObservations() method which is implemented in the base Class AbstractCdaCh and therefore available with identical output for all laboratory specialty 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 DemoLRPH 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 DemoLRPH, 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-LRPH documents, take a look inside the java or dotnet demo project. The methods “org.ehealth_connector.demo.cda.DemoLRPH.doDemo()” (java demo application) and “eHealthConnectorDemo.MainForm.btnCDACHDemo_Click()” (dotnet demo application) are good starting points.