r5755 - in branches/bmas-staging: data/schema/mysql lib/org/freemedsoftware/module ui/gwt/src/org/freemedsoftware/gwt/client ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient ui/gwt/src/org/freemedsoftware/gwt/client/widget

0 views
Skip to first unread message

subve...@svn.freemedsoftware.org

unread,
Jul 28, 2010, 8:26:10 AM7/28/10
to freemed-d...@googlegroups.com
Author: hamid
Date: 2010-07-28 08:26:10 -0400 (Wed, 28 Jul 2010)
New Revision: 5755

Added:
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomLink.java
Modified:
branches/bmas-staging/data/schema/mysql/config.sql
branches/bmas-staging/data/schema/mysql/treatment_counselor_intake_d6.sql
branches/bmas-staging/lib/org/freemedsoftware/module/TreatmentCounselorIntakeD6.class.php
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/CurrentState.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/CounselorIntakeEntry.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/TreatmentClinicalNotes.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomRadioButtonGroup.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/PatientWidget.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/ProviderWidget.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SupportModuleWidget.java
branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/UserWidget.java
Log:
[FreeMED - Feature #528] (Resolved) Treatment - Counselor Intake Form - Dimension 6
[FreeMED - Bug #534] (Resolved) Searchable fields minmum character count for search should be configurable through system configuration

Modified: branches/bmas-staging/data/schema/mysql/config.sql
===================================================================
--- branches/bmas-staging/data/schema/mysql/config.sql 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/data/schema/mysql/config.sql 2010-07-28 12:26:10 UTC (rev 5755)
@@ -287,3 +287,12 @@
''
);

+CALL config_Register (
+ 'smart_search_char_len',
+ '2',
+ 'Smart Search Charcters Length',
+ 'UI',
+ 'Select',
+ '1,2,3,4,5,6,7,8,9,10'
+);
+

Modified: branches/bmas-staging/data/schema/mysql/treatment_counselor_intake_d6.sql
===================================================================
--- branches/bmas-staging/data/schema/mysql/treatment_counselor_intake_d6.sql 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/data/schema/mysql/treatment_counselor_intake_d6.sql 2010-07-28 12:26:10 UTC (rev 5755)
@@ -144,11 +144,7 @@
, havfamilytreatmentdesc VARCHAR (1)
, familytreatmentdesc VARCHAR (250)

- , famcatastrophicdesc VARCHAR (250)
- , famseverdesc VARCHAR (250)
- , fammoderatedesc VARCHAR (250)
- , fammilddesc VARCHAR (250)
- , famnonedesc VARCHAR (250)
+ , familyhistory VARCHAR (50)
, familyhistorydesc VARCHAR (250)

, motherkeepsdrugsinpreg VARCHAR (1)

Modified: branches/bmas-staging/lib/org/freemedsoftware/module/TreatmentCounselorIntakeD6.class.php
===================================================================
--- branches/bmas-staging/lib/org/freemedsoftware/module/TreatmentCounselorIntakeD6.class.php 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/lib/org/freemedsoftware/module/TreatmentCounselorIntakeD6.class.php 2010-07-28 12:26:10 UTC (rev 5755)
@@ -138,11 +138,7 @@
, 'livewithwho'
, 'havfamilytreatmentdesc'
, 'familytreatmentdesc'
- , 'famcatastrophicdesc'
- , 'famseverdesc'
- , 'fammoderatedesc'
- , 'fammilddesc'
- , 'famnonedesc'
+ , 'familyhistory'
, 'familyhistorydesc'
, 'motherkeepsdrugsinpreg'
, 'motherkeepsdrugsinpregdesc'

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/CurrentState.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/CurrentState.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/CurrentState.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -105,8 +105,10 @@

public static boolean FormAutosaveEnable = true;

- public static Integer FormAutosaveInterval = 60*1000;
+ protected static Integer FormAutosaveInterval = 60*1000;

+ protected static Integer MinCharCountForSmartSearch = 1;
+
public CurrentState() {
retrieveUserConfiguration(true);
retrieveSystemConfiguration(true, null);
@@ -225,6 +227,15 @@
public static void assignFormAutoSaveInterval(Integer interval) {
FormAutosaveInterval = interval;
}
+
+ /**
+ * Assign minimum characters count for smart search fields
+ *
+ * @param boolean
+ */
+ public static void assignMinCharCountForSmartSearch(Integer charCount) {
+ MinCharCountForSmartSearch = charCount;
+ }

/**
* Add an item to the status bar stack.
@@ -298,10 +309,15 @@
public static boolean getFormAutoSave() {
return FormAutosaveEnable;
}
+
public static Integer getFormAutoSaveInterval() {
return FormAutosaveInterval;
}

+ public static Integer getMinCharCountForSmartSearch() {
+ return MinCharCountForSmartSearch;
+ }
+
public static HashMap<Integer, PatientScreen> getPatientScreenMap() {
return patientScreenMap;
}
@@ -591,6 +607,9 @@

if(getSystemConfig("form_autosave_interval")!=null)
assignFormAutoSaveInterval(Integer.parseInt(getSystemConfig("form_autosave_interval")) * 1000);
+
+ if(getSystemConfig("smart_search_char_len")!=null)
+ assignMinCharCountForSmartSearch(Integer.parseInt(getSystemConfig("smart_search_char_len")));
}

/**

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/CounselorIntakeEntry.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/CounselorIntakeEntry.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/CounselorIntakeEntry.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -52,6 +52,8 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.event.logical.shared.ValueChangeEvent;
+import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
@@ -61,6 +63,7 @@
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
@@ -90,7 +93,7 @@

protected VerticalPanel containerDimension1Form;

- protected HashMap<String, Widget> containerDimension1 = new HashMap<String, Widget>();//containerInitialForm Fields Container
+ protected HashMap<String, Widget> containerDimension1FormFields = new HashMap<String, Widget>();//containerInitialForm Fields Container

protected VerticalPanel containerDimension2Form;

@@ -116,7 +119,6 @@

protected HashMap<String, Widget> nonEditableFormFields = new HashMap<String, Widget>();//patient table Fields Container

-
protected int dimension1Point1PrevLen = 0;

protected int dimension1Point2PrevLen = 0;
@@ -190,7 +192,10 @@
protected boolean dimension5Saved = false;
protected boolean dimension6Saved = false;

+ protected VerticalPanel adolAdultVPanel = null;

+ protected VerticalPanel adolAdultLesuireVPanel = null;
+
protected boolean requestAlreadySent = false;

protected Timer autoSaveTimer;
@@ -398,7 +403,7 @@
public void run() {
try {

- int dimension1Point1NewLen = Util.populateHashMap(containerDimension1).toString().length();
+ int dimension1Point1NewLen = Util.populateHashMap(containerDimension1FormFields).toString().length();

//Handling D2
int dimension2NewLen = Util.populateHashMap(containerDimension2FormFields).toString().length();
@@ -485,7 +490,7 @@
protected void saveD1(){
HashMap<String, String> data;

- data = Util.populateHashMap(containerDimension1);
+ data = Util.populateHashMap(containerDimension1FormFields);

setDefaultValuesIfNull(data, defaultValuesForNullFields);

@@ -638,7 +643,7 @@

});
historyOvrDosesHPanel.add(historyOvrDoses);
- containerDimension1.put("histovrdoses", historyOvrDoses);
+ containerDimension1FormFields.put("histovrdoses", historyOvrDoses);

FlexTable flexTable = new FlexTable();
historyOvrDosesVPanel.add(flexTable);
@@ -679,22 +684,22 @@
final TextBox when = new TextBox();
when.setWidth("100%");
flexTable.setWidget(row, 0, when);
- containerDimension1.put(value+"when", when);
+ containerDimension1FormFields.put(value+"when", when);

final TextBox substance = new TextBox();
substance.setWidth("100%");
flexTable.setWidget(row, 1, substance);
- containerDimension1.put(value+"subs", substance);
+ containerDimension1FormFields.put(value+"subs", substance);

final TextBox treatment = new TextBox();
treatment.setWidth("100%");
flexTable.setWidget(row, 2, treatment);
- containerDimension1.put(value+"trt", treatment);
+ containerDimension1FormFields.put(value+"trt", treatment);

final CustomRadioButtonGroup accidentalOrIntentional = new CustomRadioButtonGroup("accidentalOrIntentional"+value);
accidentalOrIntentional.addItem("Accidental", "acc");
accidentalOrIntentional.addItem("intentional", "int");
- containerDimension1.put(value+"accorint", accidentalOrIntentional);
+ containerDimension1FormFields.put(value+"accorint", accidentalOrIntentional);
flexTable.setWidget(row, 3, accidentalOrIntentional);

row++;
@@ -726,12 +731,12 @@

});
immediateRiskHPanel.add(immediateRisk);
- containerDimension1.put("isptatimmdtrsk", immediateRisk);
+ containerDimension1FormFields.put("isptatimmdtrsk", immediateRisk);


immediateRiskDesc.getElement().setPropertyString("cols", "50");
containerDimension1Form.add(immediateRiskDesc);
- containerDimension1.put("isptatimmdtrskdesc", immediateRiskDesc);
+ containerDimension1FormFields.put("isptatimmdtrskdesc", immediateRiskDesc);


final Label substanceUselabel = new Label("Substance use history (If substance is an opiate specify which type)");
@@ -764,21 +769,21 @@
flexTable.setWidget(row, 0, substanceUseSubLabel);
final SupportModuleWidget substanceUse = new SupportModuleWidget("IcdCodes");
flexTable.setWidget(row, 1, substanceUse);
- containerDimension1.put(value, substanceUse);
+ containerDimension1FormFields.put(value, substanceUse);
defaultValuesForNullFields.put(value, "Denied Use");

final Label substanceUseLastUsedLabel = new Label("When last used:");
flexTable.setWidget(row, 2, substanceUseLastUsedLabel);
final TextBox substanceUseLastUsed = new TextBox();
flexTable.setWidget(row, 3, substanceUseLastUsed);
- containerDimension1.put(value+"lastuse", substanceUseLastUsed);
+ containerDimension1FormFields.put(value+"lastuse", substanceUseLastUsed);
defaultValuesForNullFields.put(value+"lastuse", "Denied Use");

final Label substanceUseRoutLabel = new Label("Preferred route:");
flexTable.setWidget(row, 4, substanceUseRoutLabel);
final TextBox substanceUseRout = new TextBox();
flexTable.setWidget(row, 5, substanceUseRout);
- containerDimension1.put(value+"prefrt", substanceUseRout);
+ containerDimension1FormFields.put(value+"prefrt", substanceUseRout);
defaultValuesForNullFields.put(value+"prefrt", "Denied Use");
row++;

@@ -786,21 +791,21 @@
flexTable.setWidget(row, 0, substanceUseFirstUsedLabel);
final TextBox substanceUseFirstUsed = new TextBox();
flexTable.setWidget(row, 1, substanceUseFirstUsed);
- containerDimension1.put(value+"agefrstuse", substanceUseFirstUsed);
+ containerDimension1FormFields.put(value+"agefrstuse", substanceUseFirstUsed);
defaultValuesForNullFields.put(value+"agefrstuse", "Denied Use");

final Label substanceUseSteadyUsedLabel = new Label("Age steady use:");
flexTable.setWidget(row, 2, substanceUseSteadyUsedLabel);
final TextBox substanceUseSteadyUsed = new TextBox();
flexTable.setWidget(row, 3, substanceUseSteadyUsed);
- containerDimension1.put(value+"agestdyuse", substanceUseSteadyUsed);
+ containerDimension1FormFields.put(value+"agestdyuse", substanceUseSteadyUsed);
defaultValuesForNullFields.put(value+"agestdyuse", "Denied Use");

final Label substanceUsePeakUsedLabel = new Label("Amount at peak use:");
flexTable.setWidget(row, 4, substanceUsePeakUsedLabel);
final TextBox substanceUsePeakUsed = new TextBox();
flexTable.setWidget(row, 5, substanceUsePeakUsed);
- containerDimension1.put(value+"amntpkuse", substanceUsePeakUsed);
+ containerDimension1FormFields.put(value+"amntpkuse", substanceUsePeakUsed);
defaultValuesForNullFields.put(value+"amntpkuse", "Denied Use");

row++;
@@ -828,19 +833,19 @@
}
});
flexTable.setWidget(row, 1, substanceUse60Days);
- containerDimension1.put(value+"use60dyago", substanceUse60Days);
+ containerDimension1FormFields.put(value+"use60dyago", substanceUse60Days);
defaultValuesForNullFields.put(value+"use60dyago", "Denied Use");

final Label substanceUse60DaysAmtLabel = new Label("Amount:");
flexTable.setWidget(row, 2, substanceUse60DaysAmtLabel);
flexTable.setWidget(row, 3, substanceUse60DaysAmt);
- containerDimension1.put(value+"use60dyagoamnt", substanceUse60DaysAmt);
+ containerDimension1FormFields.put(value+"use60dyagoamnt", substanceUse60DaysAmt);
defaultValuesForNullFields.put(value+"use60dyagoamnt", "Denied Use");

final Label substanceUse60DaysFreqLabel = new Label("Frequency:");
flexTable.setWidget(row, 4, substanceUse60DaysFreqLabel);
flexTable.setWidget(row, 5, substanceUse60DaysFreq);
- containerDimension1.put(value+"use60dyagofrq", substanceUse60DaysFreq);
+ containerDimension1FormFields.put(value+"use60dyagofrq", substanceUse60DaysFreq);
defaultValuesForNullFields.put(value+"use60dyagofrq", "Denied Use");

row++;
@@ -868,19 +873,19 @@
}
});
flexTable.setWidget(row, 1, substanceUse30Days);
- containerDimension1.put(value+"use30dyago", substanceUse30Days);
+ containerDimension1FormFields.put(value+"use30dyago", substanceUse30Days);
defaultValuesForNullFields.put(value+"use30dyago", "Denied Use");

final Label substanceUse30DaysAmtLabel = new Label("Amount:");
flexTable.setWidget(row, 2, substanceUse30DaysAmtLabel);
flexTable.setWidget(row, 3, substanceUse30DaysAmt);
- containerDimension1.put(value+"use30dyagoamnt", substanceUse30DaysAmt);
+ containerDimension1FormFields.put(value+"use30dyagoamnt", substanceUse30DaysAmt);
defaultValuesForNullFields.put(value+"use30dyagoamnt", "Denied Use");

final Label substanceUse30DaysFreqLabel = new Label("Frequency:");
flexTable.setWidget(row, 4, substanceUse30DaysFreqLabel);
flexTable.setWidget(row, 5, substanceUse30DaysFreq);
- containerDimension1.put(value+"use30dyagofrq", substanceUse30DaysFreq);
+ containerDimension1FormFields.put(value+"use30dyagofrq", substanceUse30DaysFreq);
defaultValuesForNullFields.put(value+"use30dyagofrq", "Denied Use");
row++;
}
@@ -891,18 +896,18 @@
subUseHistoryHPanel.add(substanceUseHistorylabel);

final VerticalPanel subUseHistoryVPanel = new VerticalPanel();
+ subUseHistoryVPanel.setWidth("100%");
subUseHistoryVPanel.setVisible(false);
containerDimension1Form.add(subUseHistoryVPanel);
- subUseHistoryVPanel.setWidth("100%");
flexTable = new FlexTable();
subUseHistoryVPanel.add(flexTable);
flexTable.setSize("100%", "100%");

final CustomRadioButtonGroup subUseHistory = new CustomRadioButtonGroup("issubusehist");
subUseHistory.addItem("Yes", "y", new Command() {
-
@Override
public void execute() {
+ Window.alert("yes");
subUseHistoryVPanel.setVisible(true);
}

@@ -916,7 +921,7 @@

});
subUseHistoryHPanel.add(subUseHistory);
- containerDimension1.put("issubusehist", subUseHistory);
+ containerDimension1FormFields.put("issubusehist", subUseHistory);

row=0;
{
@@ -986,37 +991,37 @@
//specify.getElement().setPropertyString("cols", "12");
specify.setWidth("70%");
flexTable.setWidget(row, 1, specify);
- containerDimension1.put(value+"Spcfy", specify);
+ containerDimension1FormFields.put(value+"Spcfy", specify);

final TextArea curUse = new TextArea();
//curUse.getElement().setPropertyString("cols", "12");
curUse.setWidth("70%");
flexTable.setWidget(row, 2, curUse);
- containerDimension1.put(value+"curuse", curUse);
+ containerDimension1FormFields.put(value+"curuse", curUse);

final TextArea peakUse = new TextArea();
//peakUse.getElement().setPropertyString("cols", "12");
peakUse.setWidth("70%");
flexTable.setWidget(row, 3, peakUse);
- containerDimension1.put(value+"pkuse", peakUse);
+ containerDimension1FormFields.put(value+"pkuse", peakUse);

final TextArea lengthofpeakUse = new TextArea();
//lengthofpeakUse.getElement().setPropertyString("cols", "12");
lengthofpeakUse.setWidth("70%");
flexTable.setWidget(row, 4, lengthofpeakUse);
- containerDimension1.put(value+"lenpkuse", lengthofpeakUse);
+ containerDimension1FormFields.put(value+"lenpkuse", lengthofpeakUse);

final TextArea ageOf1stUse = new TextArea();
//ageOf1stUse.getElement().setPropertyString("cols", "12");
ageOf1stUse.setWidth("70%");
flexTable.setWidget(row, 5, ageOf1stUse);
- containerDimension1.put(value+"agefrstuse", ageOf1stUse);
+ containerDimension1FormFields.put(value+"agefrstuse", ageOf1stUse);

final TextArea lastUse = new TextArea();
//lastUse.getElement().setPropertyString("cols", "12");
lastUse.setWidth("70%");
flexTable.setWidget(row, 6, lastUse);
- containerDimension1.put(value+"agelstuse", lastUse);
+ containerDimension1FormFields.put(value+"agelstuse", lastUse);

final CustomRadioButtonGroup routesOfAdmission = new CustomRadioButtonGroup(value+"routesOfAdmission");
routesOfAdmission.addItem("inject","inject");
@@ -1024,7 +1029,7 @@
routesOfAdmission.addItem("oral","oral");
routesOfAdmission.addItem("inhalation","inhalation");
flexTable.setWidget(row, 7, routesOfAdmission);
- containerDimension1.put(value+"admitrout", routesOfAdmission);
+ containerDimension1FormFields.put(value+"admitrout", routesOfAdmission);

row++;
}
@@ -1037,7 +1042,7 @@
final TextArea commentSubAbuse = new TextArea();
commentSubAbuse.getElement().setPropertyString("cols", "50");
containerDimension1Form.add(commentSubAbuse);
- containerDimension1.put("subabusecomments", commentSubAbuse);
+ containerDimension1FormFields.put("subabusecomments", commentSubAbuse);

final Label drugFreePeriodsLabel = new Label("List any drug free periods since beginning of substance abuse:");
drugFreePeriodsLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
@@ -1046,7 +1051,7 @@
final TextArea drugFreePeriods = new TextArea();
drugFreePeriods.getElement().setPropertyString("cols", "50");
containerDimension1Form.add(drugFreePeriods);
- containerDimension1.put("subabusedrugpriod", drugFreePeriods);
+ containerDimension1FormFields.put("subabusedrugpriod", drugFreePeriods);

final Label meansOfSupportingLabel = new Label("Means of supporting present substance abuse:");
meansOfSupportingLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
@@ -1055,7 +1060,7 @@
final TextArea meansOfSupporting = new TextArea();
meansOfSupporting.getElement().setPropertyString("cols", "50");
containerDimension1Form.add(meansOfSupporting);
- containerDimension1.put("subabusesupprtmean", meansOfSupporting);
+ containerDimension1FormFields.put("subabusesupprtmean", meansOfSupporting);

{
final HorizontalPanel priorDrugHPanel = new HorizontalPanel();
@@ -1068,7 +1073,6 @@
containerDimension1Form.add(priorDrugVPanel);
priorDrugVPanel.setWidth("100%");
priorDrugVPanel.setVisible(false);
- priorDrugVPanel.add(flexTable);

final CustomRadioButtonGroup priorDrugTreatment = new CustomRadioButtonGroup("ispriordrugtrmnt");
priorDrugTreatment.addItem("Yes", "y", new Command() {
@@ -1088,7 +1092,7 @@

});
priorDrugHPanel.add(priorDrugTreatment);
- containerDimension1.put("ispriordrugtrmnt", priorDrugTreatment);
+ containerDimension1FormFields.put("ispriordrugtrmnt", priorDrugTreatment);

flexTable = new FlexTable();
priorDrugVPanel.add(flexTable);
@@ -1115,19 +1119,19 @@
flexTable.setWidget(row, 0, providerLabel);
final TextBox provider = new TextBox();
flexTable.setWidget(row, 1, provider);
- containerDimension1.put(value+"provider", provider);
+ containerDimension1FormFields.put(value+"provider", provider);

final Label locatonLabel = new Label("Location:");
flexTable.setWidget(row, 2, locatonLabel);
final TextBox location = new TextBox();
flexTable.setWidget(row, 3, location);
- containerDimension1.put(value+"location", location);
+ containerDimension1FormFields.put(value+"location", location);

final Label addmissionLabel = new Label("Date of Admission:");
flexTable.setWidget(row, 4, addmissionLabel);
final CustomDatePicker addmission = new CustomDatePicker();
flexTable.setWidget(row, 5, addmission);
- containerDimension1.put(value+"admtdat", addmission);
+ containerDimension1FormFields.put(value+"admtdat", addmission);

row++;

@@ -1138,19 +1142,19 @@
modality.addItem("Detox","Detox");
modality.addItem("Residential","Residential");
flexTable.setWidget(row, 1, modality);
- containerDimension1.put(value+"modality", modality);
+ containerDimension1FormFields.put(value+"modality", modality);

final Label reasonAdmitLabel = new Label("Reason for adm(Substances treated):");
flexTable.setWidget(row, 2, reasonAdmitLabel);
final TextBox reasonAdmit = new TextBox();
flexTable.setWidget(row, 3, reasonAdmit);
- containerDimension1.put(value+"admtreasn", reasonAdmit);
+ containerDimension1FormFields.put(value+"admtreasn", reasonAdmit);

final Label therapistLabel = new Label("Therapist:");
flexTable.setWidget(row, 4, therapistLabel);
final ProviderWidget therapist = new ProviderWidget();
flexTable.setWidget(row, 5, therapist);
- containerDimension1.put(value+"thrapist", therapist);
+ containerDimension1FormFields.put(value+"thrapist", therapist);

row++;

@@ -1158,13 +1162,13 @@
flexTable.setWidget(row, 0, stayLenLabel);
final TextBox stayLen = new TextBox();
flexTable.setWidget(row, 1, stayLen);
- containerDimension1.put(value+"staylen", stayLen);
+ containerDimension1FormFields.put(value+"staylen", stayLen);

final Label dischargeReasonLabel = new Label("Reason for Discharge:");
flexTable.setWidget(row, 2, dischargeReasonLabel);
final TextBox dischargeReason = new TextBox();
flexTable.setWidget(row, 3, dischargeReason);
- containerDimension1.put(value+"dischrgrsn", dischargeReason);
+ containerDimension1FormFields.put(value+"dischrgrsn", dischargeReason);

final Label contactProvLabel = new Label("Contact Provider:");
flexTable.setWidget(row, 4, contactProvLabel);
@@ -1172,7 +1176,7 @@
contactProv.addItem("Yes","y");
contactProv.addItem("No","n");
flexTable.setWidget(row, 5, contactProv);
- containerDimension1.put(value+"cntctprvidr", contactProv);
+ containerDimension1FormFields.put(value+"cntctprvidr", contactProv);
row++;
}
}
@@ -1184,7 +1188,7 @@
final TextArea other = new TextArea();
other.getElement().setPropertyString("cols", "50");
containerDimension1Form.add(other);
- containerDimension1.put("drugtrtother", other);
+ containerDimension1FormFields.put("drugtrtother", other);

final Label tobaccoLabel = new Label("TOBACCO");
tobaccoLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
@@ -1214,12 +1218,12 @@
}
});
flexTable.setWidget(row,1,tobbacoQ1s);
- containerDimension1.put("dosmoke", tobbacoQ1s);
+ containerDimension1FormFields.put("dosmoke", tobbacoQ1s);
final Label tobbacoQ1CurUseLabel = new Label("current use:");
flexTable.setWidget(row,2,tobbacoQ1CurUseLabel);

flexTable.setWidget(row,3,tobbacoQ1CurUse);
- containerDimension1.put("smokecuruse", tobbacoQ1CurUse);
+ containerDimension1FormFields.put("smokecuruse", tobbacoQ1CurUse);

row++;

@@ -1227,7 +1231,7 @@
flexTable.setWidget(row,0,tobbacoQ2AgeLabel);
final TextBox tobbacoQ2Age = new TextBox();
flexTable.setWidget(row,1,tobbacoQ2Age);
- containerDimension1.put("agefrstsmoke", tobbacoQ2Age);
+ containerDimension1FormFields.put("agefrstsmoke", tobbacoQ2Age);

row++;

@@ -1250,12 +1254,12 @@
}
});
flexTable.setWidget(row,1,quitTry);
- containerDimension1.put("trytoquitsmoke", quitTry);
+ containerDimension1FormFields.put("trytoquitsmoke", quitTry);
final Label quitTryDateLabel = new Label("when:");
flexTable.setWidget(row,2,quitTryDateLabel);

flexTable.setWidget(row,3,quitTryDate);
- containerDimension1.put("trytoquitsmokewhn", quitTryDate);
+ containerDimension1FormFields.put("trytoquitsmokewhn", quitTryDate);

flexTable = new FlexTable();
containerDimension1Form.add(flexTable);
@@ -1268,7 +1272,7 @@
tobbacoQ4Addictive.addItem("Yes","y");
tobbacoQ4Addictive.addItem("No","n");
flexTable.setWidget(row,1,tobbacoQ4Addictive);
- containerDimension1.put("undrstndnicotinenatur", tobbacoQ4Addictive);
+ containerDimension1FormFields.put("undrstndnicotinenatur", tobbacoQ4Addictive);

flexTable = new FlexTable();
containerDimension1Form.add(flexTable);
@@ -1294,12 +1298,12 @@
}
});
flexTable.setWidget(row,1,healthProb);
- containerDimension1.put("anyprbwithsmoke", healthProb);
+ containerDimension1FormFields.put("anyprbwithsmoke", healthProb);
final Label healthProbDescLabel = new Label("describe:");
flexTable.setWidget(row,2,healthProbDescLabel);

flexTable.setWidget(row,3,healthProbDesc);
- containerDimension1.put("anyprbwithsmokedesc", healthProbDesc);
+ containerDimension1FormFields.put("anyprbwithsmokedesc", healthProbDesc);

row++;

@@ -1309,7 +1313,7 @@
tobbacoQ6Reff.addItem("Yes","y");
tobbacoQ6Reff.addItem("No","n");
flexTable.setWidget(row,1,tobbacoQ6Reff);
- containerDimension1.put("intrstdinprobref", tobbacoQ6Reff);
+ containerDimension1FormFields.put("intrstdinprobref", tobbacoQ6Reff);

final Label gamblingLabel = new Label("GAMBLING");
gamblingLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
@@ -1341,7 +1345,7 @@
}
});
flexTable.setWidget(row,1,gamblingQ1);
- containerDimension1.put("dogamble", gamblingQ1);
+ containerDimension1FormFields.put("dogamble", gamblingQ1);

flexTable = new FlexTable();
gamblingRemainingQsifYes.add(flexTable);
@@ -1355,7 +1359,7 @@
gamblingQ2.addItem("Yes","y");
gamblingQ2.addItem("No","n");
flexTable.setWidget(row,1,gamblingQ2);
- containerDimension1.put("gamblingcrtedprob", gamblingQ2);
+ containerDimension1FormFields.put("gamblingcrtedprob", gamblingQ2);

row++;

@@ -1366,7 +1370,7 @@
gamblingQ3.addItem("Yes","y");
gamblingQ3.addItem("No","n");
flexTable.setWidget(row,1,gamblingQ3);
- containerDimension1.put("complaintofgambling", gamblingQ3);
+ containerDimension1FormFields.put("complaintofgambling", gamblingQ3);

row++;

@@ -1378,7 +1382,7 @@
gamblingQ4.addItem("Yes","y");
gamblingQ4.addItem("No","n");
flexTable.setWidget(row,1,gamblingQ4);
- containerDimension1.put("gamblingsupprtbyfamily", gamblingQ4);
+ containerDimension1FormFields.put("gamblingsupprtbyfamily", gamblingQ4);


}
@@ -3803,84 +3807,35 @@
"members to patient; severity of problem; need for treatment; number of family members; impact in "+
"family (i.e. abuse); and death(s) resulting).");
containerDimension6Form.add(familyHistoryDescLabel);
-
- flexTable = new FlexTable();
- flexTable.setSize("100%", "100%");
- containerDimension6Form.add(flexTable);
-
- row=0;
-
- final TextArea catastrophic = new TextArea();
- flexTable.setWidget(row, 0, catastrophic);
- containerDimension6FormFields.put("famcatastrophicdesc", catastrophic);
-
- final Label catastrophicLabel = new Label("a) CATASTROPHIC.");
- catastrophicLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 1, catastrophicLabel);
-
- final Label catastrophicExpLabel = new Label("Example: Both parents with significant dependence; death "+
- "and/or complete abandonment of the family by one or both parents; physical abuse and neglect; possibly some sexual abuse; one or more siblings with dependence problems, death resulting.");
- flexTable.setWidget(row, 2, catastrophicExpLabel);

- row++;
+ final TextArea familyHistoryExp = new TextArea();
+ familyHistoryExp.setEnabled(false);

- final TextArea sever = new TextArea();
- flexTable.setWidget(row, 0, sever);
- containerDimension6FormFields.put("famseverdesc", sever);
+ final CustomRadioButtonGroup familyHistory = new CustomRadioButtonGroup("familyhistory",true);
+ familyHistory.setLabelsAsHTML(true);
+ familyHistory.addItem("<strong>a) CATASTROPHIC.</strong> Example: Both parents with significant dependence; death "+
+ "and/or complete abandonment of the family by one or both parents; physical abuse and neglect; possibly some sexual abuse; one or more siblings with dependence problems, death resulting.", "CATASTROPHIC");
+ familyHistory.addItem("<strong>b) SEVERE.</strong> Example: One or both parents with a dependence problem; treatment needed; severe employment and financial disruption; significant parent absenteeism; some physical or sexual abuse.", "SEVERE");
+ familyHistory.addItem("<strong>c) MODERATE.</strong> Example: At least one parent with a history of dependence; no treatment history; some financial disruption; some parent absenteeism; some abuse of dependence with sibling(s).", "MODERATE");
+ familyHistory.addItem("<strong>d) MILD.</strong> Example: Some dependence in extended family (i.e. grandparents); some generational impact; some substance abuse by immediate family members.", "MILD");
+ familyHistory.addItem("<strong>e) NONE.</strong>", "NONE");
+ familyHistory.addValueChangeHandler(new ValueChangeHandler<String>() {
+ @Override
+ public void onValueChange(ValueChangeEvent<String> event) {
+ familyHistoryExp.setEnabled(true);
+ }

- final Label severLabel = new Label("b) SEVERE.");
- severLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 1, severLabel);
+ });
+ containerDimension6FormFields.put("familyhistory", familyHistory);
+ containerDimension6Form.add(familyHistory);

- final Label severExpLabel = new Label("Example: One or both parents with a dependence problem; treatment needed; severe employment and financial disruption; significant parent absenteeism; some physical or sexual abuse.");
- flexTable.setWidget(row, 2, severExpLabel);
-
- row++;

- final TextArea moderate = new TextArea();
- flexTable.setWidget(row, 0, moderate);
- containerDimension6FormFields.put("fammoderatedesc", moderate);
-
- final Label moderateLabel = new Label("c) MODERATE.");
- moderateLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 1, moderateLabel);
-
- final Label moderateExpLabel = new Label("Example: At least one parent with a history of dependence; no treatment history; some financial disruption; some parent absenteeism; some abuse of dependence with sibling(s).");
- flexTable.setWidget(row, 2, moderateExpLabel);
-
- row++;
-
- final TextArea mild = new TextArea();
- flexTable.setWidget(row, 0, mild);
- containerDimension6FormFields.put("fammilddesc", mild);
-
- final Label mildLabel = new Label("d) MILD.");
- mildLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 1, mildLabel);
-
- final Label mildExpLabel = new Label("Example: Some dependence in extended family (i.e. grandparents); some generational impact; some substance abuse by immediate family members.");
- flexTable.setWidget(row, 2, mildExpLabel);
-
- row++;
-
- final TextArea none = new TextArea();
- flexTable.setWidget(row, 0, none);
- containerDimension6FormFields.put("famnonedesc", none);
-
- final Label noneLabel = new Label("e) NONE.");
- noneLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 1, noneLabel);
-
- final Label noneExpLabel = new Label("Example: Some dependence in extended family (i.e. grandparents); some generational impact; some substance abuse by immediate family members.");
- flexTable.setWidget(row, 2, noneExpLabel);
-
flexTable = new FlexTable();
containerDimension6Form.add(flexTable);

final Label familyHistoryExpLabel = new Label("Explain:");
flexTable.setWidget(row, 0, familyHistoryExpLabel);

- final TextArea familyHistoryExp = new TextArea();
familyHistoryExp.getElement().setPropertyString("cols", "80");
flexTable.setWidget(row, 1, familyHistoryExp);
containerDimension6FormFields.put("familyhistorydesc", familyHistoryExp);
@@ -4114,6 +4069,14 @@
flexTable.setWidget(2, 1, threeWishes3rd);
containerDimension6FormFields.put("thirdofthreewishesdesc", threeWishes3rd);

+ adolAdultLesuireVPanel = new VerticalPanel();
+ adolAdultLesuireVPanel.setWidth("100%");
+ containerDimension6Form.add(adolAdultLesuireVPanel);
+
+ adolAdultVPanel = new VerticalPanel();
+ adolAdultVPanel.setWidth("100%");
+ containerDimension6Form.add(adolAdultVPanel);
+
final Label emotionalBehavLabel = new Label("EMOTIONAL/BEHAVIORAL ASSESSMENT -(Current Observation)");
emotionalBehavLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
containerDimension6Form.add(emotionalBehavLabel);
@@ -4556,7 +4519,7 @@

HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label adultInvolveInTreatLabel = new Label("Would you like your parent/adult support to be involved in treatment?");
horizontalPanel.add(adultInvolveInTreatLabel);
@@ -4564,7 +4527,7 @@
final HorizontalPanel adultInvolveInTreatHPanel = new HorizontalPanel();
adultInvolveInTreatHPanel.setSpacing(5);
adultInvolveInTreatHPanel.setVisible(false);
- containerDimension6Form.add(adultInvolveInTreatHPanel);
+ adolAdultVPanel.add(adultInvolveInTreatHPanel);

final CustomRadioButtonGroup adultInvolveInTreat = new CustomRadioButtonGroup("adultinvolveintreat");
adultInvolveInTreat.addItem("Yes","y",new Command() {
@@ -4592,7 +4555,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label define3ThingOfFamilyLabel = new Label("If you could change three things about your family, what would they be?");
horizontalPanel.add(define3ThingOfFamilyLabel);
@@ -4604,7 +4567,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label livingArrangechangedLabel = new Label("Has your living arrangement changed in the past year?");
horizontalPanel.add(livingArrangechangedLabel);
@@ -4617,7 +4580,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label unhappyInHomeLabel = new Label("Are you unhappy or dissatisfied with the current situation at home?");
horizontalPanel.add(unhappyInHomeLabel);
@@ -4630,7 +4593,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label everBeenAwayFromHomeLabel = new Label("Have you ever been away from home (e.g. foster home, run away)?");
horizontalPanel.add(everBeenAwayFromHomeLabel);
@@ -4643,7 +4606,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label argAndFightInHomeLabel = new Label("Is there a lot of arguing and fighting in your home?");
horizontalPanel.add(argAndFightInHomeLabel);
@@ -4656,11 +4619,11 @@

final Label soberSupport = new Label("SOBER SUPPORT");
soberSupport.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(soberSupport);
+ adolAdultVPanel.add(soberSupport);

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label helpStayDrugFreeLabel = new Label("Do you feel that there is no one who will help you stay drug free?");
horizontalPanel.add(helpStayDrugFreeLabel);
@@ -4673,7 +4636,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label frndsHelpsToStayDrugFreeLabel = new Label("Do you have several friends/family members who will help you stay drug free?");
horizontalPanel.add(frndsHelpsToStayDrugFreeLabel);
@@ -4686,7 +4649,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label atleastOneFrndHelpsToStayDrugFreeLabel = new Label("Do you have at least one friend/family member who will help you stay drug free?");
horizontalPanel.add(atleastOneFrndHelpsToStayDrugFreeLabel);
@@ -4699,7 +4662,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label anyoneWhoHelpDrugFreeLabel = new Label("Do you have anyone who will help you stay drug free?");
horizontalPanel.add(anyoneWhoHelpDrugFreeLabel);
@@ -4712,7 +4675,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label whoIsClosestLabel = new Label("Who are you closest to?");
horizontalPanel.add(whoIsClosestLabel);
@@ -4742,7 +4705,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label abstainLabel = new Label("If you were to abstain from all substances today, would your friends find it easy or difficult?");
horizontalPanel.add(abstainLabel);
@@ -4754,7 +4717,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label makeNewFrndsLabel = new Label("Would you have to make new friends?");
horizontalPanel.add(makeNewFrndsLabel);
@@ -4775,7 +4738,7 @@

horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(5);
- containerDimension6Form.add(horizontalPanel);
+ adolAdultVPanel.add(horizontalPanel);

final Label familyMakeItDiffLabel = new Label("Would your family make it difficult?");
horizontalPanel.add(familyMakeItDiffLabel);
@@ -4796,10 +4759,10 @@

final Label educationLabel = new Label("EDUCATION");
educationLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(educationLabel);
+ adolAdultVPanel.add(educationLabel);

FlexTable flexTable = new FlexTable();
- containerDimension6Form.add(flexTable);
+ adolAdultVPanel.add(flexTable);
int row=0;

final Label presentSchoolLabel = new Label("Present school:");
@@ -4842,112 +4805,112 @@
containerDimension6FormFields.put("scholasticmarks", scholasticMarks);


- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "School adjustment (disciple, attendance, detention, relationship w/ faculty & peers):", "schooladjustmnt");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "School adjustment (disciple, attendance, detention, relationship w/ faculty & peers):", "schooladjustmnt");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you had after school or in house detention?", "hdetention", "how often?", "hdetentionexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you had after school or in house detention?", "hdetention", "how often?", "hdetentionexp",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you failed a class?", "failedinclass", "why do you think this happened?", "failedinclassexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you failed a class?", "failedinclass", "why do you think this happened?", "failedinclassexp",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you ever been suspended from school?", "suspendedinclass", "why?", "suspendedInClassExp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you ever been suspended from school?", "suspendedinclass", "why?", "suspendedInClassExp",true);

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields,"Has your drug or alcohol use interfered with your education?", "druginterfereeduc");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields,"Has your drug or alcohol use interfered with your education?", "druginterfereeduc");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you repeated grades, or failed to graduate due to drug/alcohol use?", "failduetodrug", "explain:", "failduetodrugexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you repeated grades, or failed to graduate due to drug/alcohol use?", "failduetodrug", "explain:", "failduetodrugexp",true);

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields,"Have you had problems in school because of drug/alcohol use?", "prbinschoolduetodrug");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields,"Have you had problems in school because of drug/alcohol use?", "prbinschoolduetodrug");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"If you are no longer attending school, do you plan to return or get a GED?", "getged", "explain:", "getgedexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"If you are no longer attending school, do you plan to return or get a GED?", "getged", "explain:", "getgedexp",true);

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Future plans for education and/or training:", "adolfutureeduplan");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Future plans for education and/or training:", "adolfutureeduplan");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Do you have an Individual Education Plan (IEP)?", "indvleduplan");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Do you have an Individual Education Plan (IEP)?", "indvleduplan");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Do you have one teacher that you can talk to?", "oneteachertotalk");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Do you have one teacher that you can talk to?", "oneteachertotalk");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Comments:", "educomments");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Comments:", "educomments");

final Label empLabel = new Label("EMPLOYMENT");
empLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(empLabel);
+ adolAdultVPanel.add(empLabel);

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Current or last job?", "curorlstjob");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Current or last job?", "curorlstjob");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "How long have you had this job?", "jobperiod","Length of the longest job held","lenoflongstjob");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "How long have you had this job?", "jobperiod","Length of the longest job held","lenoflongstjob");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "What job have you enjoyed the most?", "mostenjjob");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "What job have you enjoyed the most?", "mostenjjob");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Does your family have financial difficulties?", "familyfindiff", "briefly describe:", "familyfindiffexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Does your family have financial difficulties?", "familyfindiff", "briefly describe:", "familyfindiffexp",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you ever lost a job?", "everlstjob", "Why?", "everlstjobexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you ever lost a job?", "everlstjob", "Why?", "everlstjobexp",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields,"Have you ever quit a job?", "everquitjob", "Why?", "everquitjobexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields,"Have you ever quit a job?", "everquitjob", "Why?", "everquitjobexp",true);

- final Label leisureLabel = new Label("LEISURE");
+ /*final Label leisureLabel = new Label("LEISURE");
leisureLabel.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(leisureLabel);
+ adolAdultVPanel.add(leisureLabel);*/

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "How do you have fun?", "howdofun");
+ createQuestionSimple(adolAdultLesuireVPanel, containerDimension6FormFields, "How do you have fun?", "howdofun");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "what do you do in your spare tlme?", "whatdoinspartim");
+ createQuestionSimple(adolAdultLesuireVPanel, containerDimension6FormFields, "what do you do in your spare tlme?", "whatdoinspartim");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Do play sports?", "doplaysport","Are you part of a team?","partofteam");
+ createQuestionYesNO(adolAdultLesuireVPanel, containerDimension6FormFields, "Do play sports?", "doplaysport","Are you part of a team?","partofteam");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Do you take extra lessons?", "dotkextralessn");
+ createQuestionYesNO(adolAdultLesuireVPanel, containerDimension6FormFields, "Do you take extra lessons?", "dotkextralessn");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Do you participate in any organized activities?", "prtanyorgact","(Answer all that apply with examples):","prtanyrgactexp",true);
+ createQuestionYesNOExplain(adolAdultLesuireVPanel, containerDimension6FormFields, "Do you participate in any organized activities?", "prtanyorgact","(Answer all that apply with examples):","prtanyrgactexp",true);
}

