|| (req.getParameter("complaint").length() == 0)) {
redirect(res, blobKey);
return;
}
else {
comments.add(new Comment(req.getParameter("complaint"), user, "Complaint"));
}
// Makes sure there is a value in reason.
if ((req.getParameter("reason") == null)
|| (req.getParameter("reason").length() == 0)) {
redirect(res, blobKey);
return;
}
else {
comments.add(new Comment(req.getParameter("reason"), user, "Reason"));
}
String rInterp = req.getParameter("resInterp");
String aInterp = req.getParameter("attendInterp");
// Tests to make sure that there is an entry in the Resident or
// Attending physician's interpretation textarea.
if (((aInterp == null) || (aInterp.length() == 0))
&& ((rInterp == null) || (rInterp.length() == 0))) {
redirect(res, blobKey);
return;
}
else if ((aInterp == null) || (aInterp.length() == 0)) {
aInterp = "No Attending Physician interpretation.";
}
else if ((rInterp == null) || (rInterp.length() == 0)) {
rInterp = "No Resident Physician interpretation.";
}
comments.add(new Comment(rInterp, user, "Attending Physician interpretation."));
comments.add(new Comment(aInterp, user, "Resident Physician interpretation."));
DataEntry data = new DataEntry(comments, patient, user, blobKey, null);
UploadEntry(data);
res.sendRedirect("/viewrecord?entry=" + data.getKey());
}