<%@ Language=VBScript %> <% Option Explicit %> <% Response.Expires=0 %> Find Labcodes

Labcode Designations
for the 13th IHWG

<% function FormBottom() Response.Write "
" Response.Write "" Response.Write "" Response.Write "" Response.Write "
" Response.Write "

If any of the information is incorrect please contact us at secretary@ihwg.org
" Response.Write "We will attempt to respond to all requests within 48 hours.

" Response.Write "
" Response.Write "" end function function IndInfo(objRS) Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" if objRS.EOF then Response.Write "" else ' display info about person(s) found do while not objRS.EOF Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" objRS.MoveNext loop end if Response.Write "
ParticipantLab CodeDepartment/ProgramInstitution/OrganizationCityCountry
No individuals in database match search criteria
" & objRS("LastName") & ", " & objRS("FirstName") & "" & objRS("LabCodeKey") & " " & objRS("DepartmentProgram") & " " & objRS("InstitutionOrganization") & " " & objRS("City") & " " & objRS("Country") & " 
" end function Dim state Dim objConn Dim objCmd Dim objRS Dim strCmd Dim vLastName Dim vFirstName Dim vLabCode dim vCountry Dim vLaboratoryDirector Dim vDepartmentProgram dim vInstitutionOrganization dim vCity dim reqItem dim objForm dim objWin dim errMsg if not Request.QueryString("state") = "" then state = Request.QueryString("state") else state = 1 end if if state=4 then ' came from enrollment form as popup ' set objWin=Window.opener ' set objForm=objWin.document.forms("contact2") 'response.write vLabCode 'response.write vCountry ' vLabCode=objForm("pLabCode") ' vCountry=objForm("pCountry") vLabCode=Session("LabCode") vCountry=Session("Country") response.write vLabCode & "/" & vCountry if not vLabCode="" then state=3 elseif not vCountry="" then state=2 else state=1 end if end if if state=2 then ' want a labcode or country or name search vLabCode=Request.Form("pLabCode") vCountry=Request.Form("pCountry") vLastName=Request.Form("pLastName") vFirstName=Request.Form("pFirstName") if Len(Request("findlab")) and not vLabCode = "" then 'have a labcode search state=3 elseif Len(Request("findcountry")) and not vCountry = "" and vCountry<>"0" then ' have entered a country (state=2 still) elseif Len(Request("findname")) and (vLastName <> "" or vFirstName <> "") then 'have a name search state=6 else ' have clicked a button without selecting state = 1 end if end if 'if state=5 then ' want to zero in on lab from country view ' For Each reqItem In Request.Form ' vLabCode=reqItem ' Next ' state=3 'end if if state=6 then ' have a name search Set objConn=Server.CreateObject("ADODB.Connection") objConn.Open strIHWGConn Set objCmd=Server.CreateObject("ADODB.Command") set objCmd.ActiveConnection=objConn objCmd.CommandText="upListPeopleSoundex" objCmd.CommandType = adCmdStoredProc objCmd.Parameters(1).Value=vLastName objCmd.Parameters(2).Value=vFirstName set objRS=objCmd.Execute %>
<% IndInfo(objRS) FormBottom() objRS.close set objRS=nothing objConn.close set objConn=nothing end if if state=3 then ' have a labcode search Set objConn=Server.CreateObject("ADODB.Connection") objConn.Open strIHWGConn Set objCmd=Server.CreateObject("ADODB.Command") set objCmd.ActiveConnection=objConn objCmd.CommandText="upListLabCodes" objCmd.CommandType = adCmdStoredProc objCmd.Parameters(1).Value=vLabCode set objRS=objCmd.Execute if not objRS.EOF then ' found labcode in database vCountry=objRS("Country") vLaboratoryDirector=objRS("LaboratoryDirector") vDepartmentProgram=objRS("DepartmentProgram") vInstitutionOrganization=objRS("InstitutionOrganization") vCity=objRS("City") ' display info about labcode %>
Labcode: <%=vLabCode%>
Country: <%=vCountry%>
Lab Director: <%=vLaboratoryDirector%>
Department/Program: <%=vDepartmentProgram%>
Institution/Organization: <%=vInstitutionOrganization%>
City: <%=vCity%>
<% objRS.close set objRS=nothing objConn.close set objConn=nothing Set objConn=Server.CreateObject("ADODB.Connection") objConn.Open strIHWGConn Set objCmd=Server.CreateObject("ADODB.Command") set objCmd.ActiveConnection=objConn objCmd.CommandText="upListLabPeople" objCmd.CommandType = adCmdStoredProc objCmd.Parameters(1).Value=vLabCode set objRS=objCmd.Execute IndInfo(objRS) objRS.close set objRS=nothing objConn.close set objConn=nothing FormBottom() else ' not able to locate labcode objRS.close set objRS=nothing objConn.close set objConn=nothing Response.Write "Labcode " & vLabCode & " not in database!" state = 1 end if end if if state = 2 then ' display list of labs for country Response.Write "" ' Response.Write "" Response.Write "" Set objConn=Server.CreateObject("ADODB.Connection") objConn.Open strIHWGConn Set objCmd=Server.CreateObject("ADODB.Command") set objCmd.ActiveConnection=objConn set objCmd.ActiveConnection=objConn objCmd.CommandText="upListLabs" objCmd.CommandType = adCmdStoredProc objCmd.Parameters(1).Value=vCountry set objRS=objCmd.Execute if objRS.EOF then Response.Write "" Response.Write "" else Response.Write "" do while not objRS.EOF Response.Write "" ' Response.Write "" ' " Response.Write "" objRS.MoveNext loop end if objRS.close set objRS=nothing objConn.close set objConn=nothing Response.Write "
Labs In " & vCountry & "
No labs in database for " & vCountry & "
Labs In " & objRS("Country") & "
" & objRS("LabCode13th") & "
" & objRS("LabCode13th") & "" if not isnull(objRS("LaboratoryDirector")) then Response.Write "Laboratory Director: " & objRS("LaboratoryDirector") & "
" if not isnull(objRS("DepartmentProgram")) then Response.Write "Department/Program: " &objRS("DepartmentProgram") & "
" if not isnull(objRS("InstitutionOrganization")) then Response.Write "Institution/Organization: " & objRS("InstitutionOrganization") & "
" if not isnull(objRS("City")) then Response.Write "City: " & objRS("City") Response.Write "
" FormBottom() end if if state = 1 then ' prompt to enter labcode or country or name %>
You can view lab information by lab code, country, or participant
 
Labcode: 
OR
Country: 
OR
Participant:  First Name 
  Last Name  
<% end if %>