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
Commits
e8add254
Commit
e8add254
authored
4 years ago
by
xuechen5
Committed by
adityab3
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
GUI: add information box to show user MID and password after registration
parent
99aba574
No related branches found
No related tags found
1 merge request
!4
Uc91.2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/WebRoot/util/PreRegisterPatient.jsp
+188
-147
188 additions, 147 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
with
188 additions
and
147 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
+
188
−
147
View file @
e8add254
<%@taglib
prefix=
"itrust"
uri=
"/WEB-INF/tags.tld"
%>
<%@taglib
prefix=
"itrust"
uri=
"/WEB-INF/tags.tld"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
import=
"edu.ncsu.csc.itrust.action.AddPreRegisteredPatientAction"
%>
<%@page
import=
"edu.ncsu.csc.itrust.action.AddPreRegisteredPatientAction"
%>
<%@page
import=
"edu.ncsu.csc.itrust.BeanBuilder"
%>
<%@page
import=
"edu.ncsu.csc.itrust.BeanBuilder"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.PatientBean"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.PatientBean"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.forms.HealthRecordForm"
%>
<%@page
import=
"edu.ncsu.csc.itrust.exception.FormValidationException"
%>
<%@page
import=
"edu.ncsu.csc.itrust.exception.FormValidationException"
%>
<%@include
file=
"/global.jsp"
%>
<%@include
file=
"/global.jsp"
%>
<%
<%
pageTitle
=
"iTrust - Add Patient"
;
pageTitle
=
"iTrust - PreRegister Patient"
;
%>
%>
<%@include
file=
"/header.jsp"
%>
<%@include
file=
"/header.jsp"
%>
<%
<%
boolean
formIsFilled
=
request
.
getParameter
(
"formIsFilled"
)
!=
null
&&
request
.
getParameter
(
"formIsFilled"
).
equals
(
"true"
);
boolean
formIsFilled
=
request
.
getParameter
(
"formIsFilled"
)
!=
null
&&
request
.
getParameter
(
"formIsFilled"
).
equals
(
"true"
);
if
(
formIsFilled
)
{
if
(
formIsFilled
)
{
PatientBean
p
=
new
BeanBuilder
<
PatientBean
>
().
build
(
request
.
getParameterMap
(),
new
PatientBean
());
//This page is not actually a "page", it just adds a user and forwards.
HealthRecordForm
h
=
new
BeanBuilder
<
HealthRecordForm
>
().
build
(
request
.
getParameterMap
(),
new
HealthRecordForm
());
long
mid
=
new
PreRegisterPatientAction
(
prodDAO
).
addPatient
(
p
);
PatientBean
p
=
new
BeanBuilder
<
PatientBean
>
().
build
(
request
.
getParameterMap
(),
new
PatientBean
());
String
name
=
"
<
Name
>"
;
try
{
if
(
p
!=
null
)
{
long
newMID
=
021700
L
;
name
=
p
.
getFullName
();
}
newMID
=
new
AddPreRegisteredPatientAction
(
DAOFactory
.
getProductionInstance
(),
newMID
).
addPatient
(
p
);
%>
<div><%=
s
%></div>
session
.
setAttribute
(
"pid"
,
Long
.
toString
(
newMID
));
<%
String
fullname
;
String
password
;
}
password
=
p
.
getPassword
();
%>
fullname
=
p
.
getFullName
();
<div
align=
center
>
loggingAction
.
logEvent
(
TransactionType
.
PATIENT_CREATE
,
newMID
,
newMID
,
""
);
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
%>
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<br
/>
<div
align=
center
>
<div
style=
"width: 50%; text-align:left;"
>
Please enter in the name of the Pre-registered
<span
class=
"iTrustMessage"
>
New Pre-registered Prepatient
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%>
successfully added!
</span>
patient, with a valid email address. If the user does not have an email
<br
/><br
/>
address, use the hospital's email address, [insert pre-defined email],
<table
class=
"fTable"
>
to recover the password.
</div>
<tr>
<br
/>
<th
colspan=
2
>
New Pre-registered Patient Information
</th>
<br
/>
</tr>
<table
class=
"fTable"
>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
MID:
</td>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
newMID
))
%></td>
</tr>
<td></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<tr>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
<td
class=
"subHeaderVertical"
>
Temporary Password:
</td>
</tr>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
password
))
%></td>
<tr>
<td></td>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
</tr>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
</table>
</tr>
<br
/>
Please get this information to
<b><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%></b>
!
<tr>
<td
class=
"subHeaderVertical"
>
Email:
</td>
</div>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
</tr>
<%
<tr>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<td><input
type=
"password"
name=
"password"
required
>
*
</td>
}
catch
(
FormValidationException
e
){
</tr>
%>
<tr>
<div
align=
center
>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<span
class=
"iTrustError"
>
<%=
StringEscapeUtils
.
escapeHtml
(
e
.
getMessage
())
%></span>
<td><input
type=
"password"
name=
"verifyPassword"
required
>
*
</td>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</tr>
</div>
<tr>
<%
<td
class=
"subHeaderVertical"
>
Address:
</td>
}
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
}
<input
name=
"streetAddress2"
type=
"text"
></td>
%>
</tr>
<tr>
<div
align=
center
>
<td
class=
"subHeaderVertical"
>
City:
</td>
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
<!-- Which page DIRECT to -->
<td>
<input
name=
"city"
type=
"text"
></td>
</tr>
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<tr>
<br
/>
<td
class=
"subHeaderVertical"
>
State:
</td>
<div
style=
"width: 50%; text-align:left;"
>
Please enter in the name of the Pre-registered
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
patient, with a valid email address. If the user does not have an email
</tr>
address, use the hospital's email address, [insert pre-defined email],
<tr>
to recover the password.
</div>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<br
/>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
<br
/>
</tr>
<table
class=
"fTable"
>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<td
class=
"subHeaderVertical"
>
Height:
</td>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
<td><input
type=
"text"
name=
"height"
value=
"0"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
<td><input
type=
"text"
name=
"weight"
value=
"0"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Email:
</td>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
</tr>
<label
for=
"smoker_yes"
>
Yes
</label>
<tr>
<br>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
<td><input
type=
"password"
name=
"password"
required
>
*
</td>
<label
for=
"smoker_no"
>
No
</label><br></td>
</tr>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<br/>
<td><input
type=
"password"
name=
"verifyPassword"
required
>
*
</td>
<tr>
</tr>
<th
colspan=
2
style=
"text-align:center"
>
Insurance Information
</th>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
Address:
</td>
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
<tr>
<input
name=
"streetAddress2"
type=
"text"
></td>
<td
class=
"subHeaderVertical"
>
Insurance Provider Name:
</td>
</tr>
<td>
<input
type=
"text"
name=
"icName"
></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<tr>
<td>
<input
name=
"city"
type=
"text"
></td>
<td
class=
"subHeaderVertical"
>
Insurance Provider Address:
</td>
</tr>
<td><input
name=
"icAddress1"
type=
"text"
><br
/>
<tr>
<input
name=
"icAddress2"
type=
"text"
></td>
<td
class=
"subHeaderVertical"
>
State:
</td>
</tr>
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<tr>
<td>
<input
name=
"icCity"
type=
"text"
></td>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
</tr>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<tr>
<td><itrust:state
name=
"icState"
value=
"AK"
/></td>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
</tr>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<tr>
<td>
<input
type=
"text"
name=
"icZip"
maxlength=
"10"
size=
"10"
></td>
<td
class=
"subHeaderVertical"
>
Height:
</td>
</tr>
<td><input
type=
"text"
name=
"height"
></td>
<tr>
</tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Phone:
</td>
<tr>
<td><input
type=
"text"
name=
"icPhone"
></td>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
</tr>
<td><input
type=
"text"
name=
"weight"
></td>
</table>
</tr>
<tr>
<br
/>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
<input
type=
"submit"
style=
"font-size: 16pt; font-weight: bold;"
value=
"Patient Pre-Register"
>
<label
for=
"smoker_yes"
>
Yes
</label>
</form>
<br>
<br
/>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
</div>
<label
for=
"smoker_no"
>
No
</label><br>
<%@include
file=
"/footer.jsp"
%>
</td>
</tr>
<br/>
<tr>
<th
colspan=
2
style=
"text-align:center"
>
Insurance Information
</th>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Name:
</td>
<td>
<input
type=
"text"
name=
"icName"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Address:
</td>
<td><input
name=
"icAddress1"
type=
"text"
><br
/>
<input
name=
"icAddress2"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td>
<input
name=
"icCity"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td><itrust:state
name=
"icState"
value=
"AK"
/></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td>
<input
type=
"text"
name=
"icZip"
maxlength=
"10"
size=
"10"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Phone:
</td>
<td><input
type=
"text"
name=
"icPhone"
></td>
</tr>
</table>
<br
/>
<input
type=
"submit"
style=
"font-size: 16pt; font-weight: bold;"
value=
"Patient Pre-Register"
>
</form>
<br
/>
</div>
<%@include
file=
"/footer.jsp"
%>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment