Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs427fa20team22
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
htmoss2
cs427fa20team22
Merge requests
!7
Uc20
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Uc20
UC20
into
master
Overview
5
Commits
34
Pipelines
0
Changes
22
2 unresolved threads
Hide all comments
Merged
sbobo3
requested to merge
UC20
into
master
4 years ago
Overview
5
Commits
34
Pipelines
0
Changes
22
2 unresolved threads
Hide all comments
Expand
This merge request contains all of the deliverables for UC20, including:
UI changes (search parameters, proper error messages, and search results table)
DAO class to initiate queries to database, and bean class to store results from query
Unit tests
Selenium tests
0
0
Merge request reports
Compare
master
version 3
a5cf08d1
4 years ago
version 2
a7e6b88e
4 years ago
version 1
c44cdd02
4 years ago
master (base)
and
latest version
latest version
668b23fd
34 commits,
4 years ago
version 3
a5cf08d1
33 commits,
4 years ago
version 2
a7e6b88e
32 commits,
4 years ago
version 1
c44cdd02
31 commits,
4 years ago
22 files
+
1179
−
5
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
22
Search (e.g. *.vue) (Ctrl+P)
iTrust/WebRoot/auth/hcp/causeOfDeathTrendsReport.jsp
0 → 100644
+
183
−
0
Options
<%@taglib
uri=
"/WEB-INF/tags.tld"
prefix=
"itrust"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
import=
"edu.ncsu.csc.itrust.dao.mysql.CauseOfDeathTrendsReportDAO"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.CauseOfDeathTrendsReportBean"
%>
<%@page
import=
"java.util.List"
%>
<%@page
import=
"java.util.ArrayList"
%>
<%@page
import=
"java.util.Iterator"
%>
<%@page
import=
"edu.ncsu.csc.itrust.exception.FormValidationException"
%>
<%@include
file=
"/global.jsp"
%>
<%
pageTitle
=
"iTrust - View Cause-Of-Death Trends Report"
;
String
view
=
request
.
getParameter
(
"viewSelect"
);
%>
<%@include
file=
"/header.jsp"
%>
<%
//log the page view
loggingAction
.
logEvent
(
TransactionType
.
DEATH_TRENDS_VIEW
,
loggedInMID
.
longValue
(),
0
,
"View cause-of-death trends report"
);
CauseOfDeathTrendsReportDAO
report
=
new
CauseOfDeathTrendsReportDAO
(
prodDAO
);
List
<
CauseOfDeathTrendsReportBean
>
allDeaths
=
null
;
//get form data
long
mid
=
Long
.
valueOf
(
request
.
getUserPrincipal
().
getName
());
String
startDate
=
request
.
getParameter
(
"startDate"
);
String
endDate
=
request
.
getParameter
(
"endDate"
);
String
gender
=
request
.
getParameter
(
"gender"
);
String
patients
=
request
.
getParameter
(
"patients"
);
if
(
patients
==
null
)
patients
=
""
;
//try to get the report. If there's an error, print it. If null is returned, it's the first page load
if
(
patients
.
equalsIgnoreCase
(
"My Patients"
))
{
try
{
allDeaths
=
report
.
getTopTwoDeathsForHCP
(
mid
,
gender
,
startDate
,
endDate
);
}
catch
(
FormValidationException
e
){
e
.
printHTML
(
pageContext
.
getOut
());
}
}
if
(
patients
.
equalsIgnoreCase
(
"All Patients"
)
||
patients
.
equalsIgnoreCase
(
""
))
{
try
{
allDeaths
=
report
.
getTopTwoDeathsForAll
(
gender
,
startDate
,
endDate
);
}
catch
(
FormValidationException
e
){
e
.
printHTML
(
pageContext
.
getOut
());
}
}
if
(
gender
==
null
)
gender
=
""
;
if
(
startDate
==
null
)
startDate
=
""
;
if
(
endDate
==
null
)
endDate
=
""
;
%>
<br
/>
<form
action=
"causeOfDeathTrendsReport.jsp"
method=
"post"
id=
"formMain"
>
<input
type=
"hidden"
name=
"viewSelect"
/>
<table
class=
"fTable"
align=
"center"
id=
"causeOfDeathTrendsReportTable"
>
<tr>
<th
colspan=
"4"
>
Cause of Death Trends Report
</th>
</tr>
<tr
class=
"subHeader"
>
<td>
Patients:
</td>
<td>
<select
name=
"patients"
style=
"font-size:10"
>
<%
if
(
patients
!=
null
&&
!
patients
.
equalsIgnoreCase
(
""
))
{
if
(
patients
.
equalsIgnoreCase
(
"All Patients"
))
{
%>
<option
selected=
"selected"
value=
"All Patients"
>
All Patients
</option>
<option
value=
"My Patients"
>
My Patients
</option>
<%
}
else
if
(
patients
.
equalsIgnoreCase
(
"My Patients"
))
{
%>
<option
value=
"All Patients"
>
All Patients
</option>
<option
selected=
"selected"
value=
"My Patients"
>
My Patients
</option>
<%
}
}
else
{
%>
<option
value=
"All Patients"
>
All Patients
</option>
<option
value=
"My Patients"
>
My Patients
</option>
</select>
<%
}
%>
</td>
<td>
Gender:
</td>
<td>
<select
name=
"gender"
style=
"font-size:10"
>
<%
if
(
gender
!=
null
&&
!
gender
.
equalsIgnoreCase
(
""
))
{
if
(
gender
.
equalsIgnoreCase
(
"All"
))
{
%>
<option
selected=
"selected"
value=
"All"
>
All
</option>
<option
value=
"Male"
>
Male
</option>
<option
value=
"Female"
>
Female
</option>
<%
}
else
if
(
gender
.
equalsIgnoreCase
(
"Male"
)){
%>
<option
value=
"All"
>
All
</option>
<option
selected=
"selected"
value=
"Male"
>
Male
</option>
<option
value=
"Female"
>
Female
</option>
<%
}
else
if
(
gender
.
equalsIgnoreCase
(
"Female"
)){
%>
<option
value=
"All"
>
All
</option>
<option
value=
"Male"
>
Male
</option>
<option
selected=
"selected"
value=
"Female"
>
Female
</option>
<%
}
}
else
{
%>
<option
value=
"All"
>
All
</option>
<option
value=
"Male"
>
Male
</option>
<option
value=
"Female"
>
Female
</option>
</select>
<%
}
%>
</td>
</tr>
<tr
class=
"subHeader"
>
<td>
Start Date:
</td>
<td>
<input
name=
"startDate"
value=
"
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
startDate
))
%>
"
size=
"10"
>
<input
type=
button
value=
"Select Date"
onclick=
"displayDatePicker('startDate');"
>
</td>
<td>
End Date:
</td>
<td>
<input
name=
"endDate"
value=
"
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
endDate
))
%>
"
size=
"10"
>
<input
type=
button
value=
"Select Date"
onclick=
"displayDatePicker('endDate');"
>
</td>
</tr>
<tr>
<td
colspan=
"4"
style=
"text-align: center;"
><input
type=
"submit"
id=
"view_report"
value=
"View Report"
></td>
</tr>
</table>
</form>
<br
/>
<%
if
(
allDeaths
!=
null
)
{
%>
<table
class=
"fTable"
align=
"center"
id=
"causeOfDeathTrendsTable"
>
<tr>
<th>
ICD-9CM Name
</th>
<th>
ICD-9CM Code
</th>
<th>
Quantity of Deaths
</th>
</tr>
<%
Iterator
<
CauseOfDeathTrendsReportBean
>
iterator
=
allDeaths
.
iterator
();
while
(
iterator
.
hasNext
())
{
CauseOfDeathTrendsReportBean
reports
=
iterator
.
next
();
%>
<tr
style=
"text-align:center;"
>
<td><%=
reports
.
getCause
()
%></td>
<td><%=
reports
.
getCode
()
%></td>
<td><%=
reports
.
getDeaths
()
%></td>
</tr>
<%
}
%>
</table>
<%
}
%>
<br
/>
<%@include
file=
"/footer.jsp"
%>
\ No newline at end of file
Loading