The best place to look for help / sample code is the Developer Forum: Eclipse Community Forums "Tools to Improve Model Performance .
You may need to create an (free) access account.
You can also go to the forums to post your specific MedicationsSection / immunization question for a specific answer.
Another good site is CDA Tools: MDHT Developer's Guide . See Produce CDA Content Using the MDHT API .
There are many examples of creating documents in test code projects. Download All In One (MDHT_CDATools) from GitHub linked on the MDHT project site and see the code in test projects such as: org.openhealthtools.mdht.cda.consol.example
The closest (current) thing to the GUI-based document creation application in MDHT will use all in one to modify existing models and generate fragments / documents in this way (or create a model from scratch that includes only what you need) . If you need an entire document created in XML, you can generate an instance from GeneralHeaderConstraints unlike any of many child templates (which will give you fragments). In any case, this is actually not the intention of the model interface (it is more suitable for correspondence), and you will need much more time than using the API itself, which refers to existing models in order to quickly generate compatible content.
source share