protected void initDimension6AdultForm(){

final Label soberSupport = new Label("SOBER SUPPORT");
soberSupport.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(soberSupport);
+ adolAdultVPanel.add(soberSupport);

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Do you feel that there is no one to help you with sobriety?", "noonetohlpsob");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Do you feel that there is no one to help you with sobriety?", "noonetohlpsob");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Do you have at least one friend/family member who will help you with sobriety?", "atleast1frindhlpsob");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Do you have at least one friend/family member who will help you with sobriety?", "atleast1frindhlpsob");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Do you have several friends/family members who will help you with sobriety?", "svralfrindhlpsob");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Do you have several friends/family members who will help you with sobriety?", "svralfrindhlpsob");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Who are you closest to?", "whoisclosest");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Who are you closest to?", "whoisclosest");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Name people in your life who will support you in this program:", "namepeoplewhosupprtu");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Name people in your life who will support you in this program:", "namepeoplewhosupprtu");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Name people in your life who will make this difficult for you:", "namepeoplewhoprbu");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Name people in your life who will make this difficult for you:", "namepeoplewhoprbu");

final Label eduction = new Label("EDUCATION");
eduction.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(eduction);
+ adolAdultVPanel.add(eduction);

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "What is the highest grade you have completed?", "highgradcomplt");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "What is the highest grade you have completed?", "highgradcomplt");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Did you graduate?", "graduate","did you complete a GED program?","cmpltged",false);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Did you graduate?", "graduate","did you complete a GED program?","cmpltged",false);

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Have you had problems in school because of drug/alcohol use?", "prbinschoolduetodrug");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Have you had problems in school because of drug/alcohol use?", "prbinschoolduetodrug");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Have you had to repeat grades, or fail to graduate due to drug/alcohol use?", "failduetodrug","Explain:","failduetodrugexp");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Have you had to repeat grades, or fail to graduate due to drug/alcohol use?", "failduetodrug","Explain:","failduetodrugexp");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Did you have any 'special help' in school (i.e. an IEP or reading problems?)", "sphelpinschol");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Did you have any 'special help' in school (i.e. an IEP or reading problems?)", "sphelpinschol");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Future plans for education and/or training?", "adultmhfutureeduplan","Explain:","adultmhfutureeduplanexp");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Future plans for education and/or training?", "adultmhfutureeduplan","Explain:","adultmhfutureeduplanexp");

