Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #889: patch.patch

File patch.patch, 74.4 kB (added by nribeka, 1 year ago)

replace the path

  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/.classpath

    old new  
    3535        <classpathentry kind="lib" path="lib/tomcat/servlet-api.jar" sourcepath="/openmrs-source/apache-tomcat-5.5.20-src.zip"/> 
    3636        <classpathentry kind="lib" path="lib/tomcat/catalina.jar" sourcepath="/openmrs-source/apache-tomcat-5.5.20-src.zip"/> 
    3737        <classpathentry kind="lib" path="lib/tomcat/naming-resources.jar" sourcepath="/openmrs-source/apache-tomcat-5.5.20-src.zip"/> 
    38         <classpathentry kind="lib" path="lib/dwr/dwr-1.1.3mod.jar"/> 
    3938        <classpathentry kind="lib" path="lib/spring-framework/spring-2.5.1.jar" sourcepath="/openmrs-source/spring-2.5.1-src.zip"/> 
    4039        <classpathentry kind="lib" path="lib/spring-framework/spring-test.jar" sourcepath="/openmrs-source/spring-framework-2.5.1-with-dependencies.zip"/> 
    4140        <classpathentry kind="lib" path="lib/spring-framework/spring-webmvc.jar" sourcepath="/openmrs-source/spring-webmvc-sources.zip"/> 
     
    6564        <classpathentry kind="lib" path="lib/benerator/databene-commons-0.4.5.jar"/> 
    6665        <classpathentry kind="lib" path="lib/benerator/databene-webdecs-0.4.5.jar"/> 
    6766        <classpathentry kind="lib" path="lib/commons-io/commons-io-1.4.jar"/> 
     67        <classpathentry kind="lib" path="lib/dwr/dwr.jar"/> 
    6868        <classpathentry kind="output" path="build/"/> 
    6969</classpath> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/src/web/org/openmrs/notification/web/dwr/DWRMessageService.java

    old new  
    2323import org.openmrs.notification.MessageService; 
    2424import org.openmrs.notification.NotificationConstants; 
    2525 
    26 import uk.ltd.getahead.dwr.WebContextFactory
     26import org.directwebremoting.WebContextFactory;
    2727 
    2828public class DWRMessageService { 
    2929 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/src/web/org/openmrs/web/dwr/OpenmrsDWRServlet.java

    old new  
    1919import org.openmrs.module.web.WebModuleUtil; 
    2020import org.openmrs.util.OpenmrsClassLoader; 
    2121 
    22 import uk.ltd.getahead.dwr.DWRServlet; 
     22import org.directwebremoting.servlet.DwrServlet; 
    2323 
    2424/** 
    2525 * Simply used so that we have a way we can restart the DWR HttpServlet 
    2626 * @author bwolfe 
    2727 */ 
    28 public class OpenmrsDWRServlet extends DWRServlet { 
     28public class OpenmrsDWRServlet extends DwrServlet { 
    2929 
    3030        private static final long serialVersionUID = 121212111335789L; 
    3131 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/src/web/org/openmrs/web/dwr/RelationshipListItem.java

    old new  
    1515 
    1616import org.apache.commons.logging.Log; 
    1717import org.apache.commons.logging.LogFactory; 
    18 import org.openmrs.Patient; 
    1918import org.openmrs.Person; 
    2019import org.openmrs.Relationship; 
    21 import org.openmrs.api.context.Context; 
    2220 
    2321public class RelationshipListItem { 
    2422         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/src/web/org/openmrs/web/dwr/DWRObsService.java

    old new  
    3333import org.openmrs.api.context.Context; 
    3434import org.openmrs.util.OpenmrsUtil; 
    3535 
    36 import uk.ltd.getahead.dwr.WebContextFactory; 
     36import org.directwebremoting.WebContextFactory; 
    3737 
    3838/** 
    3939 * 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/dwr.xml

    old new  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" "http://www.getahead.ltd.uk/dwr/dwr10.dtd"> 
     2<!DOCTYPE dwr PUBLIC 
     3    "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" 
     4    "http://directwebremoting.org/schema/dwr20.dtd"> 
    35 
    46<dwr> 
    57 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/dwr-modules.xml

    old new  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" "http://resources.openmrs.org/doctype/dwr-1.0mod.dtd"> 
     2<!DOCTYPE dwr PUBLIC 
     3    "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" 
     4    "http://directwebremoting.org/schema/dwr20.dtd"> 
    35 
    46<dwr> 
    57   
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/analysis/cohortBuilder.jsp

    old new  
    151151                str += '</form>'; 
    152152                if (lookupAnswers) { 
    153153                        DWRConceptService.getAnswersForQuestion(concept.conceptId, function(list) { 
    154                                         DWRUtil.removeAllOptions('replace_with_answer_options'); 
    155                                         DWRUtil.addOptions('replace_with_answer_options', [" "]); 
    156                                         DWRUtil.addOptions('replace_with_answer_options', list, 'conceptId', 'name'); 
     154                                        dwr.util.removeAllOptions('replace_with_answer_options'); 
     155                                        dwr.util.addOptions('replace_with_answer_options', [" "]); 
     156                                        dwr.util.addOptions('replace_with_answer_options', list, 'conceptId', 'name'); 
    157157                                }); 
    158158                } 
    159159                return str; 
     
    368368         
    369369        function refreshWorkflowOptions() { 
    370370                hideDiv('workflow'); 
    371                 var program = DWRUtil.getValue('program'); 
     371                var program = dwr.util.getValue('program'); 
    372372                if (program == null || program == '') { 
    373                         DWRUtil.removeAllOptions('workflow'); 
     373                        dwr.util.removeAllOptions('workflow'); 
    374374                        refreshStateOptions(); 
    375375                } else 
    376376                        DWRProgramWorkflowService.getWorkflowsByProgram(program, function(wfs) { 
    377                                         DWRUtil.removeAllOptions('workflow'); 
    378                                         DWRUtil.addOptions('workflow', [" "]); 
    379                                         DWRUtil.addOptions('workflow', wfs, 'id', 'name'); 
     377                                        dwr.util.removeAllOptions('workflow'); 
     378                                        dwr.util.addOptions('workflow', [" "]); 
     379                                        dwr.util.addOptions('workflow', wfs, 'id', 'name'); 
    380380                                        if (wfs.length > 0) 
    381381                                                showDiv('workflow'); 
    382382                                        refreshStateOptions(); 
     
    385385         
    386386        function refreshStateOptions() { 
    387387                hideDiv('state'); 
    388                 var workflow = DWRUtil.getValue('workflow'); 
     388                var workflow = dwr.util.getValue('workflow'); 
    389389                if (workflow == null || workflow == '') { 
    390                         DWRUtil.removeAllOptions('state'); 
     390                        dwr.util.removeAllOptions('state'); 
    391391                } else 
    392392                        DWRProgramWorkflowService.getStatesByWorkflow(workflow, function (states) { 
    393                                         DWRUtil.removeAllOptions('state'); 
    394                                         DWRUtil.addOptions('state', states, 'id', 'name'); 
     393                                        dwr.util.removeAllOptions('state'); 
     394                                        dwr.util.addOptions('state', states, 'id', 'name'); 
    395395                                        if (states.length < 10) 
    396396                                                $('state').size = states.length; 
    397397                                        else 
     
    10621062                                        <c:if test="${iter.last}"> 
    10631063                                                <c:set var="temp" value="last"/> 
    10641064                                        </c:if> 
    1065                                         <a href="#" onClick="DWRUtil.setValue('cohort_builder_preview_method', '${temp}'); refreshPreview();"> 
     1065                                        <a href="#" onClick="dwr.util.setValue('cohort_builder_preview_method', '${temp}'); refreshPreview();"> 
    10661066                                                ${iter.count}. 
    10671067                                        </a> 
    10681068                                </td> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/person/addPerson.jsp

    old new  
    5252                                var birthdate = "${param.addBirthdate}"; 
    5353                                var age = "${param.addAge}"; 
    5454                                var gender = "${param.addGender}"; 
    55                                 DWRPersonService.getSimilarPeople(searchWidget.simpleClosure(searchWidget, "doObjectsFound"), personName, birthdate, age, gender); 
     55                                DWRPersonService.getSimilarPeople(personName, birthdate, age, gender, searchWidget.simpleClosure(searchWidget, "doObjectsFound")); 
    5656                                 
    5757                                searchWidget.allowAutoJump = function() { return false; }; 
    5858                        }); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/patients/findDuplicatePatients.jsp

    old new  
    9797                 
    9898                searchWidget.findObjects = function(phrase) { 
    9999                        if (searchOn.length > 1) 
    100                                 DWRPatientService.findDuplicatePatients(searchWidget.simpleClosure(searchWidget, "doObjectsFound"), searchOn); 
     100                                DWRPatientService.findDuplicatePatients(searchOn, searchWidget.simpleClosure(searchWidget, "doObjectsFound")); 
    101101                } 
    102102                 
    103103        }); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/programs/conversionForm.jsp

    old new  
    5454        } 
    5555 
    5656        function populateStates(states) { 
    57                 DWRUtil.removeAllOptions("programWorkflowState"); 
    58                 DWRUtil.addOptions("programWorkflowState", states, "id", "name"); 
     57                dwr.util.removeAllOptions("programWorkflowState"); 
     58                dwr.util.addOptions("programWorkflowState", states, "id", "name"); 
    5959                <c:if test="${not empty conversion.programWorkflowState}"> 
    60                         DWRUtil.setValue("programWorkflowState", ${conversion.programWorkflowState.programWorkflowStateId}); 
     60                        dwr.util.setValue("programWorkflowState", ${conversion.programWorkflowState.programWorkflowStateId}); 
    6161                </c:if> 
    6262        } 
    6363         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/programs/programForm.jsp

    old new  
    7474                var value = $('workflowsValue').value; 
    7575                value = value.substring(value.indexOf(":") + 1); 
    7676                values = helper(value); 
    77                 DWRUtil.removeAllRows(tableId); 
    78                 DWRUtil.addRows(tableId, values, [ 
     77                dwr.util.removeAllRows(tableId); 
     78                dwr.util.addRows(tableId, values, [ 
    7979                                function(id) { return idToNameMap[id]; }, 
    8080                                function(id) { return '<a href="javascript:removeWorkflow(' + id + ')">[x]</a>';}, 
    8181                        ]); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/programs/workflowForm.jsp

    old new  
    2424        }); 
    2525 
    2626        function refreshStateTable() { 
    27                 DWRUtil.removeAllRows('stateTable'); 
     27                dwr.util.removeAllRows('stateTable'); 
    2828                if (states.length != 0) { 
    29                         DWRUtil.addRows('stateTable', states, [ 
     29                        dwr.util.addRows('stateTable', states, [ 
    3030                                        function (st) { return idToNameMap[st[0]]; }, 
    3131                                        function (st) { return '<input type="checkbox" id="initial_' + st[0] + '" ' + (st[1] ? 'checked' : '') + '/>'; }, 
    3232                                        function (st) { return '<input type="checkbox" id="terminal_' + st[0] + '" ' + (st[2] ? 'checked' : '') + '/>'; } 
    33                                 ]); 
     33                                ], { escapeHtml:false }); 
    3434                } else { 
    35                         DWRUtil.addRows('stateTable', ['<spring:message code="general.none"/>'], [ 
     35                        dwr.util.addRows('stateTable', ['<spring:message code="general.none"/>'], [ 
    3636                                        function(s) { return s;} 
    37                                 ]); 
     37                                ], { escapeHtml:false }); 
    3838                } 
    3939        } 
    4040         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/concepts/conceptProposalForm.jsp

    old new  
    1616         
    1717        var selectConceptId = function(id) { 
    1818                var closure = function(thisObj, method) { return function(obj) { return thisObj[method]({"obj":obj}); }; }; 
    19                 DWRConceptService.getConcept(closure(cSearch, "select"), id); 
     19                DWRConceptService.getConcept(id, closure(cSearch, "select")); 
    2020                return false; 
    2121        } 
    2222         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/observations/obsForm.jsp

    old new  
    5050                        function() { 
    5151                                var codedSearch = dojo.widget.manager.getWidgetById("codedSearch"); 
    5252                                var conceptId = conceptSelection.hiddenInputNode.value; 
    53                                 DWRConceptService.findConceptAnswers(codedSearch.simpleClosure(codedSearch, 'doObjectsFound'), '', conceptId, false, true); 
     53                                DWRConceptService.findConceptAnswers('', conceptId, false, true, codedSearch.simpleClosure(codedSearch, 'doObjectsFound')); 
    5454                        } 
    5555                ); 
    5656                 
     
    7777                        var codedSearch = dojo.widget.manager.getWidgetById("codedSearch"); 
    7878                        var codedSelection = dojo.widget.manager.getWidgetById("codedSelection"); 
    7979                        var conceptId = codedSelection.conceptId;  
    80                         DWRConceptService.findConceptAnswers(codedSearch.simpleClosure(codedSearch, 'doObjectsFound'), txt, conceptId, false, true); 
     80                        DWRConceptService.findConceptAnswers(txt, conceptId, false, true, codedSearch.simpleClosure(codedSearch, 'doObjectsFound')); 
    8181                } 
    8282                 
    8383                dojo.event.topic.subscribe("codedSearch/objectsFound",  
     
    123123                        else if (datatype == 'NM' || datatype == 'SN') { 
    124124                                $('valueNumericRow').style.display = ""; 
    125125                                $('valueNumericRow').style.visibility = "visible"; 
    126                                 DWRConceptService.getConceptNumericUnits(fillNumericUnits, tmpConcept.conceptId); 
     126                                DWRConceptService.getConceptNumericUnits(tmpConcept.conceptId, fillNumericUnits); 
    127127                        } 
    128128                        else if (datatype == 'CWE') { 
    129129                                $('valueCodedRow').style.display = ""; 
     
    147147                        else { 
    148148                                $('valueInvalidRow').style.display = ""; 
    149149                                $('valueInvalidRow').style.visibility = "visible"; 
    150                                 DWRConceptService.getQuestionsForAnswer(fillValueInvalidPossible(tmpConcept), tmpConcept.conceptId); 
     150                                DWRConceptService.getQuestionsForAnswer(tmpConcept.conceptId, fillValueInvalidPossible(tmpConcept)); 
    151151                        } 
    152152                } 
    153153        } 
     
    167167                                else 
    168168                                        errorTag.innerHTML = errorTag.className = ""; 
    169169                        } 
    170                         DWRConceptService.isValidNumericValue(numericErrorMessage, value, conceptId); 
     170                        DWRConceptService.isValidNumericValue(value, conceptId, numericErrorMessage); 
    171171                } 
    172172        } 
    173173         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/reports/dataExportForm.jsp

    old new  
    150150         
    151151        function setValueHelper(htmlEl, val) { 
    152152                if (htmlEl.id != null && htmlEl.id != '') 
    153                         DWRUtil.setValue(htmlEl.id, val); 
     153                        dwr.util.setValue(htmlEl.id, val); 
    154154                else 
    155                         DWRUtil.setValue(htmlEl.name, val); 
     155                        dwr.util.setValue(htmlEl.name, val); 
    156156        } 
    157157         
    158158        function updateCohortColumn(sel) { 
    159159                if (sel.value != "") { 
    160160                        var count = sel.name.substr(sel.name.indexOf("_")+1, 3); 
    161                         var val = DWRUtil.getValue(sel.name); 
     161                        var val = dwr.util.getValue(sel.name); 
    162162                        var temp = val.split("."); 
    163163                        var opt = sel.options[sel.selectedIndex]; 
    164164                        var tbl = getParentByTagName(sel, "table"); 
     
    424424        } 
    425425         
    426426        function ensureName() { 
    427                 var name = DWRUtil.getValue('dataExportName'); 
     427                var name = dwr.util.getValue('dataExportName'); 
    428428                if (name == null || name == '') { 
    429429                        window.alert('<spring:message code="error.name" />'); 
    430430                        return false; 
     
    743743                                        var widget = dojo.widget.manager.getWidgetById("cSelection_" + count); 
    744744                                        if ("${column.conceptId}" != "") { 
    745745                                                widget.hiddenInputNode.value = "${column.conceptId}"; 
    746                                                 DWRConceptService.getConcept(widget.searchWidget.simpleClosure(new cSelect(widget), "select"), "${column.conceptId}"); 
     746                                                DWRConceptService.getConcept("${column.conceptId}", widget.searchWidget.simpleClosure(new cSelect(widget), "select")); 
    747747                                        } 
    748748                                        else {  
    749749                                                // left for backwards compatibility to pre 1.0.43 
     
    771771                                </c:if> 
    772772                        </c:forEach> 
    773773                         
    774                         DWREngine.setOrdered(true); 
     774                        dwr.engine.setOrdered(true); 
    775775                        var btn = $('newPatientButton'); 
    776776                        <c:forEach items="${dataExport.patientIds}" var="id"> 
    777777                                addNew(btn, "newPatient", '${id}'); 
    778778                        </c:forEach> 
    779                         DWREngine.setOrdered(false); 
     779                        dwr.engine.setOrdered(false); 
    780780                </c:if> 
    781781        } 
    782782</script> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/admin/reports/rowPerObsDataExportForm.jsp

    old new  
    150150         
    151151        function setValueHelper(htmlEl, val) { 
    152152                if (htmlEl.id != null && htmlEl.id != '') 
    153                         DWRUtil.setValue(htmlEl.id, val); 
     153                        dwr.util.setValue(htmlEl.id, val); 
    154154                else 
    155                         DWRUtil.setValue(htmlEl.name, val); 
     155                        dwr.util.setValue(htmlEl.name, val); 
    156156        } 
    157157         
    158158        function updateCohortColumn(sel) { 
    159159                if (sel.value != "") { 
    160160                        var count = sel.name.substr(sel.name.indexOf("_")+1, 3); 
    161                         var val = DWRUtil.getValue(sel.name); 
     161                        var val = dwr.util.getValue(sel.name); 
    162162                        var temp = val.split("."); 
    163163                        var opt = sel.options[sel.selectedIndex]; 
    164164                        var tbl = getParentByTagName(sel, "table"); 
     
    424424        } 
    425425         
    426426        function ensureName() { 
    427                 var name = DWRUtil.getValue('dataExportName'); 
     427                var name = dwr.util.getValue('dataExportName'); 
    428428                if (name == null || name == '') { 
    429429                        window.alert('<spring:message code="error.name" />'); 
    430430                        return false; 
     
    749749                                        var widget = dojo.widget.manager.getWidgetById("cSelection_" + count); 
    750750                                        if ("${column.conceptId}" != "") { 
    751751                                                widget.hiddenInputNode.value = "${column.conceptId}"; 
    752                                                 DWRConceptService.getConcept(widget.searchWidget.simpleClosure(new cSelect(widget), "select"), "${column.conceptId}"); 
     752                                                DWRConceptService.getConcept("${column.conceptId}", widget.searchWidget.simpleClosure(new cSelect(widget), "select")); 
    753753                                        } 
    754754                                        else {  
    755755                                                // left for backwards compatibility to pre 1.0.43 
     
    777777                                </c:if> 
    778778                        </c:forEach> 
    779779                         
    780                         DWREngine.setOrdered(true); 
     780                        dwr.engine.setOrdered(true); 
    781781                        var btn = $('newPatientButton'); 
    782782                        <c:forEach items="${dataExport.patientIds}" var="id"> 
    783783                                addNew(btn, "newPatient", '${id}'); 
    784784                        </c:forEach> 
    785                         DWREngine.setOrdered(false); 
     785                        dwr.engine.setOrdered(false); 
    786786                </c:if> 
    787787        } 
    788788</script> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientIdentifiers.jsp

    old new  
    2424 
    2525        function handleSaveIdentifier(index) { 
    2626                currIndex = index; 
    27                 var identifierType = DWRUtil.getValue('identifierType_' + index); 
    28                 var identifier = DWRUtil.getValue('identifier_' + index); 
     27                var identifierType = dwr.util.getValue('identifierType_' + index); 
     28                var identifier = dwr.util.getValue('identifier_' + index); 
    2929                //alert("id is " + identifier + " and type is " + identifierType); 
    30                 var identifierLocationId = DWRUtil.getValue('identifierLocationId_' + index); 
     30                var identifierLocationId = dwr.util.getValue('identifierLocationId_' + index); 
    3131                oldId = identifier; 
    3232                oldLocation = identifierLocationId; 
    3333                if (identifierType != null && identifierType != '' && identifier != null && identifier != '') 
     
    5050        } 
    5151         
    5252        function displayIdError(index, msg) { 
    53                 DWRUtil.setValue("msg_" + index, getMessage(msg)); 
     53                dwr.util.setValue("msg_" + index, getMessage(msg)); 
    5454                if ( msg.length > 0 ) { 
    5555                        document.getElementById("msg_" + index).style.display = ""; 
    5656                } else { 
     
    7272        } 
    7373         
    7474        function identifierFieldChanged(index) { 
    75                 var id = DWRUtil.getValue('identifier_' + index); 
     75                var id = dwr.util.getValue('identifier_' + index); 
    7676                if (id == null || id == '') { 
    7777                        document.getElementById('idSaveButton_' + index).disabled = true; 
    7878                } else { 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientOverview.jsp

    old new  
    7272                                        <!-- 
    7373                                                 
    7474                                                function updateCauseField() { 
    75                                                         var outcomeType = DWRUtil.getValue("reasonForExit"); 
     75                                                        var outcomeType = dwr.util.getValue("reasonForExit"); 
    7676                                                        <openmrs:globalProperty key="concept.patientDied" var="conceptPatientDied" /> 
    7777 
    7878                                                        if ( outcomeType == '${conceptPatientDied}' ) { 
     
    9393                                                } 
    9494                                         
    9595                                                function exitFormValidate() { 
    96                                                         var outcomeType = DWRUtil.getValue("reasonForExit"); 
    97                                                         var outcomeDate = DWRUtil.getValue("dateOfExit"); 
    98                                                         var outcomeCauseOfDeath = DWRUtil.getValue("causeOfDeath"); 
    99                                                         var outcomeCauseOther = DWRUtil.getValue("causeOfDeath_other"); 
     96                                                        var outcomeType = dwr.util.getValue("reasonForExit"); 
     97                                                        var outcomeDate = dwr.util.getValue("dateOfExit"); 
     98                                                        var outcomeCauseOfDeath = dwr.util.getValue("causeOfDeath"); 
     99                                                        var outcomeCauseOther = dwr.util.getValue("causeOfDeath_other"); 
    100100                                                         
    101101                                                        if ( outcomeType == '' ) { 
    102102                                                                alert("<spring:message code="Patient.outcome.error.noType" />"); 
     
    139139                        <script type="text/javascript"> 
    140140                                <spring:message code="general.voidReasonQuestion" var="reasonText"/> 
    141141                                function handleCancelExit() { 
    142                                         var reason = DWRUtil.getValue('cancelExitReason'); 
     142                                        var reason = dwr.util.getValue('cancelExitReason'); 
    143143                                        if (reason == '') { 
    144144                                                alert("<spring:message code="Patient.outcome.resumeCareReason.required" arguments="${reasonText}"/>"); 
    145145                                                return; 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/findPatient.jsp

    old new  
    7070                                function findObjects(text) { 
    7171                                        if (text.length > 2) { 
    7272                                                savedText = text; 
    73                                                 DWRPatientService.findPatients(preFillTable, text, includeRetired); 
     73                                                DWRPatientService.findPatients(text, includeRetired, preFillTable); 
    7474                                        } 
    7575                                        else { 
    7676                                                var msg = new Array(); 
     
    106106                                var findPatientForm = document.getElementById("findPatientForm"); 
    107107                                 
    108108                                function init() { 
    109                                         DWRUtil.useLoadingMessage(); 
     109                                        dwr.util.useLoadingMessage(); 
    110110                                 
    111111                                        <request:existsParameter name="patientId"> 
    112112                                                <!-- User has 'patientId' in the request params -- selecting that patient --> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientEncounters.jsp

    old new  
    206206                --%> 
    207207 
    208208                function handleRefreshTable(id, data, func) { 
    209                         DWRUtil.removeAllRows(id); 
    210                         DWRUtil.addRows(id, data, func, { 
     209                        dwr.util.removeAllRows(id); 
     210                        dwr.util.addRows(id, data, func, { 
    211211                                cellCreator:function(options) { 
    212212                                    var td = document.createElement("td"); 
    213213                                    return td; 
    214                                 } 
     214                                }, 
     215                                escapeHtml:false 
    215216                        }); 
    216217                } 
    217218 
     
    227228                } 
    228229                 
    229230                function handleAddObs(encounterField, conceptField, valueTextField, obsDateField) { 
    230                         var encounterId = DWRUtil.getValue($(encounterField)); 
    231                         var conceptId = DWRUtil.getValue($(conceptField)); 
    232                         var valueText = DWRUtil.getValue($(valueTextField)); 
    233                         var obsDate = DWRUtil.getValue($(obsDateField)); 
     231                        var encounterId = dwr.util.getValue($(encounterField)); 
     232                        var conceptId = dwr.util.getValue($(conceptField)); 
     233                        var valueText = dwr.util.getValue($(valueTextField)); 
     234                        var obsDate = dwr.util.getValue($(obsDateField)); 
    234235                        var patientId = ${model.patient.patientId};                      
    235236                        //alert("Adding obs for encounter (" + encounterId + "): " + conceptId + " = " + valueText + " " + obsDate);   
    236237                        DWRObsService.createObs(patientId, encounterId, conceptId, valueText, obsDate); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/personRelationships.jsp

    old new  
    4242        } 
    4343         
    4444        function refreshRelationshipsCallback(rels) { 
    45                 DWRUtil.removeAllOptions('new_relationships'); 
     45                dwr.util.removeAllOptions('new_relationships'); 
    4646                if (rels.length == 0) { 
    47                         DWRUtil.addOptions('new_relationships', [ '<spring:message code="general.none" javaScriptEscape="true" />' ]); 
     47                        dwr.util.addOptions('new_relationships', [ '<spring:message code="general.none" javaScriptEscape="true" />' ]); 
    4848                } 
    4949                for (var i = 0; i < rels.length; ++i) { 
    5050                        var rel = rels[i]; 
     
    6969                        str += ' <input type="button" value="<spring:message code="general.delete" javaScriptEscape="true"/>" onClick="handleDeleteRelationship(' + relId + ')"/>'; 
    7070                        str += ' <input type="button" value="<spring:message code="general.cancel" javaScriptEscape="true"/>" onClick="showDiv(\'del_rel_' + relId + '\'); hideDiv(\'voidRel' + relId + '\')"/>'; 
    7171                        str += '</span>'; 
    72                         DWRUtil.addOptions('new_relationships', [ str ]); 
     72                        dwr.util.addOptions('new_relationships', [ str ]); 
    7373                } 
    7474        } 
    7575         
     
    7777                var personIdB = ${model.personId}; 
    7878                var personPopup = dojo.widget.manager.getWidgetById("add_rel_target_selection"); 
    7979                var personIdA = personPopup.hiddenInputNode.value; 
    80                 var relType = DWRUtil.getValue('add_relationship_type'); 
     80                var relType = dwr.util.getValue('add_relationship_type'); 
    8181                if (relType == null || relType == '' || personIdA == null || personIdA == '' || personIdB == null || personIdB == '') { 
    8282                        window.alert('<spring:message code="Relationship.error.everything" javaScriptEscape="true"/>'); 
    8383                        return; 
     
    9393                        personIdB = temp; 
    9494                } 
    9595                personPopup.hiddenInputNode.value = ""; 
    96                 DWRUtil.setValue('add_relationship_type', null); 
     96                dwr.util.setValue('add_relationship_type', null); 
    9797                hideDiv('addRelationship'); 
    9898                showDiv('addRelationshipLink'); 
    9999                DWRRelationshipService.createRelationship(personIdA, personIdB, relType, refreshRelationships); 
    100100        } 
    101101         
    102102        function handleDeleteRelationship(relationshipId) { 
    103                 var reason = DWRUtil.getValue('void_reason_' + relationshipId); 
     103                var reason = dwr.util.getValue('void_reason_' + relationshipId); 
    104104                if (reason != null && reason != '') { 
    105105                        DWRRelationshipService.voidRelationship(relationshipId, reason, refreshRelationships); 
    106106                } 
    107107        } 
    108108         
    109109        function handlePickRelType(value, label) { 
    110                 DWRUtil.setValue('add_relationship_type', value); 
     110                dwr.util.setValue('add_relationship_type', value); 
    111111                document.getElementById('add_relationship_name').innerHTML = label; 
    112112                showDiv('add_rel_details'); 
    113113        } 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientRegimen.jsp

    old new  
    151151                //alert("hasOrders starting as " + hasOrders); 
    152152                 
    153153                function updateAddFields(drugFieldId, unitsFieldId, frequencyDayFieldId, frequencyWeekFieldId) { 
    154                         var drugId = DWRUtil.getValue(drugFieldId); 
     154                        var drugId = dwr.util.getValue(drugFieldId); 
    155155                        gUnitsFieldId = unitsFieldId; 
    156156                        DWROrderService.getUnitsByDrugId(drugId, setUnitsField); 
    157157                } 
    158158                 
    159159                function setUnitsField(unitsText) { 
    160                         DWRUtil.setValue(gUnitsFieldId + "Span", unitsText); 
    161                         DWRUtil.setValue(gUnitsFieldId, unitsText); 
     160                        dwr.util.setValue(gUnitsFieldId + "Span", unitsText); 
     161                        dwr.util.setValue(gUnitsFieldId, unitsText); 
    162162                        hideOtherStandards("New"); 
    163163                        showAppropriateActions("New"); 
    164164                } 
     
    170170                                showDiv('action' + codeName); 
    171171                        } else { 
    172172                                hideDiv('action' + codeName); 
    173                                 DWRUtil.setValue('actionSelect' + codeName, 'add'); 
     173                                dwr.util.setValue('actionSelect' + codeName, 'add'); 
    174174                                showDiv('add' + codeName); 
    175175                        } 
    176176                        showDiv('cancel' + codeName); 
     
    220220                                showHideDiv('stDt' + codeName); 
    221221                                showHideDiv('submit' + codeName); 
    222222                                hideDiv('action' + codeName); 
    223                                 DWRUtil.setValue('actionSelect' + codeName, ''); 
     223                                dwr.util.setValue('actionSelect' + codeName, ''); 
    224224                                hideDiv('reas' + codeName); 
    225225                                hideDiv('replace' + codeName); 
    226226                                hideDiv('add' + codeName); 
     
    229229                        <c:forEach var="standardRegimen" items="${model.standardRegimens}"> 
    230230 
    231231                                function addStandard${standardRegimen.codeName}(canReplace) { 
    232                                         var startDate = DWRUtil.getValue('startDate${standardRegimen.codeName}'); 
     232                                        var startDate = dwr.util.getValue('startDate${standardRegimen.codeName}'); 
    233233                                        if ( startDate && startDate != '' ) { 
    234234                                                if ( canReplace ) { 
    235                                                         var action = DWRUtil.getValue('actionSelect${standardRegimen.codeName}'); 
    236                                                         var reason = DWRUtil.getValue('reason${standardRegimen.codeName}'); 
    237                                                         DWRUtil.setValue('actionSelect${standardRegimen.codeName}', ''); 
    238                                                         DWRUtil.setValue('reason${standardRegimen.codeName}', ''); 
     235                                                        var action = dwr.util.getValue('actionSelect${standardRegimen.codeName}'); 
     236                                                        var reason = dwr.util.getValue('reason${standardRegimen.codeName}'); 
     237                                                        dwr.util.setValue('actionSelect${standardRegimen.codeName}', ''); 
     238                                                        dwr.util.setValue('reason${standardRegimen.codeName}', ''); 
    239239                                                        if ( action == 'void' ) { 
    240240                                                                //alert('voiding with [${model.patientId}] [${standardRegimen.canReplace}] [' + reason + ']'); 
    241241                                                                DWROrderService.voidCurrentDrugSet(${model.patientId}, '${standardRegimen.canReplace}', reason, addComponents${standardRegimen.codeName}); 
     
    257257                                } 
    258258                                 
    259259                                function addComponents${standardRegimen.codeName}() { 
    260                                         var startDate = DWRUtil.getValue('startDate${standardRegimen.codeName}'); 
    261                                         DWRUtil.setValue('startDate${standardRegimen.codeName}', ''); 
     260                                        var startDate = dwr.util.getValue('startDate${standardRegimen.codeName}'); 
     261                                        dwr.util.setValue('startDate${standardRegimen.codeName}', ''); 
    262262                                        <c:forEach var="drugComponent" items="${standardRegimen.drugComponents}"> 
    263263                                                addStack.push("DWROrderService.createDrugOrder(${drugComponent.drugId})"); 
    264264                                        </c:forEach> 
     
    280280                        } 
    281281                         
    282282                        function handleStandardActionChange(codeName) { 
    283                                 var action = DWRUtil.getValue('actionSelect' + codeName); 
     283                                var action = dwr.util.getValue('actionSelect' + codeName); 
    284284                                if ( action == 'void' || action == 'discontinue' ) { 
    285285                                        showDiv('reas' + codeName); 
    286286                                        showDiv('replace' + codeName); 
    287287                                        hideDiv('add' + codeName); 
    288288                                        if ( action == 'void' ) { 
    289                                                 DWRUtil.removeAllOptions('reason' + codeName); 
    290                                                 DWRUtil.addOptions('reason' + codeName, voidReasons, 'val', 'display'); 
     289                                                dwr.util.removeAllOptions('reason' + codeName); 
     290                                                dwr.util.addOptions('reason' + codeName, voidReasons, 'val', 'display'); 
    291291                                        } else if ( action == 'discontinue') { 
    292                                                 DWRUtil.removeAllOptions('reason' + codeName); 
    293                                                 DWRUtil.addOptions('reason' + codeName, discReasons, 'val', 'display'); 
     292                                                dwr.util.removeAllOptions('reason' + codeName); 
     293                                                dwr.util.addOptions('reason' + codeName, discReasons, 'val', 'display'); 
    294294                                        } 
    295295                                } else if ( action == 'add' ) { 
    296296                                        hideDiv('reas' + codeName); 
     
    306306                } 
    307307 
    308308                function addNewDrugOrder() { 
    309                         var action = DWRUtil.getValue('actionSelectNew'); 
    310                         var reason = DWRUtil.getValue('reasonNew'); 
    311                         var startDate = DWRUtil.getValue('startDate'); 
    312                         var drugId = DWRUtil.getValue('drug'); 
    313                         var dose = DWRUtil.getValue('dose'); 
    314                         var units = DWRUtil.getValue('units'); 
    315                         var freqDay = DWRUtil.getValue('frequencyDay'); 
    316                         var freqWeek = DWRUtil.getValue('frequencyWeek'); 
     309                        var action = dwr.util.getValue('actionSelectNew'); 
     310                        var reason = dwr.util.getValue('reasonNew'); 
     311                        var startDate = dwr.util.getValue('startDate'); 
     312                        var drugId = dwr.util.getValue('drug'); 
     313                        var dose = dwr.util.getValue('dose'); 
     314                        var units = dwr.util.getValue('units'); 
     315                        var freqDay = dwr.util.getValue('frequencyDay'); 
     316                        var freqWeek = dwr.util.getValue('frequencyWeek'); 
    317317                        if ( validateNewOrder(drugId, dose, units, freqDay, freqWeek, startDate) ) { 
    318                                 DWRUtil.setValue('actionSelectNew', ''); 
    319                                 DWRUtil.setValue('reasonNew', ''); 
     318                                dwr.util.setValue('actionSelectNew', ''); 
     319                                dwr.util.setValue('reasonNew', ''); 
    320320                                if ( action == 'void' ) { 
    321321                                        DWROrderService.voidCurrentDrugOrders(${model.patientId}, reason, addNewComponent); 
    322322                                        showHideDiv('reasNew'); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/globalProperties.jsp

    old new  
    3535                                                        onClick=' 
    3636                                                                hideDiv("gp_${ind}_actions"); 
    3737                                                                showDiv("gp_${ind}_saving"); 
    38                                                                 DWRAdministrationService.setGlobalProperty("${prop.property}", DWRUtil.getValue("gp_${ind}"), 
     38                                                                DWRAdministrationService.setGlobalProperty("${prop.property}", dwr.util.getValue("gp_${ind}"), 
    3939                                                                        function() { hideDiv("gp_${ind}_saving") }); 
    4040                                                        ' 
    4141                                                /> 
    4242                                                <input type="button" value="<spring:message code="general.cancel"/>" 
    4343                                                        onClick=' 
    4444                                                                hideDiv("gp_${ind}_actions"); 
    45                                                                 DWRUtil.setValue("gp_${ind}", "${prop.propertyValue}"); 
     45                                                                dwr.util.setValue("gp_${ind}", "${prop.propertyValue}"); 
    4646                                                '/> 
    4747                                        </span> 
    4848                                        <span id="gp_${ind}_saving" style="display: none; background-color: #e0e0e0"> 
     
    6060                        </c:if> 
    6161                        <script type="text/javascript"> 
    6262                                var gpVal = "<spring:message text="${prop.propertyValue}" javaScriptEscape="true"/>"; 
    63                                 DWRUtil.setValue('gp_${ind}', gpVal); 
     63                                dwr.util.setValue('gp_${ind}', gpVal); 
    6464                        </script> 
    6565                </c:forEach> 
    6666        </table> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientPrograms.jsp

    old new  
    115115                patientProgramForWorkflowEdited = patientProgramId; 
    116116                showLayer('editWorkflowPopup'); 
    117117                $('workflowPopupTitle').innerHTML = wfName; 
    118                 DWRUtil.removeAllRows('workflowTable'); 
    119                 DWRUtil.addRows('workflowTable', ['<spring:message code="general.loading" javaScriptEscape="true"/>'], [ function(s) { return s; } ]); 
    120                 DWRUtil.removeAllOptions('changeToState'); 
    121                 DWRUtil.addOptions('changeToState', ['<spring:message code="general.loading" javaScriptEscape="true"/>']); 
     118                dwr.util.removeAllRows('workflowTable'); 
     119                dwr.util.addRows('workflowTable', ['<spring:message code="general.loading" javaScriptEscape="true"/>'], [ function(s) { return s; } ], { escapeHtml:false }); 
     120                dwr.util.removeAllOptions('changeToState'); 
     121                dwr.util.addOptions('changeToState', ['<spring:message code="general.loading" javaScriptEscape="true"/>']); 
    122122                $('changeStateOnDate').value = ''; 
    123123                DWRProgramWorkflowService.getPatientStates(patientProgramId, programWorkflowId, function(states) { 
    124                                 DWRUtil.removeAllRows('workflowTable'); 
     124                                dwr.util.removeAllRows('workflowTable'); 
    125125                                var count = 0; 
    126126                                var goUntil = states.length; 
    127                                 DWRUtil.addRows('workflowTable', states, [ 
     127                                dwr.util.addRows('workflowTable', states, [ 
    128128                                                function(state) { return state.stateName; }, 
    129129                                                function(state) { 
    130130                                                        ++count; 
     
    135135                                                                str += ' <a href="javascript:handleVoidLastState()" style="color: red">[x]</a>'; 
    136136                                                        return str; 
    137137                                                } 
    138                                         ]); 
     138                                        ], { escapeHtml:false }); 
    139139                        }); 
    140140                DWRProgramWorkflowService.getPossibleNextStates(patientProgramId, programWorkflowId, function(items) { 
    141                                 DWRUtil.removeAllOptions('changeToState'); 
    142                                 DWRUtil.addOptions('changeToState', {'': '<spring:message code="State.select" javaScriptEscape="true"/>' }); 
    143                                 DWRUtil.addOptions('changeToState', items, 'id', 'name'); 
     141                                dwr.util.removeAllOptions('changeToState'); 
     142                                dwr.util.addOptions('changeToState', {'': '<spring:message code="State.select" javaScriptEscape="true"/>' }); 
     143                                dwr.util.addOptions('changeToState', items, 'id', 'name'); 
    144144                        }); 
    145145        } 
    146146         
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/patientSet.jsp

    old new  
    105105                        DWRPatientSetService.getMyPatientSetSize(function(sz) { PS_totalPatients = sz; document.getElementById("PS_totalNumber").innerHTML = sz; }); 
    106106                } 
    107107                <%-- TODO: this is commented out because it breaks the page in IE. Find the right place to put it. 
    108                 DWRUtil.useLoadingMessage(); 
     108                dwr.util.useLoadingMessage(); 
    109109                --%> 
    110110                if (localList != null) { 
    111111                        var ptIds = new Array(); 
     
    134134                                showLayer('${model.id}'); 
    135135                        } 
    136136                </c:if> 
    137                 DWRUtil.removeAllRows("${tableBodyId}"); 
     137                dwr.util.removeAllRows("${tableBodyId}"); 
    138138                if (PS_fromIndex > 0) { 
    139139                        var row = document.getElementById("${tableBodyId}").insertRow(0); 
    140140                        var cell = row.insertCell(0); 
     
    163163                        function(patient) { return patient.age; }, 
    164164                        function(patient) { return '<c:if test="${model.mutable}"><a href="javascript:remove(' + patient.patientId + ')" style="color: red">[x]<a></c:if>'; } 
    165165                ]; 
    166                 DWRUtil.addRows("${tableBodyId}", patients, cellFuncs); 
     166                dwr.util.addRows("${tableBodyId}", patients, cellFuncs, { escapeHtml:false }); 
    167167                if (PS_fromIndex + PS_pageSize < PS_totalPatients) { 
    168168                        var tbl = document.getElementById("${tableBodyId}"); 
    169169                        var row = tbl.insertRow(tbl.rows.length); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/view/portlets/customMostRecentObs.jsp

    old new  
    4444<script type="text/javascript"> 
    4545        function handleAddCustomObs(conceptId) { 
    4646                        var encounterId = null; 
    47                         var valueText = DWRUtil.getValue(document.getElementById('value_' + conceptId)); 
    48                         var obsDate = DWRUtil.getValue(document.getElementById('date_' + conceptId)); 
     47                        var valueText = dwr.util.getValue(document.getElementById('value_' + conceptId)); 
     48                        var obsDate = dwr.util.getValue(document.getElementById('date_' + conceptId)); 
    4949                        var patientId = ${model.patient.patientId}; 
    5050                        var conceptNameId = null; 
    5151                        //alert("Adding obs for encounter (" + encounterId + "): " + conceptId + " = " + valueText + " " + obsDate);   
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/WEB-INF/template/headerFull.jsp

    old new  
    9292                                        if (typeof ex == "string") 
    9393                                                window.status = "DWR warning/error: " + ex; 
    9494                                }; 
    95                                 DWREngine.setErrorHandler(handler); 
    96                                 DWREngine.setWarningHandler(handler); 
     95                                dwr.engine.setErrorHandler(handler); 
     96                                dwr.engine.setWarningHandler(handler); 
    9797                        </script> 
    9898                                                                 
    9999                        <openmrs:forEachAlert> 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/drugOrder.js.withjstl

    old new  
    156156                var gUnitsFieldId = ''; 
    157157 
    158158                function handleVoidCurrentDrugSet(drugSetId, voidReasonField) { 
    159                         var voidReason = DWRUtil.getValue($(voidReasonField)); 
     159                        var voidReason = dwr.util.getValue($(voidReasonField)); 
    160160                        var drugSetIdParam = '' + drugSetId; 
    161161                        DWROrderService.voidCurrentDrugSet(patientId, drugSetIdParam, voidReason, refreshCurrentRegimenTable); 
    162162                } 
    163163 
    164164                function handleVoidCompletedDrugSet(drugSetId, voidReasonField) { 
    165                         var voidReason = DWRUtil.getValue($(voidReasonField)); 
     165                        var voidReason = dwr.util.getValue($(voidReasonField)); 
    166166                        var drugSetIdParam = '' + drugSetId; 
    167167                        DWROrderService.voidCompletedDrugSet(patientId, drugSetIdParam, voidReason, refreshCompletedRegimenTable); 
    168168                } 
    169169 
    170170                function handleDiscontinueDrugSet(drugSetId, discDateField, discReasonField) { 
    171                         var discDate = DWRUtil.getValue($(discDateField)); 
    172                         var discReason = DWRUtil.getValue($(discReasonField)); 
     171                        var discDate = dwr.util.getValue($(discDateField)); 
     172                        var discReason = dwr.util.getValue($(discReasonField)); 
    173173                        var drugSetIdParam = '' + drugSetId; 
    174174                        if ( discDate == null || discDate == '' ) { 
    175175                                alert("<spring:message code="DrugOrder.drugSet.discontinue.error.noDate" />"); 
     
    190190                } 
    191191                 
    192192                function handleAddDrugOrder( patientId, drugField, doseField, unitsField, frequencyDayField, frequencyWeekField, startDateField) { 
    193                         var drugId = DWRUtil.getValue($(drugField)); 
    194                         var dose = DWRUtil.getValue($(doseField)); 
    195                         var units = DWRUtil.getValue($(unitsField)); 
    196                         var frequency = DWRUtil.getValue($(frequencyDayField)) + " x " + DWRUtil.getValue($(frequencyWeekField)); 
    197                         var startDate = DWRUtil.getValue($(startDateField)); 
     193                        var drugId = dwr.util.getValue($(drugField)); 
     194                        var dose = dwr.util.getValue($(doseField)); 
     195                        var units = dwr.util.getValue($(unitsField)); 
     196                        var frequency = dwr.util.getValue($(frequencyDayField)) + " x " + dwr.util.getValue($(frequencyWeekField)); 
     197                        var startDate = dwr.util.getValue($(startDateField)); 
    198198                        var instructions = ""; 
    199199                        if ( drugId != '' && dose != '' && units != '' && frequency != '' && startDate != '' ) { 
    200200                                blankAddNewOrder(drugField, doseField, unitsField, frequencyDayField, frequencyWeekField, startDateField); 
     
    209209                } 
    210210 
    211211                function blankAddNewOrder(drugField, doseField, unitsField, frequencyDayField, frequencyWeekField, startDateField) { 
    212                                 DWRUtil.setValue($(drugField),""); 
    213                                 DWRUtil.setValue($(doseField),""); 
    214                                 DWRUtil.setValue($(unitsField),""); 
    215                                 DWRUtil.setValue($(frequencyDayField),""); 
    216                                 DWRUtil.setValue($(frequencyWeekField),""); 
    217                                 DWRUtil.setValue($(startDateField),""); 
     212                                dwr.util.setValue($(drugField),""); 
     213                                dwr.util.setValue($(doseField),""); 
     214                                dwr.util.setValue($(unitsField),""); 
     215                                dwr.util.setValue($(frequencyDayField),""); 
     216                                dwr.util.setValue($(frequencyWeekField),""); 
     217                                dwr.util.setValue($(startDateField),""); 
    218218                } 
    219219                 
    220220                function handleVoidCurrentDrugOrder(orderId, voidReasonField) { 
    221                         var voidReason = DWRUtil.getValue($(voidReasonField)); 
     221                        var voidReason = dwr.util.getValue($(voidReasonField)); 
    222222                        DWROrderService.voidOrder(orderId, voidReason, refreshCurrentRegimenTable); 
    223223                } 
    224224 
    225225                function handleVoidCompletedDrugOrder(orderId, voidReasonField) { 
    226                         var voidReason = DWRUtil.getValue($(voidReasonField)); 
     226                        var voidReason = dwr.util.getValue($(voidReasonField)); 
    227227                        DWROrderService.voidOrder(orderId, voidReason, refreshCompletedRegimenTable); 
    228228                } 
    229229 
    230230                function handleDiscontinueDrugOrder(orderId, discDateField, discReasonField) { 
    231                         var discDate = DWRUtil.getValue($(discDateField)); 
    232                         var discReason = DWRUtil.getValue($(discReasonField)); 
     231                        var discDate = dwr.util.getValue($(discDateField)); 
     232                        var discReason = dwr.util.getValue($(discReasonField)); 
    233233                        if ( discDate && discDate != '' ) { 
    234234                                DWROrderService.discontinueOrder(orderId, discReason, discDate, refreshRegimenTables); 
    235235                        } else { 
     
    306306                        var tableId = 'regimenTableCurrent_header_' + drugSetLabel; 
    307307                         
    308308                        if ( document.getElementById(tableId) ) { 
    309                                 DWRUtil.addRows(tableId, drugSet, currentRegimenTableHeaderCells, { 
     309                                dwr.util.addRows(tableId, drugSet, currentRegimenTableHeaderCells, { 
    310310                                        cellCreator:function(options) { 
    311311                                            var td = document.createElement("td"); 
    312312                                            var cSpan = regimenMode == "view" ? "6" : "8"; 
    313313                                            td.setAttribute("colspan", cSpan); 
    314314                                            return td; 
    315                                         } 
     315                                        }, 
     316                                        escapeHtml:false 
    316317                                }); 
    317318                                //alert("about to try to populate " + "closegp_" + drugSetId + "_reason"); 
    318319                                if ( document.getElementById("closegp_" + drugSetId + "_reason") )  
    319                                         DWRUtil.addOptions("closegp_" + drugSetId + "_reason", discReasons, "val", "display"); 
     320                                        dwr.util.addOptions("closegp_" + drugSetId + "_reason", discReasons, "val", "display"); 
    320321                                if ( document.getElementById("voidgp_" + drugSetId + "_reason") )  
    321                                         DWRUtil.addOptions("voidgp_" + drugSetId + "_reason", voidReasons, "val", "display"); 
     322                                        dwr.util.addOptions("voidgp_" + drugSetId + "_reason", voidReasons, "val", "display"); 
    322323                        } 
    323324                } 
    324325 
     
    332333                        var tableId = 'regimenTableCompleted_header_' + drugSetId; 
    333334                         
    334335                        if ( document.getElementById(tableId) ) { 
    335                                 DWRUtil.addRows(tableId, drugSet, completedRegimenTableHeaderCells, { 
     336                                dwr.util.addRows(tableId, drugSet, completedRegimenTableHeaderCells, { 
    336337                                        cellCreator:function(options) { 
    337338                                            var td = document.createElement("td"); 
    338339                                            td.setAttribute("colspan", "8"); 
    339340                                            return td; 
    340                                         } 
     341                                        },  
     342                                        escapeHtml:false 
    341343                                }); 
    342344                        } 
    343345                } 
     
    353355                                        } 
    354356                                } 
    355357                                if ( document.getElementById(tableName) ) { 
    356                                         DWRUtil.addRows(tableName, drugOrders, currentRegimenTableCellFuncs, { 
     358                                        dwr.util.addRows(tableName, drugOrders, currentRegimenTableCellFuncs, { 
    357359                                                cellCreator:function(options) { 
    358360                                                    var td = document.createElement("td"); 
    359361                                                    return td; 
    360                                                 } 
     362                                                }, 
     363                                                escapeHtml:false 
    361364                                        }); 
    362365                                        for ( var i = 0; i < drugOrders.length; i++ ) { 
    363366                                                var orderId = drugOrders[i].orderId; 
    364367                                                if ( document.getElementById("close_" + orderId + "_reason") )  
    365                                                         DWRUtil.addOptions("close_" + orderId + "_reason", discReasons, "val", "display"); 
     368                                                        dwr.util.addOptions("close_" + orderId + "_reason", discReasons, "val", "display"); 
    366369                                                if ( document.getElementById("void_" + orderId + "_reason") )  
    367                                                         DWRUtil.addOptions("void_" + orderId + "_reason", voidReasons, "val", "display"); 
     370                                                        dwr.util.addOptions("void_" + orderId + "_reason", voidReasons, "val", "display"); 
    368371                                        } 
    369372                                } 
    370373                        } 
     
    381384                                } 
    382385                                 
    383386                                if ( document.getElementById(tableName) ) { 
    384                                         DWRUtil.addRows(tableName, drugOrders, completedRegimenTableCellFuncs, { 
     387                                        dwr.util.addRows(tableName, drugOrders, completedRegimenTableCellFuncs, { 
    385388                                                cellCreator:function(options) { 
    386389                                                    var td = document.createElement("td"); 
    387390                                                    return td; 
    388                                                 } 
     391                                                }, 
     392                                                escapeHtml:false 
    389393                                        }); 
    390394                                        for ( var i = 0; i < drugOrders.length; i++ ) { 
    391395                                                var orderId = drugOrders[i].orderId; 
    392396                                                if ( document.getElementById("voidcp_" + orderId + "_reason") )  
    393                                                         DWRUtil.addOptions("voidcp_" + orderId + "_reason", voidReasons, "val", "display"); 
     397                                                        dwr.util.addOptions("voidcp_" + orderId + "_reason", voidReasons, "val", "display"); 
    394398                                        } 
    395399                                } 
    396400                        } 
     
    407411                                                var headerId = tableName + "_header_" + currDrugSet; 
    408412                                                var tableId = tableName + "_" + currDrugSet; 
    409413                                                if ( document.getElementById(headerId) ) 
    410                                                         DWRUtil.removeAllRows(tableName + '_header_' + currDrugSet); 
     414                                                        dwr.util.removeAllRows(tableName + '_header_' + currDrugSet); 
    411415                                                if ( document.getElementById(tableId) ) 
    412                                                         DWRUtil.removeAllRows(tableName + '_' + currDrugSet); 
     416                                                        dwr.util.removeAllRows(tableName + '_' + currDrugSet); 
    413417                                        } 
    414418                                } 
    415419                        } else { 
    416420                                if ( document.getElementById(tableName) )  
    417                                         DWRUtil.removeAllRows(tableName); 
     421                                        dwr.util.removeAllRows(tableName); 
    418422                        } 
    419423                } 
    420424 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/obs.js.withjstl

    old new  
    4141         
    4242        function obsSearch( patientField, conceptField, encounterField, obsTable, obsDiv ) { 
    4343                showDiv(obsDiv); 
    44                 var patientId = patientField.length == 0 ? "" : DWRUtil.getValue(patientField); 
    45                 var conceptId = conceptField.length == 0 ? "" : DWRUtil.getValue(conceptField); 
    46                 var encounterId = encounterField.length == 0 ? "" : DWRUtil.getValue(encounterField); 
     44                var patientId = patientField.length == 0 ? "" : dwr.util.getValue(patientField); 
     45                var conceptId = conceptField.length == 0 ? "" : dwr.util.getValue(conceptField); 
     46                var encounterId = encounterField.length == 0 ? "" : dwr.util.getValue(encounterField); 
    4747                obsTableToRefresh = obsTable; 
    4848                DWRObsService.getObsByPatientConceptEncounter(patientId, conceptId, encounterId, refreshObsTable); 
    4949        } 
    5050         
    5151        function refreshObsTable(obss) { 
    5252                if ( document.getElementById(obsTableToRefresh) ) { 
    53                         DWRUtil.removeAllRows(obsTableToRefresh); 
     53                        dwr.util.removeAllRows(obsTableToRefresh); 
    5454                        if ( obss && obss.length > 0 ) { 
    55                                 DWRUtil.addRows(obsTableToRefresh, obss, obsCellFuncs, { 
     55                                dwr.util.addRows(obsTableToRefresh, obss, obsCellFuncs, { 
    5656                                        cellCreator:function(options) { 
    5757                                            var td = document.createElement("td"); 
    5858                                            return td; 
    59                                         } 
     59                                        }, 
     60                                        escapeHtml:false 
    6061                                }); 
    6162                        } else { 
    6263                                var noObsMsg = "<spring:message code="ObsSearch.noneFound" />"; 
    6364                                var obsMsgs = [noObsMsg, ""]; 
    64                                 DWRUtil.addRows(obsTableToRefresh, obsMsgs, obsNoneCellFuncs, { 
     65                                dwr.util.addRows(obsTableToRefresh, obsMsgs, obsNoneCellFuncs, { 
    6566                                        cellCreator:function(options) { 
    6667                                            var td = document.createElement("td"); 
    6768                                            return td; 
    68                                         } 
     69                                        }, 
     70                                        escapeHtml:false 
    6971                                }); 
    7072                        } 
    7173                } else { 
     
    7577 
    7678        function obsSearchClear( patientField, conceptField, encounterField ) { 
    7779                if ( patientField.length > 0 ) { 
    78                         DWRUtil.setValue(patientField, ""); 
     80                        dwr.util.setValue(patientField, ""); 
    7981                        var patPopup = dojo.widget.manager.getWidgetById("patientId_selection"); 
    8082                        if ( patPopup ) { 
    8183                                patPopup.displayNode.innerHTML = ""; 
     
    8385                        } 
    8486                } 
    8587                if ( conceptField.length > 0 ) { 
    86                         DWRUtil.setValue(conceptField, ""); 
     88                        dwr.util.setValue(conceptField, ""); 
    8789                        var conPopup = dojo.widget.manager.getWidgetById("conceptId_selection"); 
    8890                        if ( conPopup ) { 
    8991                                conPopup.displayNode.innerHTML = ""; 
     
    9193                        } 
    9294                } 
    9395                if ( encounterField.length > 0 ) { 
    94                         DWRUtil.setValue(encounterField, ""); 
     96                        dwr.util.setValue(encounterField, ""); 
    9597                        var encPopup = dojo.widget.manager.getWidgetById("encounterId_selection"); 
    9698                        if ( encPopup ) { 
    9799                                encPopup.displayNode.innerHTML = ""; 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/EncounterSearch.js

    old new  
    2121                        dojo.debug("postCreate in encounterSearch"); 
    2222                         
    2323                        if (this.encounterId) 
    24                                 DWREncounterService.getEncounter(this.simpleClosure(this, "select"), this.encounterId); 
     24                                DWREncounterService.getEncounter(this.encounterId, this.simpleClosure(this, "select")); 
    2525                }, 
    2626                 
    2727                 
    2828                doFindObjects: function(text) { 
    2929 
    3030                        var tmpIncludedVoided = (this.showIncludeVoided && this.includeVoided.checked); 
    31                         DWREncounterService.findEncounters(this.simpleClosure(this, "doObjectsFound"), text, tmpIncludedVoided); 
     31                        DWREncounterService.findEncounters(text, tmpIncludedVoided, this.simpleClosure(this, "doObjectsFound")); 
    3232                         
    3333                        return false; 
    3434                }, 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/FieldSearch.js

    old new  
    2323                         
    2424                        var closure = function(thisObj, method) { return function(obj) { return thisObj[method]({"obj":obj}); }; }; 
    2525                        if (this.fieldId != "") 
    26                                 DWRFormService.findFields(closure(this, "select"), this.fieldId); 
     26                                DWRFormService.findFields(this.fieldId, closure(this, "select")); 
    2727                }, 
    2828                 
    2929                doFindObjects: function(text) { 
    3030                        if (this.alsoSearchConcepts == true) 
    31                                 DWRFormService.findFieldsAndConcepts(this.simpleClosure(this, "doObjectsFound"), text); 
     31                                DWRFormService.findFieldsAndConcepts(text, this.simpleClosure(this, "doObjectsFound")); 
    3232                        else 
    33                                 DWRFormService.findFields(this.simpleClosure(this, "doObjectsFound"), text); 
     33                                DWRFormService.findFields(text, this.simpleClosure(this, "doObjectsFound")); 
    3434                                 
    3535                        return false; 
    3636                }, 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/UserSearch.js.withjstl

    old new  
    3030                         
    3131                        var closure = function(thisObj, method) { return function(obj) { return thisObj[method]({"obj":obj}); }; }; 
    3232                        if (this.userId != "") { 
    33                                 DWRUserService.getUser(closure(this, "select"), this.userId); 
     33                                DWRUserService.getUser(this.userId, closure(this, "select")); 
    3434                        } 
    3535                }, 
    3636                 
    3737                doFindObjects: function(text) { 
    3838                        var tmpIncludeVoided = (this.showIncludeVoided && this.includeVoided.checked); 
    39                         DWRUserService.findUsers(this.simpleClosure(this, "doObjectsFound"), text, this.roles, tmpIncludeVoided); 
     39                        DWRUserService.findUsers(text, this.roles, tmpIncludeVoided, this.simpleClosure(this, "doObjectsFound")); 
    4040                         
    4141                        return false; 
    4242                }, 
     
    5353                 
    5454                showAll: function() { 
    5555                        var tmpIncludeVoided = (this.showIncludeVoided && this.includeVoided.checked); 
    56                         DWRUserService.getAllUsers(this.simpleClosure(this, "doObjectsFound"), this.roles, tmpIncludeVoided); 
     56                        DWRUserService.getAllUsers(this.roles, tmpIncludeVoided, this.simpleClosure(this, "doObjectsFound")); 
    5757                }, 
    5858                 
    5959                getCellFunctions: function() { 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/LocationSearch.js

    old new  
    2020                postCreate: function(){ 
    2121                        dojo.debug("postCreate in LocationSearch"); 
    2222                        if (this.locationId) 
    23                                 DWREncounterService.getLocation(this.simpleClosure(this, "select"), this.locationId); 
     23                                DWREncounterService.getLocation(this.locationId, this.simpleClosure(this, "select")); 
    2424                }, 
    2525                 
    2626                showAll: function() { 
     
    2828                }, 
    2929                 
    3030                doFindObjects: function(text) { 
    31                         DWREncounterService.findLocations(this.simpleClosure(this, "doObjectsFound"), text); 
     31                        DWREncounterService.findLocations(text, this.simpleClosure(this, "doObjectsFound")); 
    3232                        return false; 
    3333                }, 
    3434                 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/ObsSearch.js.withjstl

    old new  
    122122                 
    123123                postCreate: function() { 
    124124                        if (this.patientId != "" || this.encounterId != "" || this.conceptId != "") { 
    125                                 DWRObsService.getObsByPatientConceptEncounter(this.simpleClosure(this, "doObjectsFound"), this.patientId, this.encounterId, this.conceptId, false); 
     125                                DWRObsService.getObsByPatientConceptEncounter(this.patientId, this.encounterId, this.conceptId, false, this.simpleClosure(this, "doObjectsFound")); 
    126126                        } 
    127127                }, 
    128128                 
    129129                selectObs: function(obsId) { 
    130                         DWRObsService.getObs(this.simpleClosure(this, "select"), obsId); 
     130                        DWRObsService.getObs(obsId, this.simpleClosure(this, "select")); 
    131131                }, 
    132132                 
    133133                doFindObjects: function(patientId, encounterId, conceptId) { 
    134134 
    135135                        if (this.patientId != "" || this.encounterId != "" || this.conceptId != "") { 
    136                                 DWRObsService.getObsByPatientConceptEncounter(this.simpleClosure(this, "doObjectsFound"), this.patientId, this.encounterId, this.conceptId, false); 
     136                                DWRObsService.getObsByPatientConceptEncounter(this.patientId, this.encounterId, this.conceptId, false, this.simpleClosure(this, "doObjectsFound")); 
    137137                        } 
    138138                         
    139139                        return false; 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/OpenmrsSearch.js.withjstl

    old new  
    104104                        if (typeof ex == "string") 
    105105                                window.status = "DWR warning/error: " + ex; 
    106106                }; 
    107                 DWREngine.setErrorHandler(handler); 
    108                 DWREngine.setWarningHandler(handler); 
     107                dwr.engine.setErrorHandler(handler); 
     108                dwr.engine.setWarningHandler(handler); 
    109109        }, 
    110110                 
    111111        fillInTemplate: function(args, frag){ 
     
    425425                        this.displayHeaderRow(); 
    426426                } 
    427427                 
     428            dojo.debug("in doObjectsFound"); 
    428429                this.fillTable(objs); 
    429430        }, 
    430431         
     
    564565        }, 
    565566         
    566567        cellCreator: function(options) { 
    567                 if (DWRUtil._isHTMLElement(options.data, "td") == true) 
     568                if (dwr.util._isHTMLElement(options.data, "td") == true) 
    568569                        return options.data; 
    569570                 
    570571                return document.createElement("td"); 
     
    572573 
    573574 
    574575        fillTable: function(objects, cells) { 
    575                if (objects.length > 1 || typeof objects[0] != 'string') 
     576            if (objects.length > 1 || typeof objects[0] != 'string') 
    576577                        dojo.event.topic.publish(this.eventNames.fillTable, {"objects": objects} ); 
    577578                 
    578                // If we get only one result and the enter key was pressed jump to that object 
     579            // If we get only one result and the enter key was pressed jump to that object 
    579580                if (objects.length == 1 && ((this.event && this.key == dojo.event.browser.keys.KEY_ENTER) ||  
    580581                        (this.event == null && !(this.key)))) {  
    581582                                //alert("type: " (typeof objects[0])); 
     
    594595                 
    595596                this.updatePagingNumbers(); 
    596597                 
    597                // signal to the using script that we've cleared the rows 
     598        // signal to the using script that we've cleared the rows 
    598599                this.onRemoveAllRows(this.objHitsTableBody); 
    599             DWRUtil.removeAllRows(this.objHitsTableBody);     //clear out the current rows 
     600            dwr.util.removeAllRows(this.objHitsTableBody);    //clear out the current rows 
    600601                 
    601602            var objs = objects.slice(this.firstItemDisplayed - 1, (this.firstItemDisplayed - 1) + this.numItemsDisplayed); 
    602603             
    603            DWRUtil.addRows(this.objHitsTableBody, objs, this.getCellFunctions(), this.getRowOptions()); 
     604        dwr.util.addRows(this.objHitsTableBody, objs, this.getCellFunctions(), this.getRowOptions()); 
    604605                 
    605             setTimeout(this.simpleClosure(this, "updatePagingBars"), 0); 
     606               setTimeout(this.simpleClosure(this, "updatePagingBars"), 0); 
    606607             
    607            if (this.event && this.key == dojo.event.browser.keys.KEY_ENTER) { 
     608        if (this.event && this.key == dojo.event.browser.keys.KEY_ENTER) { 
    608609                // showHighlighting must be called here to assure it occurs after  
    609610                // objects are returned. Must be called with Timeout because  
    610611                // DWRUtil.addRows uses setTimeout 
     
    614615            if (this.event) 
    615616                    dojo.debug("ending fillTable(). Keycode was: " + this.key); 
    616617             
    617            this.postFillTable(); 
     618        this.postFillTable(); 
    618619        }, 
    619620         
    620621         
    621622        getRowOptions: function() { 
    622623                var arr = { 'rowCreator': this.simpleClosure(this, "rowCreator"), 
    623                                         'cellCreator': this.simpleClosure(this, "cellCreator")}; 
     624                                        'cellCreator': this.simpleClosure(this, "cellCreator"), 
     625                                        'escapeHtml': false 
     626                                        }; 
    624627                return arr; 
    625628        }, 
    626629         
     
    653656                this.hideHeaderRow(); 
    654657                // signal to the using script that we've cleared the rows 
    655658                this.onRemoveAllRows(this.objHitsTableBody); 
    656             DWRUtil.removeAllRows(this.objHitsTableBody);     //clear out the current rows 
     659            dwr.util.removeAllRows(this.objHitsTableBody);    //clear out the current rows 
    657660                this.inputNode.value = this.text = this.lastPhraseSearch = ""; 
    658661        }, 
    659662 
     
    738741                if (this.numItemsDisplayed + 1 == this.allObjectsFound.length) { 
    739742                        this.numItemsDisplayed = this.numItemsDisplayed + 1; 
    740743                } 
     744                dojo.debug("end update paging"); 
    741745        }, 
    742746         
    743747        getTableBodySize: function() { 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/ConceptSearch.js

    old new  
    3333                        dojo.debug("postCreate in conceptsearch"); 
    3434                         
    3535                        if (this.drugId) { 
    36                                 DWRConceptService.getDrug(this.simpleClosure(this, "select"), this.drugId); 
     36                                DWRConceptService.getDrug(this.drugId, this.simpleClosure(this, "select")); 
    3737                        } 
    3838                        else if (this.conceptId) { 
    39                                 DWRConceptService.getConcept(this.simpleClosure(this, "select", true), this.conceptId); 
     39                                DWRConceptService.getConcept(this.conceptId, this.simpleClosure(this, "select", true)); 
    4040                        } 
    4141                         
    4242                        this.inputNode.value = this.searchPhrase; 
    4343                        dojo.debug("searchPhrase, before inserting to inputNode is " + this.searchPhrase); 
    4444                         
    4545                        if ( this.showAnswers && (this.searchPhrase || this.performInitialSearch) ) { 
    46                                 DWRConceptService.findConceptAnswers(this.simpleClosure(this, "doObjectsFound"), this.searchPhrase, this.showAnswers, false, this.includeDrugConcepts); 
     46                                DWRConceptService.findConceptAnswers(this.searchPhrase, this.showAnswers, false, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    4747                        } 
    4848                        else if (this.searchPhrase){ 
    49                                 DWRConceptService.findConcepts(this.simpleClosure(this, "doObjectsFound"), this.searchPhrase, false, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts); 
     49                                DWRConceptService.findConcepts(this.searchPhrase, false, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    5050                        } 
    5151                }, 
    5252                 
     
    5555                        var tmpIncludedRetired = (this.showIncludeRetired && this.includeRetired.checked); 
    5656                         
    5757                        if ( this.showAnswers != "" ) { 
    58                                 DWRConceptService.findConceptAnswers(this.simpleClosure(this, "doObjectsFound"), text, this.showAnswers, tmpIncludedRetired, this.includeDrugConcepts); 
     58                                DWRConceptService.findConceptAnswers(text, this.showAnswers, tmpIncludedRetired, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    5959                        } else { 
    60                                 DWRConceptService.findConcepts(this.simpleClosure(this, "doObjectsFound"), text, tmpIncludedRetired, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts); 
     60                                DWRConceptService.findConcepts(text, tmpIncludedRetired, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    6161                        } 
    6262                         
    63                         //DWRConceptService.findConcepts(this.simpleClosure(this, "doObjectsFound"), text, tmpIncludedRetired, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts); 
     63                        //DWRConceptService.findConcepts(text, tmpIncludedRetired, this.includeClasses, this.excludeClasses, this.includeDatatypes, this.excludeDatatypes, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    6464                         
    6565                        return false; 
    6666                }, 
     
    175175                 
    176176                searchCleared: function() { 
    177177                        if ( this.showAnswers ) 
    178                                 DWRConceptService.findConceptAnswers(this.simpleClosure(this, "doObjectsFound"), "", this.showAnswers, false, this.includeDrugConcepts); 
     178                                DWRConceptService.findConceptAnswers("", this.showAnswers, false, this.includeDrugConcepts, this.simpleClosure(this, "doObjectsFound")); 
    179179                } 
    180180                 
    181181        }, 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/scripts/dojo/src/widget/openmrs/PatientSearch.js.withjstl

    old new  
    3434                                this.selectPatient(this.patientId); 
    3535                        } 
    3636                        else if (this.searchPhrase) { 
    37                                 DWRPatientService.findPatients(this.simpleClosure(this, "doObjectsFound"), this.searchPhrase, false); 
     37                                DWRPatientService.findPatients(this.searchPhrase, false, this.simpleClosure(this, "doObjectsFound")); 
    3838                        } 
    3939                }, 
    4040                 
    4141                selectPatient: function(patientId) { 
    42                         DWRPatientService.getPatient(this.simpleClosure(this, "select"), patientId); 
     42                        DWRPatientService.getPatient(patientId, this.simpleClosure(this, "select")); 
    4343                }, 
    4444                 
    4545                doFindObjects: function(text) { 
     46                    dojo.debug("finding patient with: " + text); 
    4647 
    4748                        var tmpIncludedVoided = (this.showIncludeVoided && this.includeVoided.checked); 
    48                         DWRPatientService.findPatients(this.simpleClosure(this, "doObjectsFound"), text, tmpIncludedVoided); 
     49                        DWRPatientService.findPatients(text, tmpIncludedVoided, this.simpleClosure(this, "doObjectsFound")); 
    4950                         
    5051                        return false; 
    5152                }, 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/admin/forms/formSchemaDesign.js

    old new  
    261261                        msg.newTree.containerNode.style.display = ""; 
    262262                         
    263263                        if (msg.child.data.isSet) 
    264                                 DWRConceptService.getConceptSet(addConceptSet(msg.child), msg.child.data.conceptId); 
     264                                DWRConceptService.getConceptSet(msg.child.data.conceptId, addConceptSet(msg.child)); 
    265265                         
    266266                        if (msg.skipEdit) { 
    267267                                updateSortWeight(msg.child); 
     
    307307var nodeRemoved = function(val) { 
    308308        this.value = val; 
    309309        this.execute = function(msg) { 
    310                 DWREngine.setAsync(false); 
     310                dwr.engine.setAsync(false); 
    311311                removeNode(msg.child); 
    312                 DWREngine.setAsync(true); 
     312                dwr.engine.setAsync(true); 
    313313        }; 
    314314} 
    315315 
     
    701701                         
    702702                        // save the field to the database 
    703703                        selectedNode = target; 
    704                         DWRFormService.saveFormField(endSaveFormField(target), data.fieldId, data.fieldName, data.description, data.fieldType, 
     704                        DWRFormService.saveFormField(data.fieldId, data.fieldName, data.description, data.fieldType, 
    705705                                data.conceptId, data.tableName, data.attributeName, data.defaultValue, data.selectMultiple,  
    706                                 data.formFieldId, formId, data.parent, data.fieldNumber, data.fieldPart, data.pageNumber, data.minOccurs, data.maxOccurs, data.isRequired, data.sortWeight); 
     706                                data.formFieldId, formId, data.parent, data.fieldNumber, data.fieldPart, data.pageNumber, data.minOccurs, data.maxOccurs, data.isRequired, data.sortWeight, endSaveFormField(target)); 
    707707                         
    708708                        // update the field label in the tree 
    709709                        target.titleNode.innerHTML = target.title = getFieldLabel(data); 
  • /home/nribeka/Desktop/Work/PatientMatching/openmrs-trunk/web/openmrs.js

    old new  
    11 
    22function markAlertRead(self, alertId) { 
    3         DWRAlertService.markAlertRead(null, alertId); 
     3        DWRAlertService.markAlertRead(alertId, null); 
    44        var parent = self.parentNode; 
    55        parent.style.display = "none"; 
    66        var unreadAlertSizeBox = document.getElementById('unreadAlertSize'); 
     
    139139        if (message) loadingMessage = message; 
    140140        else loadingMessage = "Loading"; 
    141141 
    142         DWREngine.setPreHook(function() { 
     142        dwr.engine.setPreHook(function() { 
    143143                var disabledZone = $('disabledZone'); 
    144144                if (!disabledZone) { 
    145145                        disabledZone = document.createElement('div'); 
     
    157157                } 
    158158        }); 
    159159 
    160         DWREngine.setPostHook(function() { 
     160        dwr.engine.setPostHook(function() { 
    161161                $('disabledZone').style.display = 'none'; 
    162162        }); 
    163163}