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
Branches containing commit
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"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
import=
"edu.ncsu.csc.itrust.action.AddPreRegisteredPatientAction"
%>
<%@page
import=
"edu.ncsu.csc.itrust.BeanBuilder"
%>
<%@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"
%>
<%@include
file=
"/global.jsp"
%>
<%
pageTitle
=
"iTrust - Add Patient"
;
%>
<%@include
file=
"/header.jsp"
%>
<%
boolean
formIsFilled
=
request
.
getParameter
(
"formIsFilled"
)
!=
null
&&
request
.
getParameter
(
"formIsFilled"
).
equals
(
"true"
);
if
(
formIsFilled
)
{
PatientBean
p
=
new
BeanBuilder
<
PatientBean
>
().
build
(
request
.
getParameterMap
(),
new
PatientBean
());
HealthRecordForm
h
=
new
BeanBuilder
<
HealthRecordForm
>
().
build
(
request
.
getParameterMap
(),
new
HealthRecordForm
());
long
mid
=
new
PreRegisterPatientAction
(
prodDAO
).
addPatient
(
p
);
String
name
=
"
<
Name
>"
;
if
(
p
!=
null
)
{
name
=
p
.
getFullName
();
}
%>
<div><%=
s
%></div>
<%
}
%>
<div
align=
center
>
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<br
/>
<div
style=
"width: 50%; text-align:left;"
>
Please enter in the name of the Pre-registered
patient, with a valid email address. If the user does not have an email
address, use the hospital's email address, [insert pre-defined email],
to recover the password.
</div>
<br
/>
<br
/>
<table
class=
"fTable"
>
<tr>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Email:
</td>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<td><input
type=
"password"
name=
"password"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<td><input
type=
"password"
name=
"verifyPassword"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Address:
</td>
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
<input
name=
"streetAddress2"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td>
<input
name=
"city"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Height:
</td>
<td><input
type=
"text"
name=
"height"
value=
"0"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td><input
type=
"text"
name=
"weight"
value=
"0"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
<label
for=
"smoker_yes"
>
Yes
</label>
<br>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
<label
for=
"smoker_no"
>
No
</label><br></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"
%>
<%@taglib
prefix=
"itrust"
uri=
"/WEB-INF/tags.tld"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
import=
"edu.ncsu.csc.itrust.action.AddPreRegisteredPatientAction"
%>
<%@page
import=
"edu.ncsu.csc.itrust.BeanBuilder"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.PatientBean"
%>
<%@page
import=
"edu.ncsu.csc.itrust.exception.FormValidationException"
%>
<%@include
file=
"/global.jsp"
%>
<%
pageTitle
=
"iTrust - PreRegister Patient"
;
%>
<%@include
file=
"/header.jsp"
%>
<%
boolean
formIsFilled
=
request
.
getParameter
(
"formIsFilled"
)
!=
null
&&
request
.
getParameter
(
"formIsFilled"
).
equals
(
"true"
);
if
(
formIsFilled
)
{
//This page is not actually a "page", it just adds a user and forwards.
PatientBean
p
=
new
BeanBuilder
<
PatientBean
>
().
build
(
request
.
getParameterMap
(),
new
PatientBean
());
try
{
long
newMID
=
021700
L
;
newMID
=
new
AddPreRegisteredPatientAction
(
DAOFactory
.
getProductionInstance
(),
newMID
).
addPatient
(
p
);
session
.
setAttribute
(
"pid"
,
Long
.
toString
(
newMID
));
String
fullname
;
String
password
;
password
=
p
.
getPassword
();
fullname
=
p
.
getFullName
();
loggingAction
.
logEvent
(
TransactionType
.
PATIENT_CREATE
,
newMID
,
newMID
,
""
);
%>
<div
align=
center
>
<span
class=
"iTrustMessage"
>
New Pre-registered Prepatient
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%>
successfully added!
</span>
<br
/><br
/>
<table
class=
"fTable"
>
<tr>
<th
colspan=
2
>
New Pre-registered Patient Information
</th>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
MID:
</td>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
newMID
))
%></td>
<td></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Temporary Password:
</td>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
password
))
%></td>
<td></td>
</tr>
</table>
<br
/>
Please get this information to
<b><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%></b>
!
</div>
<%
}
catch
(
FormValidationException
e
){
%>
<div
align=
center
>
<span
class=
"iTrustError"
>
<%=
StringEscapeUtils
.
escapeHtml
(
e
.
getMessage
())
%></span>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</div>
<%
}
}
%>
<div
align=
center
>
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
<!-- Which page DIRECT to -->
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<br
/>
<div
style=
"width: 50%; text-align:left;"
>
Please enter in the name of the Pre-registered
patient, with a valid email address. If the user does not have an email
address, use the hospital's email address, [insert pre-defined email],
to recover the password.
</div>
<br
/>
<br
/>
<table
class=
"fTable"
>
<tr>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Email:
</td>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<td><input
type=
"password"
name=
"password"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<td><input
type=
"password"
name=
"verifyPassword"
required
>
*
</td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Address:
</td>
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
<input
name=
"streetAddress2"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td>
<input
name=
"city"
type=
"text"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Height:
</td>
<td><input
type=
"text"
name=
"height"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td><input
type=
"text"
name=
"weight"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
<label
for=
"smoker_yes"
>
Yes
</label>
<br>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
<label
for=
"smoker_no"
>
No
</label><br>
</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