<%@ Language=VBScript %> <% Option Explicit %> <% 'Open a connection to the database Dim objConn, strSQLBreedName,objRSBreed,breedid, breedName, maincolor,nosecolor Dim strSQLPicURL, strSQLGenInfo, objRSPicURL, picURL Dim objRSGenInfo, dnatest, acknow, links, samples, resulttime, certificate, alleles Dim tempGenotype, strSQL4, objRSListOfGen, strSQLBreedColor, objRSBreedColor maincolor = "" nosecolor = "" 'testcode=Request.QueryString("testcode") breedid=Request.QueryString("breedid") maincolor=Request.QueryString("maincolor") nosecolor=Request.QueryString("nosecolor") Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString=connect() objConn.Open strSQLBreedName="SELECT b_name FROM breed WHERE breed_ID='" & breedid & "'" strSQLPicURL="SELECT url FROM breed_pics WHERE breed_ID='" & breedid & "'" strSQLGenInfo="SELECT * FROM breed_genotype WHERE breed_ID='" & breedid & "'" Set objRSBreed = Server.CreateObject("ADODB.Recordset") objRSBreed.Open strSQLBreedName, objConn breedName = objRSBreed("b_name") objRSBreed.Close Set objRSBreed = Nothing Set objRSPicURL = Server.CreateObject("ADODB.Recordset") objRSPicURL.Open strSQLPicURL, objConn picURL = objRSPicURL("url") objRSPicURL.Close Set objRSPicURL = Nothing Set objRSGenInfo = Server.CreateObject("ADODB.Recordset") objRSGenInfo.Open strSQLGenInfo, objConn dnatest = objRSGenInfo("dnatest") acknow = objRSGenInfo("acknowledgment") links = objRSGenInfo("links") samples = objRSGenInfo("samples") resulttime = objRSGenInfo("resulttime") certificate = objRSGenInfo("certificate") alleles = objRSGenInfo("allele") objRSGenInfo.Close Set objRSGenInfo = Nothing tempGenotype=Split(alleles,"-") 'Response.Write alleles & "
" strSQL4 = "SELECT genotype, maincolor, hiddencolor, nosecolor FROM color_genotypes WHERE " Dim all, alE, alesmall, alB, albsmall, alD, alM, alKb, alkbr, alky, alkx, ala, alay, alat, alax, alS, alsp, alsi, tmpTestedAlleles tmpTestedAlleles = "" For each all in tempGenotype 'Response.Write all &"
" Select Case all Case "E" alE = "T" Case "B" alB = "T" Case "D" alD = "T" Case "M" alM = "T" Case "Kb" alKb = "T" Case "kbr" alkbr = "T" Case "ky" alky = "T" Case "kx" alkx = "T" Case "a" ala = "T" Case "ay" alay = "T" Case "at" alat = "T" Case "ax" alax = "T" Case "S" alS = "T" Case "sp" alsp = "T" Case "si" alsi = "T" Case "esmall" alesmall = "T" Case "bsmall" albsmall = "T" End Select 'if allele<>"" then ' strSQL4 = strSQL4 & allele & "='T' AND " 'end if Next Dim i if alE = "T" then strSQL4 = strSQL4 & " E='T' AND " tmpTestedAlleles = tmpTestedAlleles & "E-" else strSQL4 = strSQL4 & " E IS NULL AND " end if if alesmall = "T" then strSQL4 = strSQL4 & " esmall='T' AND " tmpTestedAlleles = tmpTestedAlleles & "esmall-" else strSQL4 = strSQL4 & " esmall IS NULL AND " end if if alB = "T" then strSQL4 = strSQL4 & " B='T' AND " tmpTestedAlleles = tmpTestedAlleles & "B-" else strSQL4 = strSQL4 & " B IS NULL AND " end if if albsmall = "T" then strSQL4 = strSQL4 & " bsmall='T' AND " tmpTestedAlleles = tmpTestedAlleles & "bsmall-" else strSQL4 = strSQL4 & " bsmall IS NULL AND " end if if alD = "T" then strSQL4 = strSQL4 & " D='T' AND " tmpTestedAlleles = tmpTestedAlleles & "D-" else strSQL4 = strSQL4 & " D IS NULL AND " end if if alM = "T" then strSQL4 = strSQL4 & " M='T' AND " tmpTestedAlleles = tmpTestedAlleles & "M-" else strSQL4 = strSQL4 & " M IS NULL AND " end if if alKb = "T" then strSQL4 = strSQL4 & " Kb='T' AND " tmpTestedAlleles = tmpTestedAlleles & "Kb-" else strSQL4 = strSQL4 & " Kb IS NULL AND " end if if alkbr = "T" then strSQL4 = strSQL4 & " kbr='T' AND " tmpTestedAlleles = tmpTestedAlleles & "kbr-" else strSQL4 = strSQL4 & " kbr IS NULL AND " end if if alky = "T" then strSQL4 = strSQL4 & " ky='T' AND " tmpTestedAlleles = tmpTestedAlleles & "ky-" else strSQL4 = strSQL4 & " ky IS NULL AND " end if if alkx = "T" then strSQL4 = strSQL4 & " kx='T' AND " tmpTestedAlleles = tmpTestedAlleles & "kx-" else strSQL4 = strSQL4 & " kx IS NULL AND " end if if ala = "T" then strSQL4 = strSQL4 & " a='T' AND " tmpTestedAlleles = tmpTestedAlleles & "a-" else strSQL4 = strSQL4 & " a IS NULL AND " end if if alay = "T" then strSQL4 = strSQL4 & " ay='T' AND " tmpTestedAlleles = tmpTestedAlleles & "ay-" else strSQL4 = strSQL4 & " ay IS NULL AND " end if if alat = "T" then strSQL4 = strSQL4 & " at='T' AND " tmpTestedAlleles = tmpTestedAlleles & "at-" else strSQL4 = strSQL4 & " at IS NULL AND " end if if alax = "T" then strSQL4 = strSQL4 & " ax='T' AND " tmpTestedAlleles = tmpTestedAlleles & "ax-" else strSQL4 = strSQL4 & " ax IS NULL AND " end if if als = "T" then strSQL4 = strSQL4 & " S='T' AND " tmpTestedAlleles = tmpTestedAlleles & "S-" else strSQL4 = strSQL4 & " S IS NULL AND " end if if alsp = "T" then strSQL4 = strSQL4 & " sp='T' AND " tmpTestedAlleles = tmpTestedAlleles & "sp-" else strSQL4 = strSQL4 & " sp IS NULL AND " end if if alsi = "T" then strSQL4 = strSQL4 & " si='T' AND " tmpTestedAlleles = tmpTestedAlleles & "si-" else strSQL4 = strSQL4 & " si IS NULL AND " end if if maincolor <> "" then strSQL4 = strSQL4 & "maincolor='" & maincolor & "' AND " end if if nosecolor <> "" then strSQL4 = strSQL4 & "nosecolor='" & nosecolor & "'" else strSQL4 = strSQL4 & " 1=1" end if Set objRSListOfGen = Server.CreateObject("ADODB.Recordset") objRSListOfGen.Open strSQL4, objConn 'Response.Write strSQL4 & "

