Modified:
branches/bmas-staging/lib/org/freemedsoftware/module/PatientModule.class.php
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientForm.java
Log:
Resolved Bug #114
Modified: branches/bmas-staging/lib/org/freemedsoftware/module/PatientModule.class.php
===================================================================
--- branches/bmas-staging/lib/org/freemedsoftware/module/PatientModule.class.php 2010-03-12 16:42:07 UTC (rev 5291)
+++ branches/bmas-staging/lib/org/freemedsoftware/module/PatientModule.class.php 2010-03-12 16:59:05 UTC (rev 5292)
@@ -84,7 +84,8 @@
'iso',
'ptblood',
'ptbudg',
- 'ptbilltype'
+ 'ptbilltype',
+ 'ptprimaryfacility'
);
var $address_keys = array (
'patient',
Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientForm.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientForm.java 2010-03-12 16:42:07 UTC (rev 5291)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/PatientForm.java 2010-03-12 16:59:05 UTC (rev 5292)
@@ -175,6 +175,8 @@
public final static String moduleName = "PatientModule";
private static List<PatientForm> patientFormList=null;
+
+ protected SupportModuleWidget primaryFacility;
//Creates only desired amount of instances if we follow this pattern otherwise we have public constructor as well
public static PatientForm getInstance(){
PatientForm patientForm=null;
@@ -208,7 +210,7 @@
if (event.getSelectedItem() == 3)
martialStatus.setFocus(true);
if (event.getSelectedItem() == 4)
- preferredPharmacy.setFocus(true);
+ primaryFacility.setFocus(true);
}
});
verticalPanel.add(tabPanel);
@@ -554,7 +556,15 @@
// bloodType.addItem("AB-","AB-");
// bloodType.setVisibleItemCount(1);
// medicalTable.setWidget(0, 1, bloodType);
-
+
+ final Label primaryFacilityLabel = new Label("Primary Facility");
+ medicalTable.setWidget(0, 0, primaryFacilityLabel);
+
+ primaryFacility = new SupportModuleWidget("FacilityModule");
+ medicalTable.setWidget(0, 1, primaryFacility);
+ primaryFacility.setWidth("100%");
+
+
final Label preferredPharmacyLabel = new Label("Preferred Pharmacy");
medicalTable.setWidget(1, 0, preferredPharmacyLabel);
@@ -1058,6 +1068,8 @@
// Medical screen
// bloodType.setWidgetValue((String) result.get((String) "ptblood"));
+ if(result.get((String) "ptprimaryfacility")!=null & result.get((String) "ptprimaryfacility").length()>0)
+ primaryFacility.setValue(new Integer(result.get((String) "ptprimaryfacility")));
if(result.get((String) "ptpharmacy")!=null & result.get((String) "ptpharmacy").length()>0)
preferredPharmacy.setValue(new Integer(result.get((String) "ptpharmacy")));
if(result.get((String) "ptdoc")!=null & result.get((String) "ptdoc").length()>0)
@@ -1161,6 +1173,8 @@
// Medical screen
// m.put((String) "ptblood", (String) bloodType.getWidgetValue());
+ if(primaryFacility.getText().length()>0)
+ m.put((String) "ptprimaryfacility", (String) primaryFacility.getStoredValue());
if(preferredPharmacy.getText().length()>0)
m.put((String) "ptpharmacy", (String) preferredPharmacy.getStoredValue());
if(inHouseDoctor.getText().length()>0)