.WAF L ( l S @ IL8YQ@{Ԟ ntry (SMwBߍO5L8YQ@{Ԟ S url Bhttp://www.medg.lcs.mit.edu/courses/6872/hw/deadsource/pt.jsp.txt mime text/html hntt "38c0dd-c4d-4cee4cc0" hvrs data <%@ page import="edu.mit.lcs.*" %> <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="javax.servlet.*"%> <%@ page import="javax.servlet.jsp.*"%> <%@ page import="javax.naming.*"%>
<% String id = request.getParameter("id"); SqlAccess s = null; try { s = new SqlAccess("jdbc/cws"); Entity p = s.retrieve("select * from pat_demograph where pat_num=" + id ); EnglishName n = new EnglishName(p.getS("LAST_NAME"), p.getS("FIRST_NAME"), // DB crock! Middle initials seem to be // stored under TITLE! p.getS("TITLE")); %>
<%
String x = p.get("STREET_ADDR");
if (x!=null) out.write(x + " \n"); x = p.get("CITY_NAME"); if (x!=null) out.write(x); String st = p.get("STATE_CD"); String zp = p.get("ZIP_CD"); if (st!=null && x != null) out.write(", "); if (st!=null) out.write(st); if (zp!=null) out.write(" " + zp); if (st!=null || zp!=null) out.write(" \n"); x = p.get("PHONE_NUM"); if (x!=null) out.write(x + " \n"); %> |
<%
String dob = p.getMdyDate("DOB");
if (dob!=null) out.write("DOB: " + dob + " \n"); x = p.get("SEX_CD"); if (x!=null) out.write("Sex: " + x + " \n"); x = p.get("RACE_CD"); if (x!=null) out.write("Race: " + x + " \n"); x = p.get("LAST_DISCH_DT"); if (x!=null && !x.equals("")) out.write("Last discharge: " + x + " \n"); %> |
<% List problems = s.retrieveAll("select * from problems where pat_num='" + id + "' order by start_date asc,end_date asc"); Iterator it = problems.iterator(); if (it.hasNext()) { out.write("
Problem | Start | End |
---|---|---|
" + prob + " | " + pr.getMdyDate("START_DATE") + " | " + pr.get("END_DATE") + " |