final Label miltaryHistory = new Label("MILITARY HISTORY");
miltaryHistory.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(miltaryHistory);
+ adolAdultVPanel.add(miltaryHistory);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Have you ever served in the military?", "servedmilt","what branch?","servedmiltbranch","Length of service","servedmiltperiod","Job description during service:","servicedesc","Type of Discharge:","dischargetype",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Have you ever served in the military?", "servedmilt","what branch?","servedmiltbranch","Length of service","servedmiltperiod","Job description during service:","servicedesc","Type of Discharge:","dischargetype",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Have you ever served in combat duty?", "servedcombtdty","where?","combatdutyloc","How Long?","combatdutyperiod",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Have you ever served in combat duty?", "servedcombtdty","where?","combatdutyloc","How Long?","combatdutyperiod",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Are you currently in the reserves/national guard?", "nationguard","status:","nationguardstatus","remaining obligation:","nationguardremoblig",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Are you currently in the reserves/national guard?", "nationguard","status:","nationguardstatus","remaining obligation:","nationguardremoblig",true);

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Did alcohol or drug use create problems during your military service?", "druginmiltservs","explain:","druginmiltservsexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Did alcohol or drug use create problems during your military service?", "druginmiltservs","explain:","druginmiltservsexp",true);

- Panel panel = createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "What is your current income?", "cursalary");
+ Panel panel = createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "What is your current income?", "cursalary");

