Versions Compared

Key

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

...

How to Create a DiagnosticReportHandler

 

Requirements

 

Examples

 

Laboratory Handler

 

Register LaboratoryHandler

Register handler in FHIR module ModuleApplicationContext.xml configuration (locate in /api/src/main/resources/moduleApplicationContext.xml).

Code Block
DiagnosticReport
themeConfluence
languagexml
titlemoduleApplicationContext.xml
linenumberstrue
collapsetrue
 <bean parent="serviceContext">
        <property name="moduleService">
            <list>
                <value>org.openmrs.module.fhir.api.DiagnosticReportService</value>
                <bean
                        class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
                    <property name="transactionManager">
                        <ref bean="transactionManager"/>
                    </property>
                    <property name="target">
                        <bean class="org.openmrs.module.fhir.api.impl.DiagnosticReportServiceImpl">
                            <property name="dao">
                                <bean class="org.openmrs.module.fhir.api.db.hibernate.HibernateFHIRDAO">
                                    <property name="sessionFactory">
                                        <ref bean="sessionFactory"/>
                                    </property>
                                </bean>
                            </property>
                            <property name="handlers">
                                <map>
                                    <entry>
                                        <key><value>DefaultDiagnosticReportHandler</value></key>
                                        <bean class="org.openmrs.module.fhir.api.diagnosticreport.handler.DefaultDiagnosticReportHandler"/>
                                    </entry>
                                    <entry>
                                        <key><value>LaboratoryHandler</value></key>
                                        <bean class="org.openmrs.module.fhir.api.diagnosticreport.handler.LaboratoryHandler"/>
                                    </entry>
                                </map>
                            </property>
                        </bean>
                    </property>
                </bean>
            </list>
        </property>
    </bean>

...