Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
title Sample piece of code Code showing how New CDA Document type Class Must look like
firstline1
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
    }
}
    

...

  • 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


Sample Code

Code Block
languagejava
titleCode showing how New Section Class Must look like
firstline1
package org.openmrs.module.CDAGenerator.SectionHandlers;
public class MySection extends BaseCdaSectionHandler
{

public ChiefComplaintSection()
{
    this.sectionName="My Section";
    this.templateid="";//ihe specific id
    this.sectionDescription="This is my new section";
    this.code="";//Ihe specific code for section
}
}

 

 

 

 

 

 

Screenshots

1) When module is loaded Administration tab looks like this

...