final Label employmentHistory = new Label("EMPLOYMENT HISTORY");
employmentHistory.setStyleName(AppConstants.STYLE_LABEL_LARGE_BOLD);
- containerDimension6Form.add(employmentHistory);
+ adolAdultVPanel.add(employmentHistory);

final CustomRadioButtonGroup salaryPeriod = new CustomRadioButtonGroup("salaryperiod");
salaryPeriod.addItem("weekly","weekly");
@@ -4956,23 +4919,23 @@
salaryPeriod.addItem("yearly","yearly");
panel.add(salaryPeriod);

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "How many dependents do you support?", "dependents");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "How many dependents do you support?", "dependents");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Are you currently under any court order to make child support or alimony payments?", "undrcourttosupport");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Are you currently under any court order to make child support or alimony payments?", "undrcourttosupport");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Are you currently employed?", "curemployed","Describe:","curemployedexp");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Are you currently employed?", "curemployed","Describe:","curemployedexp");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "What was your last job?", "lstjob","Describe:","lstjobexp");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "What was your last job?", "lstjob","Describe:","lstjobexp");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "How long have you had your most recent job?", "recentjobdur","Length of longest job held","longestjobdur");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "How long have you had your most recent job?", "recentjobdur","Length of longest job held","longestjobdur");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "What job have you enjoyed the most?", "mostenjjob");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "What job have you enjoyed the most?", "mostenjjob");

