Public Function ComputeEGFR(ByVal Sex As SCNumericType.ESex, ByVal inCrValue As Double, ByVal inAge As Double, ByVal inHeight As Double) As String
Dim crt As Double = inCrValue
Dim age As Double = inAge
Dim height As Double = inHeight
Dim result As Double
Console.WriteLine("eGFR Age : " + inAge.ToString())
Try
If crt = 0 Then
Return ""
Exit Function
End If
If (age < 18) Then
If height = 0 Then
Return ""
End If
result = (0.41 * height) / crt
Else
If (Sex = SCNumericType.ESex.male) And (crt <= 0.9) Then
result = (141 * ((crt / 0.9) ^ -0.411)) * (0.993 ^ age)
ElseIf (Sex = SCNumericType.ESex.male) And (crt > 0.9) Then
result = (141 * ((crt / 0.9) ^ -1.209)) * (0.993 ^ age)
ElseIf (Sex = SCNumericType.ESex.female) And (crt <= 0.7) Then
result = ((144 * ((crt / 0.7) ^ -0.329)) * (0.993 ^ age))
ElseIf (Sex = SCNumericType.ESex.female) And (crt > 0.7) Then
result = ((144 * ((crt / 0.7) ^ -1.209)) * (0.993 ^ age))
End If
End If
Return result
Catch ex As Exception
ErrorLog(ex)
End Try
Return ""
End Function
To embed this project on your website, copy the following code and paste it into your website's HTML: