<%@ Language="VBScript" %> <% On error resume next Public rsCurCondition Public rsOldCondition Public cnDB If isEmpty(Session("SubscriberID")) then Session("ErrMsg") = "Your connection has expired" Response.Redirect "Login.asp" elseIf Session("SubscriberID") = 0 then Session("ErrMsg") = "Your connection has expired" Response.Redirect "Login.asp" End if '-- Buttons If Request.Form("btnSubscriber") = "Subscriber" then Response.Redirect "Subscriber.asp" End if If Request.Form("btnCondition") = "Condition" then Response.Redirect "Condition.asp" End if If Request.Form("btnMedication") = "Medication" then Response.Redirect "Medication.asp" End if If Request.Form("btnAllergies") = "Allergies /" & Chr(13) & Chr(10) & " Inoculations" then Response.Redirect "Allergies.asp" End if If Request.Form("btnPhysician") = "Physicians /" & Chr(13) & Chr(10) & " Provider" then Response.Redirect "Physician.asp" End if If Request.Form("btnNote") = "Notes" then Response.Redirect "Note.asp" End if Session("ErrMsg") = "" Err.Clear Set cnDB = CreateObject("ADODB.Connection") cnDB.ConnectionString = Session("dbConnection") cnDB.Open If Err.number = 0 then Set rsCurCondition = cnDB.Execute("SELECT" & _ " SubscriberID," & _ " ConditionID," & _ " Condition," & _ " DateDiagnosed," & _ " Type," & _ " Deleted" & _ " FROM tblSubscriber_Condition" & _ " WHERE SubscriberID=" & Session("SubscriberID") & _ " AND Type='C'" & _ " AND Deleted<>Yes;") Set rsOldCondition = cnDB.Execute("SELECT" & _ " SubscriberID," & _ " ConditionID," & _ " Condition," & _ " DateDiagnosed," & _ " Type," & _ " Deleted" & _ " FROM tblSubscriber_Condition" & _ " WHERE SubscriberID=" & Session("SubscriberID") & _ " AND Type='P'" & _ " AND Deleted<>Yes;") End if If rsCurCondition.eof or rsOldCondition.eof then End if %> Condition
<% If Not len(Session("ErrMsg")) = 0 then Response.Write "

" Response.Write "Error: " & Session("ErrMsg")& "

" End if %> <%Do until rsCurCondition.eof and rsOldCondition.eof%> <%If not rsCurCondition.eof then%> <%rsCurCondition.MoveNext%> <%Else%> <%End if%> <%If not rsOldCondition.eof then%> <%rsOldCondition.MoveNext End if%> <%Loop%>

Conditions

Current Conditions

Date

Link to Medication

Prior Conditions

Date

Link to Medication

<%Response.Write rsCurCondition("Condition")%>

<%Response.Write rsCurCondition("DateDiagnosed")%>

<%Response.Write ""%> Medication

<%Response.Write rsOldCondition("Condition")%>

<%Response.Write rsOldCondition("DateDiagnosed")%>

<%Response.Write ""%> Medication
<% rsOldCondition.close rsCurCondition.close set cnDB = Nothing %>