- createQuestionYesNO(containerDimension6Form, containerDimension6FormFields, "Has drug/alcohol use resulted in job loss, demotion?", "drugresultjobloss","Explain:","drugresultjoblossexp");
+ createQuestionYesNO(adolAdultVPanel, containerDimension6FormFields, "Has drug/alcohol use resulted in job loss, demotion?", "drugresultjobloss","Explain:","drugresultjoblossexp");

- createQuestionSimple(containerDimension6Form, containerDimension6FormFields, "Do you have any special skills, licenses or other employment credentials? Explain:", "specialskill");
+ createQuestionSimple(adolAdultVPanel, containerDimension6FormFields, "Do you have any special skills, licenses or other employment credentials? Explain:", "specialskill");

- createQuestionYesNOExplain(containerDimension6Form, containerDimension6FormFields, "Did your family have financial difficulties as you were growing up?", "familyfindiff","Explain:","familyfindiffexp",true);
+ createQuestionYesNOExplain(adolAdultVPanel, containerDimension6FormFields, "Did your family have financial difficulties as you were growing up?", "familyfindiff","Explain:","familyfindiffexp",true);

}

@@ -5302,7 +5265,7 @@

JsonUtil.debug("---------------ResetForm Called:-----------");

- Util.resetWidgetMap(containerDimension1);
+ Util.resetWidgetMap(containerDimension1FormFields);
Util.resetWidgetMap(containerDimension2FormFields);
Util.resetWidgetMap(containerDimension3FormFields);
Util.resetWidgetMap(containerDimension4FormFields);
@@ -5324,7 +5287,7 @@
}