" strSQLBreedColor = "SELECT * FROM breed_color WHERE breed_ID=" & breedid Set objRSBreedColor = Server.CreateObject("ADODB.Recordset") objRSBreedColor.Open strSQLBreedColor, objConn ' Function returns the type of sample depending on the number of alleles tested. function calculatesample(genotype) Dim listOfAlleles, countalleles, alE, alB, alM, alD, alA, alK, alS alE = "False" alB = "False" alM = "False" alD = "False" alA = "False" alK = "False" alS = "False" listOfAlleles = Split(genotype,"-") For Each i in listOfAlleles Select Case TRIM(returngroup(i)) Case "E" if alE = "False" then countalleles = countalleles + 1 alE = "True" end if Case "B" if alB = "False" then countalleles = countalleles + 1 alB = "True" end if Case "M" if alM = "False" then countalleles = countalleles + 1 alM = "True" end if Case "D" if alD = "False" then countalleles = countalleles + 1 alD = "True" end if Case "A" if alA = "False" then countalleles = countalleles + 1 alA = "True" end if Case "K" if alK = "False" then countalleles = countalleles + 1 alK = "True" end if Case "S" if alS = "False" then countalleles = countalleles + 1 alS = "True" end if End Select Next if countalleles > 2 then calculatesample = "blood" else calculatesample = "swab" end if end function ' Function returngroup return group that allele belongs to. function returngroup(allele) Select Case allele Case "E" returngroup = "E" Case "esmall" returngroup = "E" Case "M" returngroup = "M" Case "B" returngroup = "B" Case "bsmall" returngroup = "B" Case "ay" returngroup = "A" Case "D" returngroup = "D" Case "at" returngroup = "A" Case "ax" returngroup = "A" Case "a" returngroup = "A" Case "Kb" returngroup = "K" Case "ky" returngroup = "K" Case "kx" returngroup = "K" Case "kbr" returngroup = "K" Case "S" returngroup = "S" Case "sp" returngroup = "S" Case "si" returngroup = "S" End Select end function %> HealthGene - Canine DNA Testing

