Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public String execute()
}

if (!valid) {
response.sendRedirect("/oscarResearch/oscarDxResearch/dxResearch.jsp");
response.sendRedirect(request.getContextPath() + "/oscarResearch/oscarDxResearch/dxResearch.jsp");
return NONE;
}

Expand All @@ -161,11 +161,11 @@ public String execute()

StringBuilder actionforward = new StringBuilder();
if ("success".equals(forwardTo)) {
actionforward = new StringBuilder("/oscarResearch/oscarDxResearch/setupDxResearch.do");
actionforward = new StringBuilder(request.getContextPath() + "/oscarResearch/oscarDxResearch/setupDxResearch.do");
} else if ("codeSearch".equals(forwardTo)) {
actionforward = new StringBuilder("/oscarResearch/oscarDxResearch/dxcodeSearch.do");
actionforward = new StringBuilder(request.getContextPath() + "/oscarResearch/oscarDxResearch/dxcodeSearch.do");
} else if ("codeList".equals(forwardTo)) {
actionforward = new StringBuilder("/oscarResearch/oscarDxResearch/quickCodeList.jsp");
actionforward = new StringBuilder(request.getContextPath() + "/oscarResearch/oscarDxResearch/quickCodeList.jsp");
}
actionforward.append("?demographicNo=").append(demographicNo);
actionforward.append("&providerNo=").append(providerNo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public String execute() throws ServletException, IOException {
dao.merge(research);
}

StringBuffer forward = new StringBuffer("/oscarResearch/oscarDxResearch/setupDxResearch.do");
StringBuffer forward = new StringBuffer(request.getContextPath() + "/oscarResearch/oscarDxResearch/setupDxResearch.do");
forward.append("?demographicNo=").append(demographicNo);
forward.append("&providerNo=").append(providerNo);
forward.append("&quickList=");
Expand Down
41 changes: 24 additions & 17 deletions src/main/webapp/oscarReport/oscarReportDxReg.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

--%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="org.oscarehr.util.SessionConstants" %>
<%@ page import="org.oscarehr.common.model.ProviderPreference" %>
<%@ include file="/taglibs.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
String roleName$ = (String) session.getAttribute("userrole") + "," + (String) session.getAttribute("user");
boolean authed = true;
Expand Down Expand Up @@ -58,6 +60,8 @@
<head>
<title><fmt:setBundle basename="oscarResources"/><fmt:message key="admin.admin.DiseaseRegistry"/></title>

<meta charset="UTF-8">

<link rel="stylesheet" type="text/css" media="all"
href="${pageContext.servletContext.contextPath}/library/jquery/jquery-ui.theme-1.12.1.min.css"/>
<link rel="stylesheet" type="text/css" media="all"
Expand Down Expand Up @@ -123,9 +127,12 @@
String mygroupno = providerPreference.getMyGroupNo();
pageContext.setAttribute("mygroupno", mygroupno);
String radiostatus = (String) session.getAttribute("radiovaluestatus");
if (radiostatus == null || radiostatus == "")
if (radiostatus == null || radiostatus.isEmpty()) {
radiostatus = "patientRegistedAll";
String formAction = "/report/DxresearchReport?method=" + radiostatus;
session.setAttribute("radiovaluestatus", radiostatus);
}
String formAction = request.getContextPath() + "/report/DxresearchReport.do?method=" + radiostatus;
request.setAttribute("radiostatus", radiostatus);
request.setAttribute("listview", request.getSession().getAttribute("listview"));
request.setAttribute("codeSearch", request.getSession().getAttribute("codeSearch"));
//request.setAttribute("editingCode", request.getSession().getAttribute("editingCode"));
Expand All @@ -144,7 +151,7 @@
</div>

<div class="well well-small">
<form action="${pageContext.request.contextPath}/report/DxresearchReport?method=addSearchCode.do" method="post">
<form action="${pageContext.request.contextPath}/report/DxresearchReport.do?method=addSearchCode" method="post" accept-charset="UTF-8">
<div class="row-fluid">
<input type="hidden" name="action" value="NA"/>
<select name="quicklistname" class="sel">
Expand All @@ -166,7 +173,7 @@
class="span4 jsonDxSearch"/>
</div>
<div class="row-fluid">
<nested:submit styleClass="btn btn-primary">Add</nested:submit>
<input type="submit" class="btn btn-primary" value="Add" />
<input type="button" class="btn btn-danger" value="Clear"
onclick="javascript:this.form.action='${pageContext.servletContext.contextPath}/report/DxresearchReport.do?method=clearSearchCode';this.form.submit()"/>
</div>
Expand All @@ -177,7 +184,7 @@
<strong>Search all patients with disease codes:</strong>
</div>

<nested:form action='<%=formAction%>' styleClass="form-inline">
<form action="<%=formAction%>" method="post" class="form-inline" accept-charset="UTF-8">

<div class="row-fluid">
<display:table name="codeSearch" id="codeSearch" class="table table-condensed table-striped">
Expand All @@ -188,28 +195,28 @@
</div>
<div class="row-fluid">
<label class="radio">
<input type="radio" name="SearchBy" value="radio"
id="SearchBy_0" <c:if test="${radiostatus == 'patientRegistedDistincted'}">checked</c:if>
<input type="radio" name="SearchBy" value="patientRegistedDistincted"
id="SearchBy_Distincted" <c:if test="${radiostatus == 'patientRegistedDistincted'}">checked</c:if>
onclick="javascript:this.form.action='<%= request.getContextPath()%>/report/DxresearchReport.do?method=patientRegistedDistincted'">
ALL(distincted)</label>
<label class="radio">
<input type="radio" name="SearchBy" value="radio"
id="SearchBy_1" <c:if test="${radiostatus == 'patientRegistedAll'}">checked</c:if>
<input type="radio" name="SearchBy" value="patientRegistedAll"
id="SearchBy_All" <c:if test="${radiostatus == 'patientRegistedAll'}">checked</c:if>
onclick="javascript:this.form.action='<%= request.getContextPath()%>/report/DxresearchReport.do?method=patientRegistedAll'">
ALL</label>
<label class="radio">
<input type="radio" name="SearchBy" value="radio"
id="SearchBy_0" <c:if test="${radiostatus == 'patientRegistedActive'}">checked</c:if>
<input type="radio" name="SearchBy" value="patientRegistedActive"
id="SearchBy_Active" <c:if test="${radiostatus == 'patientRegistedActive'}">checked</c:if>
onclick="javascript:this.form.action='<%= request.getContextPath()%>/report/DxresearchReport.do?method=patientRegistedActive'">
Active</label>
<label class="radio">
<input type="radio" name="SearchBy" value="radio"
id="SearchBy_0" <c:if test="${radiostatus == 'patientRegistedDeleted'}">checked</c:if>
<input type="radio" name="SearchBy" value="patientRegistedDeleted"
id="SearchBy_Deleted" <c:if test="${radiostatus == 'patientRegistedDeleted'}">checked</c:if>
onclick="javascript:this.form.action='<%= request.getContextPath()%>/report/DxresearchReport.do?method=patientRegistedDeleted'">
Deleted</label>
<label class="radio">
<input type="radio" name="SearchBy" value="radio"
id="SearchBy_1" <c:if test="${radiostatus == 'patientRegistedResolve'}">checked</c:if>
<input type="radio" name="SearchBy" value="patientRegistedResolve"
id="SearchBy_Resolved" <c:if test="${radiostatus == 'patientRegistedResolve'}">checked</c:if>
onclick="javascript:this.form.action='<%= request.getContextPath()%>/report/DxresearchReport.do?method=patientRegistedResolve'">
Resolved</label>

Expand Down Expand Up @@ -255,7 +262,7 @@
</select>


<nested:submit styleClass="btn btn-primary">Search</nested:submit>
<input type="submit" class="btn btn-primary" value="Search" />
</div>

<h3>Results</h3>
Expand All @@ -281,7 +288,7 @@
onclick="javascript:this.form.action='${pageContext.servletContext.contextPath}/report/DxresearchReport.do?method=patientExcelReport';this.form.submit()">
</c:if>

</nested:form>
</form>
</div>
</body>
</html>
22 changes: 14 additions & 8 deletions src/main/webapp/oscarResearch/oscarDxResearch/dxResearch.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@
boolean disable;
SecurityManager sm = new SecurityManager();

// Check to see if the currently logged in role has write access, if so, disable input fields present in the page
if (sm.hasWriteAccess("_dx.code", roleName$)) {
disable = false;
} else {
disable = true;
}

// Set a String based on the "disable" boolean for easy access to use html functionality of "disabled" attribute
String disabled = disable ? "disabled" : "";

boolean showQuicklist = false;

if (sm.hasWriteAccess("_dx.quicklist", roleName$)) {
Expand All @@ -65,6 +70,7 @@

pageContext.setAttribute("showQuicklist", showQuicklist);
pageContext.setAttribute("disable", disable);
pageContext.setAttribute("disabled", disabled);
%>

<!DOCTYPE html>
Expand Down Expand Up @@ -234,7 +240,7 @@
</span>

<select class="form-control" name="selectedCodingSystem"
disabled="<%=disable%>">
<%=disabled%>>
<c:forEach var="codingSys" items="${codingSystem.codingSystems}">
<option value="${codingSys}">
<c:out value="${codingSys}"/>
Expand All @@ -246,27 +252,27 @@
</tr>
<tr>
<td><input type="text" class="form-control" name="xml_research1"
disabled="<%=disable%>"/>
<%=disabled%> />
<input type="hidden" name="demographicNo"
value="<c:out value="${demographicNo}"/>">
<input type="hidden" name="providerNo"
value="<c:out value="${providerNo}"/>"></td>
</tr>
<tr>
<td><input type="text" class="form-control" name="xml_research2"
disabled="<%=disable%>"/></td>
<%=disabled%>/></td>
</tr>
<tr>
<td><input type="text" class="form-control" name="xml_research3"
disabled="<%=disable%>"/></td>
<%=disabled%>/></td>
</tr>
<tr>
<td><input type="text" class="form-control" name="xml_research4"
disabled="<%=disable%>"/></td>
<%=disabled%>/></td>
</tr>
<tr>
<td><input type="text" class="form-control" name="xml_research5"
disabled="<%=disable%>"/></td>
<%=disabled%>/></td>
</tr>
<tr>
<td>
Expand All @@ -285,11 +291,11 @@
<input type="button" name="button" class="btn btn-primary"
value="<fmt:setBundle basename="oscarResources"/><fmt:message key="oscarResearch.oscarDxResearch.btnCodeSearch"/>"
onClick="javascript: ResearchScriptAttach();" )
disabled="<%=disable%>">
<%=disabled%>">

<input type="button" name="button" class="btn btn-primary"
value="<fmt:setBundle basename="oscarResources"/><fmt:message key="ADD"/>"
onClick="javascript: submitform('','');" disabled="<%=disable%>">
onClick="javascript: submitform('','');" <%=disabled%>">
<% } %>
</td>
</tr>
Expand Down
Loading