public void populateAvailableData(){
- retrieveAndFillDataForForm1(TREATMENT_COUNSELOR_INTAKE_D1,"org.freemedsoftware.module."+TREATMENT_COUNSELOR_INTAKE_D1+".GetRecord", containerDimension1);
+ retrieveAndFillDataForForm1(TREATMENT_COUNSELOR_INTAKE_D1,"org.freemedsoftware.module."+TREATMENT_COUNSELOR_INTAKE_D1+".GetRecord", containerDimension1FormFields);
retrieveAndFillData(TREATMENT_COUNSELOR_INTAKE_D2,"org.freemedsoftware.module."+TREATMENT_COUNSELOR_INTAKE_D2+".GetRecord",dimension2Id, containerDimension2FormFields);
retrieveAndFillDataForForm3(TREATMENT_COUNSELOR_INTAKE_D3,"org.freemedsoftware.module."+TREATMENT_COUNSELOR_INTAKE_D3+".GetRecord", containerDimension3FormFields);
retrieveAndFillData(TREATMENT_COUNSELOR_INTAKE_D4,"org.freemedsoftware.module."+TREATMENT_COUNSELOR_INTAKE_D4+".GetRecord",dimension4Id, containerDimension4FormFields);
@@ -5440,7 +5403,7 @@
.parse(response.getText()),
"HashMap<String,String>");
if (result != null) {
- populateForm(containerDimension1, result);
+ populateForm(containerDimension1FormFields, result);

}
} else {

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/TreatmentClinicalNotes.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/TreatmentClinicalNotes.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/screen/patient/TreatmentClinicalNotes.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -39,6 +39,7 @@
import org.freemedsoftware.gwt.client.widget.CustomActionBar;
import org.freemedsoftware.gwt.client.widget.CustomButton;
import org.freemedsoftware.gwt.client.widget.CustomDatePicker;
+import org.freemedsoftware.gwt.client.widget.CustomLink;
import org.freemedsoftware.gwt.client.widget.CustomRadioButtonGroup;
import org.freemedsoftware.gwt.client.widget.CustomTable;
import org.freemedsoftware.gwt.client.widget.SupportModuleWidget;
@@ -472,17 +473,25 @@
flexTable = new FlexTable();
containerTreatmentClinicalNotesForm.add(flexTable);

+ HorizontalPanel horizontalPanel = new HorizontalPanel();
final Label clinicalSupLabel = new Label("Clinical Supervisor");
clinicalSupLabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 0, clinicalSupLabel);
+ horizontalPanel.add(clinicalSupLabel);
+ final CustomLink signSupervisor = new CustomLink("(sign)");
+ horizontalPanel.add(signSupervisor);
+ flexTable.setWidget(row, 0, horizontalPanel);

