change thresholds

This commit is contained in:
Pritimay Sarkar
2024-02-23 09:34:55 +05:30
parent cd593bb67b
commit eb1c764551

View File

@@ -1012,17 +1012,18 @@ class HemoCubeFragment : Fragment() {
fun deviceRatioBorderlineThresholds(ratio: Double?): String { fun deviceRatioBorderlineThresholds(ratio: Double?): String {
try { try {
if (ratio != null) { if (ratio != null) {
if (ratio in 0.11..0.237) { val roundedRatio = String.format("%.3f", ratio).toDouble()
if (roundedRatio >= 0.11 && roundedRatio < 0.237) {
// setSubtitleTextColor(R.color.green_2) // setSubtitleTextColor(R.color.green_2)
return "Normal" return "Normal"
} }
if (ratio in 0.237..0.242) if (roundedRatio in 0.237..0.242)
return "Negative Borderline" return "Negative Borderline"
if (ratio in 0.242..0.318) if (roundedRatio in 0.242..0.318)
return "Sickle Cell Trait" return "Sickle Cell Trait"
if (ratio in 0.318..0.356) if (roundedRatio >= 0.318 && roundedRatio < 0.356)
return "Positive for Sickle Cell. HPLC for Confirmation" return "Positive for Sickle Cell. HPLC for Confirmation"
if (ratio in 0.356..0.7) if (roundedRatio in 0.356..0.7)
return "Sickle Cell Disease" return "Sickle Cell Disease"
} else { } else {
return "Invalid" return "Invalid"