Home | Technology | Company | Contact



HOME | LIST OF TESTS

C128 - CANINE COAT AND NOSE COLOR TEST
<%=breedName %>

DNA Test:

<%=dnatest %>

Acknowledgment:

<%=acknow %>

Links:

<%=links %>

Genotypes:

Please select the color of your dog to determine possible genotypes:

<%=tmpHeader %>

<% Dim tmpHiddenColor, tmpItemColor, tmpCurrColor, prnColor, Lmaincolor, Bmaincolor Do While Not objRSListOfGen.EOF Response.Write "" Response.Write "" objRSListOfGen.MoveNext objRSBreedColor.MoveFirst Loop %>
Genotype
Main Color
Nose Color
Hidden Color
" & objRSListOfGen("genotype") & "" Lmaincolor = TRIM(objRSListOfGen("maincolor")) Do While Not objRSBreedColor.EOF Bmaincolor = Split(objRSBreedColor("maincolor"),"<") 'Response.Write TRIM(objRSBreedColor("adjustcolor")) & " | " 'Response.Write TRIM(objRSBreedColor("maincolor")) & " - " & TRIM(objRSListOfGen("maincolor")) & " | " 'if InStr(CStr(Lmaincolor),CStr(Bmaincolor))=0 then if Lmaincolor = TRIM(Bmaincolor(0)) then Response.Write TRIM(objRSBreedColor("adjustcolor")) end if objRSBreedColor.MoveNext Loop objRSBreedColor.MoveFirst Response.Write "" & objRSListOfGen("nosecolor") & "" tmpHiddenColor = Split(objRSListOfGen("hiddencolor"),"
") For Each tmpItemColor In tmpHiddenColor tmpCurrColor = "" prnColor = "" Do While Not objRSBreedColor.EOF 'Response.Write TRIM(objRSBreedColor("maincolor")) & " - " & TRIM(objRSBreedColor("adjustcolor")) & " - " & TRIM(tmpItemColor) & " - " & tmpCurrColor & "
" if TRIM(tmpItemColor) = TRIM(objRSBreedColor("maincolor")) then tmpCurrColor = TRIM(objRSBreedColor("maincolor")) prnColor = TRIM(objRSBreedColor("adjustcolor")) else if tmpCurrColor <> tmpItemColor Then tmpCurrColor = tmpItemColor prnColor = tmpItemColor end if end if objRSBreedColor.MoveNext Loop Response.Write prnColor & "
" objRSBreedColor.MoveFirst Next Response.Write "

<%=tmpFooter %>

Pricing:

- Any single tested allele - $65.00*
- Each additional allele - $20.00*
* - subject to 5% GST for Canadian residents only.

Note:
Mask gene (Em) is considered as an individual test, separate from other alleles in E locus.

To help you to calculate the proper amount, please review the following example:
Testing for 3 alleles - E, B, and D - should be calculated as $65 + $20 + $20 = $105.00.
The price will be automaticaly calculated during the process of ordering a sample collection kit.

Samples:

HealthGene requires a blood sample (at least 1ml of whole blood in a purple top EDTA tube) for testing 3 or more alleles. If testing less than 3, a sample collection kit (cheek swab collection) can be ordered online following the link: Order A Sample Collection Kit.

Test Results:

<% Response.Write "Test results are usually available in " & resulttime & " from the moment the samples arrive at the laboratory. Test results can be reported by e-mail, fax, or by phone." %>

Certificate of Result:

<% If (TRIM(certificate) = "y") then Response.Write "HealthGene will provide a certificate for each test result." end if %>

<% objRSBreedColor.Close Set objRSBreedColor = Nothing objRSListOfGen.Close Set objRSListOfGen = Nothing objConn.Close Set objConn = Nothing %>