final UserWidget clinicalSup = new UserWidget();
flexTable.setWidget(row, 1, clinicalSup);
containerTreatmentClinicalNotesFormFields.put("tcnclinicalsup", clinicalSup);

+ horizontalPanel = new HorizontalPanel();
final Label medPhyabel = new Label("Med. Dir./Phys.");
medPhyabel.setStyleName(AppConstants.STYLE_LABEL_NORMAL_BOLD);
- flexTable.setWidget(row, 2, medPhyabel);
+ horizontalPanel.add(medPhyabel);
+ final CustomLink signPhys = new CustomLink("(sign)");
+ horizontalPanel.add(signPhys);
+ flexTable.setWidget(row, 2, horizontalPanel);

final UserWidget medPhy = new UserWidget();
medPhy.setUserType("phy");

Added: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomLink.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomLink.java (rev 0)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomLink.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * Authors:
+ * Jeff Buchbinder <je...@freemedsoftware.org>
+ *
+ * FreeMED Electronic Medical Record and Practice Management System
+ * Copyright (C) 1999-2010 FreeMED Software Foundation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.freemedsoftware.gwt.client.widget;
+
+import com.google.gwt.user.client.ui.Hyperlink;
+
+public class CustomLink extends Hyperlink {
+ protected CustomLink() {
+ }
+
+ public CustomLink(String title) {
+ super(title,"");
+ }
+
+ public CustomLink(String title,String historyToken) {
+ super(title,historyToken);
+ }
+
+}


