[507] | 1 | <%--
|
---|
| 2 | Document : index
|
---|
| 3 | Created on : Mar 16, 2009, 9:50:33 AM
|
---|
| 4 | Author : svalluripalli
|
---|
| 5 | --%>
|
---|
| 6 |
|
---|
| 7 | <%@ page import="java.util.*" %>
|
---|
| 8 | <%@ page import="gov.hhs.fha.nhinc.mpilib.*" %>
|
---|
| 9 | <%@ page import="gov.hhs.fha.nhinc.properties.*" %>
|
---|
| 10 |
|
---|
| 11 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
|
---|
| 12 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
---|
| 13 | "http://www.w3.org/TR/html4/loose.dtd">
|
---|
| 14 | <%
|
---|
| 15 |
|
---|
| 16 | String orgId = PropertyAccessor.getProperty("gateway", "localHomeCommunityId");
|
---|
| 17 |
|
---|
| 18 | %>
|
---|
| 19 | <html>
|
---|
| 20 | <head>
|
---|
| 21 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
---|
| 22 | <title>Opt In/Out Utility</title>
|
---|
| 23 | </head>
|
---|
| 24 | <body>
|
---|
| 25 | <h2>Opt In/Opt Out Utility for <% out.println(orgId);%></h2>
|
---|
| 26 | <form method="POST" action="update.jsp">
|
---|
| 27 | <table>
|
---|
| 28 | <tr>
|
---|
| 29 | <td>Last Name</td>
|
---|
| 30 | <td>First Name</td>
|
---|
| 31 | <td>Organization Id:</td>
|
---|
| 32 | <td>Patient Id:</td>
|
---|
| 33 | <td>Opt In:</td>
|
---|
| 34 | </tr>
|
---|
| 35 | <%
|
---|
| 36 |
|
---|
| 37 | Patients pats = new Patients();
|
---|
| 38 |
|
---|
| 39 | MiniMpi mpi = MiniMpi.GetMpiInstance();
|
---|
| 40 | pats = mpi.getPatients();
|
---|
| 41 |
|
---|
| 42 | session.setAttribute( "patCount", pats.size() );
|
---|
| 43 | session.setAttribute("pats", pats);
|
---|
| 44 |
|
---|
| 45 | for (int x = 0; x<pats.size();x++)
|
---|
| 46 | {
|
---|
| 47 | Patient pat = pats.get(x);
|
---|
| 48 | PersonName name = pat.getName();
|
---|
| 49 | //Identifier id = pat.getIdentifiers().get(0);
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | out.println( "<tr> " );
|
---|
| 53 | out.println("<td>" + name.getLastName() + "</td>");
|
---|
| 54 | out.println("<td>" + name.getFirstName() + "</td>");
|
---|
| 55 |
|
---|
| 56 | Identifiers newIds = new Identifiers();
|
---|
| 57 |
|
---|
| 58 | for (Identifier id : pat.getIdentifiers())
|
---|
| 59 | {
|
---|
| 60 | if (id.getOrganizationId().equals(orgId))
|
---|
| 61 | {
|
---|
| 62 | out.println("<td>" + id.getOrganizationId() + "</td>");
|
---|
| 63 | out.println("<td>" + id.getId() + "</td>");
|
---|
| 64 | newIds.add(id);
|
---|
| 65 | }
|
---|
| 66 | }
|
---|
| 67 | pat.setIdentifiers(newIds);
|
---|
| 68 |
|
---|
| 69 | String checked = "";
|
---|
| 70 | if(pat.isOptedIn())
|
---|
| 71 | {
|
---|
| 72 | checked="checked";
|
---|
| 73 | }
|
---|
| 74 | out.println("<td><input type='checkbox' name='chk_" + x + "' " + checked +"/></td>");
|
---|
| 75 | out.println( "</tr> " );
|
---|
| 76 |
|
---|
| 77 | }
|
---|
| 78 | %>
|
---|
| 79 | </table>
|
---|
| 80 |
|
---|
| 81 | <button name="submit" type="submit" value="submit">Update</button>
|
---|
| 82 | </form>
|
---|
| 83 | </body>
|
---|
| 84 | </html>
|
---|