G
Guest
Can anyone tell me why the code below won't work for me? It's not picking up
the results from the "OTHER" sections of "General Developmental" and "LAB
TEST RESULTS". Because the OTHER section worked for "Musculoskeletal", I
have a feeling this is a result of the values for that column (General
Developmental, and LAB TEST RESULTS) have spaces in them. Can anyone help me
get around this without having to change all the values in the SQL database?
'Musculoskeletal Symptoms
Case "Scoliosis"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_S.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_S_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Achilles Tendon Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_ATC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_ATC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Knee Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_KC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_KC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "ELBOW Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_EC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_EC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "NECK Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_NC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_NC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
****HERE IT WORKS!***
Case "OTHER"
If dr("MAIN_CATEGORY") = "Musculoskeletal" Then
If Not dr("CHOICE").ToString = "NA" Then
lblMS_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblMS_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
'General Developmental
Case "Language Delay"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_LA.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_LA_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Learning Disability"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_LE.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_LE_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "ADHD/ADD"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_AD.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_AD_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Behavioral Problems"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_BP.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_BP_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
****HERE IT DOES NOT WORK!!!********
Case "OTHER"
If dr("MAIN_CATEGORY").ToString = "General
Developmental" Then
If Not dr("CHOICE").ToString = "NA" Then
lblMS_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblMS_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
'Lab Test Results
Case "Elevated Transaminases"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_ET.Text = dr("CHOICE")
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblLTR_ET_F.Text = dr("IS_FAMILY_HISTORY")
End If
Case "Aldolase"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_A.Text = dr("CHOICE")
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblLTR_A_F.Text = dr("IS_FAMILY_HISTORY")
End If
****HERE IT DOES NOT WORK!!!*****
Case "OTHER"
If dr("MAIN_CATEGORY").ToString = "LAB TEST RESULTS"
Then
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblLTR_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
Case "MAX CPK 1ST VALUE"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_CPK1.Text = dr("CHOICE")
End If
Case "MAX CPK 2ND VALUE"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_CPK2.Text = dr("CHOICE")
End If
End Select
If dr("VALUE_ID").ToString = "CVID-502" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblVS_O_Text.Text = ""
Else
lblVS_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-500" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblMS_O_Text.Text = ""
Else
lblMS_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-504" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblGD_O_Text.Text = ""
Else
lblGD_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-506" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblLTR_O_Text.Text = ""
Else
lblLTR_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
Next
Catch err As SqlException
Dim sqlerr As String = err.Message
End Try
tblSymptoms.Visible = True
lkbSymDown.Visible = True
lkbSymUp.Visible = False
End Sub
the results from the "OTHER" sections of "General Developmental" and "LAB
TEST RESULTS". Because the OTHER section worked for "Musculoskeletal", I
have a feeling this is a result of the values for that column (General
Developmental, and LAB TEST RESULTS) have spaces in them. Can anyone help me
get around this without having to change all the values in the SQL database?
'Musculoskeletal Symptoms
Case "Scoliosis"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_S.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_S_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Achilles Tendon Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_ATC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_ATC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Knee Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_KC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_KC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "ELBOW Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_EC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_EC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "NECK Contractures"
If Not dr("CHOICE").ToString = "NA" Then
lblMS_NC.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblMS_NC_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
****HERE IT WORKS!***
Case "OTHER"
If dr("MAIN_CATEGORY") = "Musculoskeletal" Then
If Not dr("CHOICE").ToString = "NA" Then
lblMS_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblMS_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
'General Developmental
Case "Language Delay"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_LA.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_LA_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Learning Disability"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_LE.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_LE_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "ADHD/ADD"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_AD.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_AD_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
Case "Behavioral Problems"
If Not dr("CHOICE").ToString = "NA" Then
lblGD_BP.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblGD_BP_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
****HERE IT DOES NOT WORK!!!********
Case "OTHER"
If dr("MAIN_CATEGORY").ToString = "General
Developmental" Then
If Not dr("CHOICE").ToString = "NA" Then
lblMS_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblMS_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
'Lab Test Results
Case "Elevated Transaminases"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_ET.Text = dr("CHOICE")
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblLTR_ET_F.Text = dr("IS_FAMILY_HISTORY")
End If
Case "Aldolase"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_A.Text = dr("CHOICE")
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA" Then
lblLTR_A_F.Text = dr("IS_FAMILY_HISTORY")
End If
****HERE IT DOES NOT WORK!!!*****
Case "OTHER"
If dr("MAIN_CATEGORY").ToString = "LAB TEST RESULTS"
Then
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_O.Text = dr("CHOICE").ToString.ToUpper
End If
If Not dr("IS_FAMILY_HISTORY").ToString = "NA"
Then
lblLTR_O_F.Text =
dr("IS_FAMILY_HISTORY").ToString.ToUpper
End If
End If
Case "MAX CPK 1ST VALUE"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_CPK1.Text = dr("CHOICE")
End If
Case "MAX CPK 2ND VALUE"
If Not dr("CHOICE").ToString = "NA" Then
lblLTR_CPK2.Text = dr("CHOICE")
End If
End Select
If dr("VALUE_ID").ToString = "CVID-502" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblVS_O_Text.Text = ""
Else
lblVS_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-500" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblMS_O_Text.Text = ""
Else
lblMS_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-504" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblGD_O_Text.Text = ""
Else
lblGD_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
If dr("VALUE_ID").ToString = "CVID-506" Then
If dr("CLINICAL_VALUE_OTHER_NOTE").ToString = "" Then
lblLTR_O_Text.Text = ""
Else
lblLTR_O_Text.Text =
dr("CLINICAL_VALUE_OTHER_NOTE").ToString
End If
End If
Next
Catch err As SqlException
Dim sqlerr As String = err.Message
End Try
tblSymptoms.Visible = True
lkbSymDown.Visible = True
lkbSymUp.Visible = False
End Sub