...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <!-- Set up URL mappings because we need to control how our pages link together --> <bean id="rwandamohUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="order"><value>50</value></property> <property name="mappings"> <props> <prop key="module/rwandamoh/homepage.form">rwandamohHomepage</prop> <prop key="module/rwandamoh/dataentry/homepage.form">dataentryHomepage</prop> <prop key="module/rwandamoh/dataentry/patient.form">dataentryPatientDashboard</prop> <prop key="module/rwandamoh/dataentry/createPatient.form">dataentryCreatePatientController</prop> </props> </property> </bean> <!-- this is our overall homepage, which will include links to all apps --> <bean id="rwandamohHomepage" class="org.openmrs.module.ui.springmvc.web.HomepageController"> <property name="logoUrl" value="/moduleResources/rwandamoh/images/rwanda300.png"/> </bean> <!-- this is our create patient page --> <bean id="dataentryCreatePatientController" class="org.openmrs.module.ui.springmvc.web.dataentry.CreatePatientController"> <property name="returnUrl" value="/module/rwandamoh/dataentry/patient.form"/> <property name="app"><ref local="dataentryApp"/></property> </bean> <!-- this is the homepage for our main app, which includes a few widgets. The app itself is defined below --> <bean id="dataentryHomepage" class="org.openmrs.module.ui.springmvc.web.AppHomepageController"> <property name="app"><ref local="dataentryApp"/></property> <property name="widgets"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.PatientSearchWidget"> <property name="onClickUrl" value="/module/rwandamoh/dataentry/patient.form"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.ButtonWidget"> <property name="label" value="Create Patient"/> <property name="href" value="/module/rwandamoh/dataentry/createPatient.form"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.PatientViewedHistoryWidget"> <property name="onClickUrl" value="/module/rwandamoh/dataentry/patient.form"/> <property name="maxSize" value="10"/> </bean> </list> </property> </bean> <!-- this is our patient dashboard, with a few tabs --> <bean id="dataentryPatientDashboard" class="org.openmrs.module.ui.springmvc.web.PatientDashboardController"> <property name="app"><ref local="dataentryApp"/></property> <property name="config"> <bean class="org.openmrs.module.ui.springmvc.web.DashboardConfiguration"> <property name="tabs"> <list> <bean class="org.openmrs.module.ui.springmvc.web.TabConfiguration"> <property name="key" value="demographics"/> <property name="label" value="rwandamoh.demographics.title"/> <property name="contents"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.ImportUrlWidget"> <property name="url" value="/module/ui/springmvc/widget/demographicsWidget.form"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.ProgramEnrollmentWidget"> <property name="title" value="HIV Program Enrollment"/> <property name="programId" value="1"/> <property name="outcomeWorkflowIds"> <list> <value>1</value> </list> </property> <property name="enrollmentFormIds"> <list> <value>2</value> </list> </property> </bean> </list> </property> </bean> <bean class="org.openmrs.module.ui.springmvc.web.TabConfiguration"> <property name="key" value="medhistory"/> <property name="label" value="Medical History"/> <property name="contents"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.ObsGroupTableWidget"> <property name="title" value="Allergies / Side Effects"/> <property name="groupingConceptId" value="1295"/> <property name="columnConceptIds"> <map> <entry> <key><value>Suspected medication</value></key> <value>1296</value> </entry> <entry> <key><value>Reaction</value></key> <value>1297</value> </entry> <entry> <key><value>Action taken</value></key> <value>1643</value> </entry> </map> </property> <property name="addAnotherFormId" value="5"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.ObsGroupTableWidget"> <property name="title" value="Hospitalizations"/> <property name="groupingConceptId" value="3801"/> <property name="columnConceptIds"> <map> <entry> <key><value>Diagnosis</value></key> <value>2134</value> </entry> <entry> <key><value>Date</value></key> <value>3290</value> </entry> <entry> <key><value>Discharge date</value></key> <value>3800</value> </entry> </map> </property> <property name="addAnotherFormId" value="6"/> </bean> </list> </property> </bean> <bean class="org.openmrs.module.ui.springmvc.web.TabConfiguration"> <property name="key" value="labs"/> <property name="label" value="Labs"/> <property name="contents"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.FormTableWidget"> <property name="title" value="Lab results"/> <property name="formId" value="7"/> <property name="columns"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.SingleConceptColumn"> <property name="heading"><value><![CDATA[<small>Hb<br/>(g/dl)</small>]]></value></property> <property name="conceptId" value="21"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.SingleConceptColumn"> <property name="heading"><value><![CDATA[<small>Hct<br/>(%)</small>]]></value></property> <property name="conceptId" value="1015"/> </bean> <bean class="org.openmrs.module.ui.springmvc.web.widget.SingleConceptColumn"> <property name="heading"><value><![CDATA[<small>GB<br/>(x10<sup>9</sup>/l)</small>]]></value></property> <property name="conceptId" value="678"/> </bean> </list> </property> </bean> </list> </property> </bean> <bean class="org.openmrs.module.ui.springmvc.web.TabConfiguration"> <property name="key" value="graphs"/> <property name="label" value="Graphs"/> <property name="contents"> <list> <bean class="org.openmrs.module.ui.springmvc.web.widget.ObsGraphWidget"> <property name="title" value="CD4 History"/> <property name="conceptId" value="5497"/> <property name="minY" value="0"/> <property name="maxY" value="3000"/> </bean> </list> </property> </bean> </list> </property> </bean> </property> </bean> <!-- This is our main app --> <bean id="dataentryApp" class="org.openmrs.module.ui.springmvc.App"> <property name="parentHomepageUrl" value="/module/rwandamoh/homepage.form"/> <property name="name" value="HIV Flowsheet"/> <property name="homepageUrl" value="/module/rwandamoh/dataentry/homepage.form"/> <property name="iconFilename" value="/moduleResources/ui/springmvc/images/application64.png"/> </bean> <!-- another app that gives access to the regular OpenMRS admin pages --> <bean id="openmrsAdminApp" class="org.openmrs.module.ui.springmvc.App"> <property name="parentHomepageUrl" value="/module/rwandamoh/homepage.form"/> <property name="name" value="Configuration Settings"/> <property name="homepageUrl" value="/admin/index.htm"/> <property name="iconFilename" value="/moduleResources/ui/springmvc/images/configure64.png"/> </bean> <!-- Add our two apps to the list of all apps. (Multiple modules can add apps, and they'll all show up) --> <bean class="org.openmrs.module.ui.springmvc.AppList" factory-method="getInstance"> <property name="appsAdditional"> <list> <ref local="dataentryApp"/> <ref local="openmrsAdminApp"/> </list> </property> </bean> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <context:component-scan base-package="<at:var at:name="MODULE_PACKAGE" />@MODULE_PACKAGE@" /> </beans> |