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
18bf2964
Commit
18bf2964
authored
4 years ago
by
xuechen5
Browse files
Options
Downloads
Patches
Plain Diff
Added Password Confirmation Verification
parent
b91391e6
No related branches found
No related tags found
1 merge request
!6
Uc91v2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/WebRoot/util/PreRegisterPatient.jsp
+157
-143
157 additions, 143 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
with
157 additions
and
143 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
+
157
−
143
View file @
18bf2964
...
@@ -19,64 +19,76 @@ pageTitle = "iTrust - PreRegister Patient";
...
@@ -19,64 +19,76 @@ pageTitle = "iTrust - PreRegister Patient";
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
)
{
//This page is not actually a "page", it just adds a user and forwards.
//This page is not actually a "page", it just adds a user and forwards.
PatientBean
p
=
new
BeanBuilder
<
PatientBean
>
().
build
(
request
.
getParameterMap
(),
new
PatientBean
());
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
>
String
pwd
=
request
.
getParameter
(
"password"
);
<span
class=
"iTrustMessage"
>
New Pre-registered Prepatient
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%>
successfully added!
</span>
String
VerifyPwd
=
request
.
getParameter
(
"verifyPassword"
);
<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>
<%
if
(
pwd
.
equals
(
VerifyPwd
)){
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
,
""
);
%>
}
catch
(
FormValidationException
e
){
<div
align=
center
>
%>
<span
class=
"iTrustMessage"
>
New Pre-registered Prepatient
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%>
successfully added!
</span>
<div
align=
center
>
<br
/><br
/>
<span
class=
"iTrustError"
>
<%=
StringEscapeUtils
.
escapeHtml
(
e
.
getMessage
())
%></span>
<table
class=
"fTable"
>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
<tr>
</div>
<th
colspan=
2
>
New Pre-registered Patient Information
</th>
<%
</tr>
}
catch
(
ITrustException
e
)
{
<tr>
%>
<td
class=
"subHeaderVertical"
>
MID:
</td>
<div
align=
center
>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
newMID
))
%></td>
<span
class=
"iTrustError"
>
<%=
StringEscapeUtils
.
escapeHtml
(
e
.
getMessage
())
%></span>
<td></td>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</tr>
</div>
<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>
<%
}
}
else
{
%>
<script
type=
"text/javascript"
>
alert
(
"
Passwords do not match! Pre-Registration Not Successed!
"
);
document
.
getElementById
(
'
submit_preregister
'
).
disabled
=
true
;
</script>
<%
}
}
}
}
%>
%>
...
@@ -84,7 +96,7 @@ if (formIsFilled) {
...
@@ -84,7 +96,7 @@ if (formIsFilled) {
<div
align=
center
>
<div
align=
center
>
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
<!-- Which page DIRECT to -->
<form
action=
"PreRegisterPatient.jsp"
method=
"post"
>
<!-- Which page DIRECT to -->
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<input
type=
"hidden"
name=
"formIsFilled"
value=
"true"
>
<br
/>
<br
/>
<br
/>
<div
style=
"width: 50%; text-align:left;"
>
Please enter in the name of the Pre-registered
<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
patient, with a valid email address. If the user does not have an email
...
@@ -93,98 +105,98 @@ to recover the password.</div>
...
@@ -93,98 +105,98 @@ to recover the password.</div>
<br
/>
<br
/>
<br
/>
<br
/>
<table
class=
"fTable"
>
<table
class=
"fTable"
>
<tr>
<tr>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
<th
colspan=
2
style=
"text-align:center"
>
Pre-registered Patient Information
</th>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<td
class=
"subHeaderVertical"
>
First name:
</td>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
<td><input
type=
"text"
name=
"firstName"
required
>
*
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
<td
class=
"subHeaderVertical"
>
Last Name:
</td>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
<td><input
type=
"text"
name=
"lastName"
required
>
*
</td>
>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Email:
</td>
<td
class=
"subHeaderVertical"
>
Email:
</td>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
<td><input
type=
"text"
name=
"email"
required
>
*
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<td
class=
"subHeaderVertical"
>
Password:
</td>
<td><input
type=
"password"
name=
"password"
required
>
*
</td>
<td><input
type=
"password"
name=
"password"
id =
"password"
required
>
*
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<td
class=
"subHeaderVertical"
>
Verify Password:
</td>
<td><input
type=
"password"
name=
"verifyPassword"
required
>
*
</td>
<td><input
type=
"password"
name=
"verifyPassword"
id =
"verifyPassword"
required
>
*
</td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Address:
</td>
<td
class=
"subHeaderVertical"
>
Address:
</td>
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
<td>
<input
name=
"streetAddress1"
type=
"text"
><br
/>
<input
name=
"streetAddress2"
type=
"text"
></td>
<input
name=
"streetAddress2"
type=
"text"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td>
<input
name=
"city"
type=
"text"
></td>
<td>
<input
name=
"city"
type=
"text"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
<td><itrust:state
name=
"state"
value=
"AK"
/></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
<td>
<input
type=
"text"
name=
"zip"
maxlength=
"10"
size=
"10"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
<td
class=
"subHeaderVertical"
>
Phone:
</td>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
<td>
<input
type=
"text"
name=
"phone"
size=
"12"
maxlength=
"12"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Height:
</td>
<td
class=
"subHeaderVertical"
>
Height:
</td>
<td><input
type=
"text"
name=
"height"
></td>
<td><input
type=
"text"
name=
"height"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td><input
type=
"text"
name=
"weight"
></td>
<td><input
type=
"text"
name=
"weight"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td
class=
"subHeaderVertical"
>
Smoker:
</td>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
<td><input
type=
"radio"
id=
"smoker_yes"
name=
"isSmoker"
value=
"true"
>
<label
for=
"smoker_yes"
>
Yes
</label>
<label
for=
"smoker_yes"
>
Yes
</label>
<br>
<br>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
<input
type=
"radio"
id=
"smoker_no"
name=
"isSmoker"
value=
"false"
>
<label
for=
"smoker_no"
>
No
</label><br>
<label
for=
"smoker_no"
>
No
</label><br>
</td>
</td>
</tr>
</tr>
<br/>
<br/>
<tr>
<tr>
<th
colspan=
2
style=
"text-align:center"
>
Insurance Information
</th>
<th
colspan=
2
style=
"text-align:center"
>
Insurance Information
</th>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Name:
</td>
<td
class=
"subHeaderVertical"
>
Insurance Provider Name:
</td>
<td>
<input
type=
"text"
name=
"icName"
></td>
<td>
<input
type=
"text"
name=
"icName"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Address:
</td>
<td
class=
"subHeaderVertical"
>
Insurance Provider Address:
</td>
<td><input
name=
"icAddress1"
type=
"text"
><br
/>
<td><input
name=
"icAddress1"
type=
"text"
><br
/>
<input
name=
"icAddress2"
type=
"text"
></td>
<input
name=
"icAddress2"
type=
"text"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td
class=
"subHeaderVertical"
>
City:
</td>
<td>
<input
name=
"icCity"
type=
"text"
></td>
<td>
<input
name=
"icCity"
type=
"text"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td
class=
"subHeaderVertical"
>
State:
</td>
<td><itrust:state
name=
"icState"
value=
"AK"
/></td>
<td><itrust:state
name=
"icState"
value=
"AK"
/></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td
class=
"subHeaderVertical"
>
Zip:
</td>
<td>
<input
type=
"text"
name=
"icZip"
maxlength=
"10"
size=
"10"
></td>
<td>
<input
type=
"text"
name=
"icZip"
maxlength=
"10"
size=
"10"
></td>
</tr>
</tr>
<tr>
<tr>
<td
class=
"subHeaderVertical"
>
Insurance Provider Phone:
</td>
<td
class=
"subHeaderVertical"
>
Insurance Provider Phone:
</td>
<td><input
type=
"text"
name=
"icPhone"
></td>
<td><input
type=
"text"
name=
"icPhone"
></td>
</tr>
</tr>
</table>
</table>
<br
/>
<br
/>
...
@@ -193,4 +205,6 @@ to recover the password.</div>
...
@@ -193,4 +205,6 @@ to recover the password.</div>
</form>
</form>
<br
/>
<br
/>
</div>
</div>
<%@include
file=
"/footer.jsp"
%>
<%@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