Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • add appropriate code in sqldiff.xml (or liquibase.xml, for more info see : https://wikiopenmrs.openmrsatlassian.orgnet/wiki/display/docs/Module+liquibase+File ) to add the column to the table
  • add an entry for the module's Encounter.hbm file under mappingFiles in config.xml
  • create an empty service to call the module's encounter that extends OpenMRS's EncounterService object
  • create an hbm file for the module's encounter with the following mapping format
    Code Block
     <hibernate-mapping auto-import="false">
        <subclass name="org.openmrs.module.atdproducer.Encounter"
                extends="org.openmrs.Encounter" discriminator-value="not null">
            <property name="scheduledTime" type="java.util.Date"
                    column="scheduled_datetime"/>
        </subclass>
    </hibernate-mapping>
    
    For this hbm file to work, the following xml must exist in the OpenMRS Encounter.hbm file:
    Code Block
    <discriminator column="encounter_id" insert="false" />
    

...

Code Block
public void setTestDAO(org.openmrs.module.atdproducer.db.EncounterDAO dao){
        this.dao = dao;
        super.setEncounterDAO(this.dao);    
}

The method name should match the property xml wrapped around the hibernate implementation class in the moduleApplicationContext.xml file. Mine looks like this:<property name="testDAO">

...