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
28871c87
Commit
28871c87
authored
4 years ago
by
adityab3
Browse files
Options
Downloads
Patches
Plain Diff
Copied addPatient.jsp and changed form
parent
8ddbfa7b
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Uc91.1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/WebRoot/util/PreRegisterPatient.jsp
+205
-0
205 additions, 0 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
with
205 additions
and
0 deletions
iTrust/WebRoot/util/PreRegisterPatient.jsp
0 → 100755
+
205
−
0
View file @
28871c87
<%@taglib
prefix=
"itrust"
uri=
"/WEB-INF/tags.tld"
%>
<%@page
errorPage=
"/auth/exceptionHandler.jsp"
%>
<%@page
import=
"edu.ncsu.csc.itrust.action.AddPatientAction"
%>
<%@page
import=
"edu.ncsu.csc.itrust.BeanBuilder"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.PatientBean"
%>
<%@page
import=
"edu.ncsu.csc.itrust.beans.HealthRecord"
%>
<%@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
());
//HealthRecord h = new BeanBuilder<HealthRecord
>
().
build
(
request
.
getParameterMap
(),
new
HealthRecord
());
//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
{
boolean
isDependent
=
false
;
long
representativeId
=
-
1L
;
if
(
request
.
getParameter
(
"isDependent"
)
!=
null
&&
request
.
getParameter
(
"isDependent"
).
equals
(
"on"
)){
isDependent
=
true
;
}
if
(
request
.
getParameter
(
"repId"
)
!=
""
&&
isDependent
){
representativeId
=
Long
.
valueOf
(
request
.
getParameter
(
"repId"
));
}
else
if
(
isDependent
&&
request
.
getParameter
(
"repId"
)
==
""
){
throw
new
FormValidationException
(
"Representative MID must be filled if the patient is marked as a dependent."
);
}
long
newMID
=
1L
;
if
(
isDependent
){
newMID
=
new
AddPatientAction
(
prodDAO
,
loggedInMID
.
longValue
()).
addDependentPatient
(
p
,
representativeId
);
}
else
{
newMID
=
new
AddPatientAction
(
prodDAO
,
loggedInMID
.
longValue
()).
addPatient
(
p
);
}
session
.
setAttribute
(
"pid"
,
Long
.
toString
(
newMID
));
String
fullname
;
String
password
;
password
=
p
.
getPassword
();
fullname
=
p
.
getFullName
();
if
(
isDependent
)
{
loggingAction
.
logEvent
(
TransactionType
.
HCP_CREATED_DEPENDENT_PATIENT
,
loggedInMID
.
longValue
(),
newMID
,
""
);
}
else
{
loggingAction
.
logEvent
(
TransactionType
.
PATIENT_CREATE
,
loggedInMID
.
longValue
(),
newMID
,
""
);
}
%>
<div
align=
center
>
<span
class=
"iTrustMessage"
>
New patient
<%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%>
successfully added!
</span>
<br
/>
<table
class=
"fTable"
>
<tr>
<th
colspan=
2
>
New Patient Information
</th>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
MID:
</td>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
newMID
))
%></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Temporary Password:
</td>
<td><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
password
))
%></td>
</tr>
</table>
<br
/>
Please get this information to
<b><%=
StringEscapeUtils
.
escapeHtml
(
""
+
(
fullname
))
%></b>
!
<p>
<a
href =
"/iTrust/auth/hcp-uap/editPatient.jsp"
>
Continue to patient information.
</a>
</p>
</div>
<%
}
catch
(
FormValidationException
e
){
%>
<div
align=
center
>
<span
class=
"iTrustError"
><%=
StringEscapeUtils
.
escapeHtml
(
e
.
getMessage
())
%></span>
</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=
"number"
name=
"height"
></td>
</tr>
<tr>
<td
class=
"subHeaderVertical"
>
Weight:
</td>
<td><input
type=
"number"
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