Property changes on: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomLink.java
___________________________________________________________________
Added: svn:keywords
+ Id Author Revision Date
Added: svn:eol-style
+ native

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomRadioButtonGroup.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomRadioButtonGroup.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/CustomRadioButtonGroup.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -53,6 +53,8 @@
protected String groupName;

protected java.util.List<CustomRadioButton> customRadioButtonGroup;
+
+ protected boolean labelsAsHTML = false;

public CustomRadioButtonGroup(String groupName) {
this(groupName, false);
@@ -137,6 +139,16 @@
if (fireEvent && customRadioButton.fireAction != null) {
customRadioButton.fireAction.execute();
}
+ if(fireEvent && valueChangeHandler!=null){
+ ValueChangeEvent<String> changeEvent = new ValueChangeEvent<String>(value) {
+ @Override
+ public String getValue() {
+ // TODO Auto-generated method stub
+ return super.getValue();
+ }
+ };
+ valueChangeHandler.onValueChange(changeEvent);
+ }
break;
}else customRadioButton.setValue(false);
}
@@ -187,23 +199,24 @@

protected Command fireAction = null;

- public CustomRadioButton(String group, String label) {
- super(group, label);
- }
-
- public CustomRadioButton(String group, String label, String widgetValue) {
- super(group, label);
- this.widgetValue = widgetValue;
- }
-
+ protected ValueChangeEvent<String> changeEvent = null;
+
public CustomRadioButton(String group, String label,
- String widgetValue, Command fireAction) {
+ String widgetValue1, Command fireAction) {
super(group, label);
- this.widgetValue = widgetValue;
+ if(labelsAsHTML)
+ setHTML(label);
+ this.widgetValue = widgetValue1;
this.fireAction = fireAction;
this.addClickHandler(this);
+ changeEvent = new ValueChangeEvent<String>(widgetValue1) {
+ @Override
+ public String getValue() {
+ // TODO Auto-generated method stub
+ return widgetValue;
+ }
+ };
}
-
public void setHashMapping(String hm) {
hashMapping = hm;
}
@@ -225,6 +238,9 @@
JsonUtil.debug("CustomRadioButton:onClick Called");
if (fireAction != null)
fireAction.execute();
+ if(valueChangeHandler!=null){
+ valueChangeHandler.onValueChange(changeEvent);
+ }
}
}

@@ -239,4 +255,12 @@
customRadioButtonGroup.get(0).setFocus(focus);
}

+ public boolean isLabelsAsHTML() {
+ return labelsAsHTML;
+ }
+
+ public void setLabelsAsHTML(boolean labelsAsHTML) {
+ this.labelsAsHTML = labelsAsHTML;
+ }
+
}

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/PatientWidget.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/PatientWidget.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/PatientWidget.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.Set;

+import org.freemedsoftware.gwt.client.CurrentState;
import org.freemedsoftware.gwt.client.CustomRequestCallback;
import org.freemedsoftware.gwt.client.HashSetter;
import org.freemedsoftware.gwt.client.JsonUtil;
@@ -57,6 +58,8 @@

protected void loadSuggestions(String req, final Request r,
final Callback cb) {
+ if(req.length()<CurrentState.getMinCharCountForSmartSearch())
+ return;
if (Util.getProgramMode() == ProgramMode.STUBBED) {
// Handle in a stubbed sort of way
List<SuggestOracle.Suggestion> items = new ArrayList<SuggestOracle.Suggestion>();

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/ProviderWidget.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/ProviderWidget.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/ProviderWidget.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.Set;

+import org.freemedsoftware.gwt.client.CurrentState;
import org.freemedsoftware.gwt.client.HashSetter;
import org.freemedsoftware.gwt.client.JsonUtil;
import org.freemedsoftware.gwt.client.Util;
@@ -52,6 +53,8 @@

protected void loadSuggestions(String req, final Request r,
final Callback cb) {
+ if(req.length()<CurrentState.getMinCharCountForSmartSearch())
+ return;
if (Util.getProgramMode() == ProgramMode.STUBBED) {
// Handle in a stubbed sort of way
List<SuggestOracle.Suggestion> items = new ArrayList<SuggestOracle.Suggestion>();

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SupportModuleWidget.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SupportModuleWidget.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/SupportModuleWidget.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -30,6 +30,7 @@
import java.util.List;
import java.util.Set;

+import org.freemedsoftware.gwt.client.CurrentState;
import org.freemedsoftware.gwt.client.CustomRequestCallback;
import org.freemedsoftware.gwt.client.HashSetter;
import org.freemedsoftware.gwt.client.JsonUtil;
@@ -72,7 +73,7 @@
hasAdditionalParameters = false;
setModuleName(module);
}
-
+
/**
* Set value of current widget based on integer value, asynchronously.
*
@@ -168,6 +169,8 @@

protected void loadSuggestions(String req, final Request r,
final Callback cb) {
+ if(req.length()<CurrentState.getMinCharCountForSmartSearch())
+ return;
if (Util.getProgramMode() == ProgramMode.STUBBED) {
// Handle in a stubbed sort of way
List<SuggestOracle.Suggestion> items = new ArrayList<SuggestOracle.Suggestion>();

Modified: branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/UserWidget.java
===================================================================
--- branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/UserWidget.java 2010-07-28 10:18:00 UTC (rev 5754)
+++ branches/bmas-staging/ui/gwt/src/org/freemedsoftware/gwt/client/widget/UserWidget.java 2010-07-28 12:26:10 UTC (rev 5755)
@@ -28,6 +28,7 @@
import java.util.HashMap;
import java.util.List;

+import org.freemedsoftware.gwt.client.CurrentState;
import org.freemedsoftware.gwt.client.JsonUtil;
import org.freemedsoftware.gwt.client.Util;
import org.freemedsoftware.gwt.client.Api.UserInterfaceAsync;
@@ -137,6 +138,8 @@

protected void loadSuggestions(String req, final Request r,
final Callback cb) {
+ if(req.length()<CurrentState.getMinCharCountForSmartSearch())
+ return;
if (Util.getProgramMode() == ProgramMode.STUBBED) {
// Handle in a stubbed sort of way
List<SuggestOracle.Suggestion> items = new ArrayList<SuggestOracle.Suggestion>();

Reply all
Reply to author
Forward
0 new messages