...
Users can extend module by adding new CDA document Type or Editing existing one. Each CDA document consist of few sections and users can also add new sections to the module or Edit existing ones.The Editing/Adding/Deleting of Sections and CDA document types can be done programmatically through code not the User Interface.
1) Steps to Add a new CDA Document Type
- fork our module from gitub here
- open "CDAGenerator-api"folder
- In src/main/java package try to locate "org.openmrs.module.CDAGenerator.CDAHandlerCDAHandlers" package
- Now in this "org.openmrs.module.CDAGenerator.CDAHandlerCDAHandlers" package, Create class for new CDA Document Type you need and Note that this class must extend BaseCdaTypeHandler class.
- Add details about documents either using setter methods or adding in constructor. Thats it and new CDA document type is ready!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
package org.openmrs.module.CDAGenerator.CDAHandlers; public class MyCDADocument extends BaseCdaTypeHandler { public MyCDADocument() { this.documentFullName="MyCDADocument"; this.documentShortName="MCD"; this.documentDescription="to add new cda document type"; this.templateid="some free text";//required attribute,not null this.formatCode=null; //optional attribute } } |
2) Steps to Add a new Section
- fork our module from gitub here
- open "CDAGenerator-api"folder
- In src/main/java package try to locate "org.openmrs.module.CDAGenerator.SectionHandlers" package
- Now in this "org.openmrs.module.CDAGenerator.SectionHandlers" package, Create class for new section you need and Note that this class must extend BaseCdaSectionHandler class.
- Add details about section either using setter methods or adding in constructor. Thats it and new Section is ready!
Image showing location to add new sections
Screenshots
1) When module is loaded Administration tab looks like this
...