Compare commits
17 Commits
hb3-hb4
...
release-v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f264c299b | ||
|
|
19fcc13b2a | ||
|
|
d1b5ca32bf | ||
|
|
3e690345c2 | ||
|
|
4f7aa74314 | ||
|
|
590abb5c73 | ||
|
|
7fe8202968 | ||
|
|
11d4c99e02 | ||
|
|
2e700601fe | ||
|
|
41798aa37b | ||
|
|
e7600dafec | ||
|
|
d6b3df25f8 | ||
|
|
0d7e8b0cd0 | ||
|
|
3c8570c46b | ||
|
|
96f9d4d6da | ||
|
|
e7505077ce | ||
|
|
80fa523ec9 |
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -4,7 +4,6 @@
|
|||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="GRADLE" />
|
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="jbr-17" />
|
<option name="gradleJvm" value="jbr-17" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ android {
|
|||||||
|
|
||||||
// prod - production, preprod - preproduction, quality - qc
|
// prod - production, preprod - preproduction, quality - qc
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "in.sminnovations.hpostesting.preprod"
|
applicationId "in.sminnovations.hpostesting.dev"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 81
|
versionCode 76
|
||||||
versionName "2.1.81"
|
versionName "2.1.76"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,15 @@ object Constants {
|
|||||||
"HC-V1-020",
|
"HC-V1-020",
|
||||||
"HCV-000-3001",
|
"HCV-000-3001",
|
||||||
"HCV-000-3002",
|
"HCV-000-3002",
|
||||||
|
"HCV-000-3003",
|
||||||
|
"HCV-000-3004",
|
||||||
|
"HCV-000-3005",
|
||||||
|
"HCV-000-3006",
|
||||||
|
"HCV-000-3007",
|
||||||
|
"HCV-000-3008",
|
||||||
|
"HCV-000-3009",
|
||||||
|
"HCV-000-3010",
|
||||||
|
"HPP1-0124-0001"
|
||||||
)
|
)
|
||||||
|
|
||||||
const val password = "SMI@12345"
|
const val password = "SMI@12345"
|
||||||
@@ -95,49 +104,64 @@ object Constants {
|
|||||||
const val TEST_STATUS_CODE_TEST_COMPLETED = 12.0
|
const val TEST_STATUS_CODE_TEST_COMPLETED = 12.0
|
||||||
|
|
||||||
val DEVICE_CONFIGURATION: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
|
val DEVICE_CONFIGURATION: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
|
||||||
"HCV-000-3001" to listOf(
|
"HPP1-0124-0001" to listOf(
|
||||||
listOf(1.313, -0.89), // LED1, 435nm
|
listOf(1.313, -0.89), // LED1, 435nm
|
||||||
listOf(0.581462456, -0.58502), // LED2, 415nm
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
listOf(0.2012, 0.0092), // LED3, 555nm
|
listOf(0.2012, 0.0092), // LED3, 555nm
|
||||||
listOf(1.0, 0.0) // LED4, 560nm
|
listOf(1.0, 0.0) // LED4
|
||||||
),
|
),
|
||||||
"HCV-000-3002" to listOf(
|
"HCV-000-3002" to listOf(
|
||||||
listOf(0.723142, -0.09135), // LED1, 435nm
|
listOf(0.723142, -0.09135), // LED1, 435nm
|
||||||
listOf(0.581462456, -0.58502), // LED2, 415nm
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
listOf(0.1964, 0.011565), // LED3, 555nm
|
listOf(0.1964, 0.011565), // LED3, 555nm
|
||||||
listOf(1.0, 0.0) // LED4, 560nm
|
listOf(1.0, 0.0) // LED4
|
||||||
),
|
),
|
||||||
"HCV-000-3003" to listOf(
|
"HCV-000-3003" to listOf(
|
||||||
listOf(0.723142, -0.09135), // LED1, 435nm
|
listOf(0.723142, -0.09135), // LED1, 435nm
|
||||||
listOf(0.581462456, -0.58502), // LED2, 415nm
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
listOf(0.1964, 0.011565), // LED3, 555nm
|
listOf(0.1964, 0.011565), // LED3, 555nm
|
||||||
listOf(1.0, 0.0) // LED4, 560nm
|
listOf(1.0, 0.0) // LED4
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
val DEVICE_HB_PARAMETERS: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
|
|
||||||
"HCV-000-3001" to listOf(
|
|
||||||
listOf(1.0, 0.0), // LED1, 435nm
|
|
||||||
listOf(1.0, 0.0), // LED2, 415nm
|
|
||||||
listOf(0.0305, 0.2067), // LED3, 555nm
|
|
||||||
listOf(0.0258, 0.5534) // LED4, 560nm
|
|
||||||
),
|
|
||||||
"HCV-000-3002" to listOf(
|
|
||||||
listOf(1.0, 0.0), // LED1, 435nm
|
|
||||||
listOf(1.0, 0.0), // LED2, 415nm
|
|
||||||
listOf(0.0305, 0.2067), // LED3, 555nm
|
|
||||||
listOf(0.0258, 0.5534) // LED4, 560nm
|
|
||||||
),
|
|
||||||
"HCV-000-3003" to listOf(
|
|
||||||
listOf(0.0562, 0.1001), // LED1, 435nm
|
|
||||||
listOf(0.0902, 0.7021), // LED2, 415nm
|
|
||||||
listOf(0.0208, 0.0191), // LED3, 555nm
|
|
||||||
listOf(0.0153, 0.0152) // LED4
|
|
||||||
),
|
),
|
||||||
"HCV-000-3004" to listOf(
|
"HCV-000-3004" to listOf(
|
||||||
listOf(1.6837, -1.1417), // LED1, 435nm
|
listOf(1.7272, -1.1977), // LED1, 435nm
|
||||||
listOf(0.581462456, -0.58502), // LED2, 415nm
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
listOf(0.2241, -0.0106), // LED3, 555nm
|
listOf(0.2304, -0.0145), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3005" to listOf(
|
||||||
|
listOf(1.3801, -0.372), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.4565, -0.0371), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3006" to listOf(
|
||||||
|
listOf(1.3801, -0.372), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.4565, -0.0371), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3007" to listOf(
|
||||||
|
listOf(1.8445, -0.8213), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.4613, -0.0831), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3008" to listOf(
|
||||||
|
listOf(1.7272, -1.1977), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.2304, -0.0145), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3009" to listOf(
|
||||||
|
listOf(1.7272, -1.1977), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.2304, -0.0145), // LED3, 555nm
|
||||||
|
listOf(1.0, 0.0) // LED4
|
||||||
|
),
|
||||||
|
"HCV-000-3010" to listOf(
|
||||||
|
listOf(1.7272, -1.1977), // LED1, 435nm
|
||||||
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
|
listOf(0.2304, -0.0145), // LED3, 555nm
|
||||||
listOf(1.0, 0.0) // LED4
|
listOf(1.0, 0.0) // LED4
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -146,10 +170,8 @@ object Constants {
|
|||||||
const val INCUBATION_TIME_MAX = 1400
|
const val INCUBATION_TIME_MAX = 1400
|
||||||
const val BATTERY_LEVEL_MIN = 0
|
const val BATTERY_LEVEL_MIN = 0
|
||||||
|
|
||||||
const val MINIMUM_BATTERY_LEVEL = 0
|
|
||||||
|
|
||||||
val BUFFER_INTENSITY_THRESHOLDS: Map<String, List<List<Int>>> = mapOf<String, List<List<Int>>>(
|
val BUFFER_INTENSITY_THRESHOLDS: Map<String, List<List<Int>>> = mapOf<String, List<List<Int>>>(
|
||||||
"HCV-000-3001" to listOf(
|
"HPP1-0124-0001" to listOf(
|
||||||
listOf(20000, 25074),
|
listOf(20000, 25074),
|
||||||
listOf(20000, 24596),
|
listOf(20000, 24596),
|
||||||
listOf(20000, 26065),
|
listOf(20000, 26065),
|
||||||
@@ -172,6 +194,42 @@ object Constants {
|
|||||||
listOf(24500, 26250),
|
listOf(24500, 26250),
|
||||||
listOf(24500, 26250),
|
listOf(24500, 26250),
|
||||||
listOf(24500, 26250),
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3005" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3006" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3007" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3008" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3009" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
),
|
||||||
|
"HCV-000-3010" to listOf(
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
|
listOf(24500, 26250),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -43,8 +43,6 @@ data class HemoCubeTestData(
|
|||||||
var abs2: Double? = null,
|
var abs2: Double? = null,
|
||||||
var abs3: Double? = null,
|
var abs3: Double? = null,
|
||||||
var abs4: Double? = null,
|
var abs4: Double? = null,
|
||||||
var hb3: Double? = null,
|
|
||||||
var hb4: Double? = null,
|
|
||||||
var deviceRatio: Double? = null,
|
var deviceRatio: Double? = null,
|
||||||
var calculatedRatio: Double? = null,
|
var calculatedRatio: Double? = null,
|
||||||
var predictedDenovixRatio: Double? = null,
|
var predictedDenovixRatio: Double? = null,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import android.widget.AutoCompleteTextView
|
|||||||
import androidx.core.content.ContextCompat.getSystemService
|
import androidx.core.content.ContextCompat.getSystemService
|
||||||
import androidx.core.content.getSystemService
|
import androidx.core.content.getSystemService
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
|
import com.example.hpostesting.data.constant.Constants
|
||||||
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
|
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
|
||||||
import com.google.firebase.firestore.FirebaseFirestore
|
import com.google.firebase.firestore.FirebaseFirestore
|
||||||
|
|
||||||
@@ -196,7 +197,7 @@ class UserListAdapter(
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
userCard.setOnClickListener {
|
userCard.setOnClickListener {
|
||||||
if (batLevel < 40) {
|
if (batLevel < Constants.BATTERY_LEVEL_MIN) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
view.context,
|
view.context,
|
||||||
context?.getString(R.string.low_battery_warning),
|
context?.getString(R.string.low_battery_warning),
|
||||||
@@ -213,13 +214,13 @@ class UserListAdapter(
|
|||||||
).show()
|
).show()
|
||||||
} else {
|
} else {
|
||||||
if (model.incubationTime != "") {
|
if (model.incubationTime != "") {
|
||||||
if (isBetween15And30Minutes(model.incubationTime) < 0) {
|
if (isBetween15And30Minutes(model.incubationTime) < 15) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
view.context,
|
view.context,
|
||||||
context?.getString(R.string.incubation_not_completed),
|
context?.getString(R.string.incubation_not_completed),
|
||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
} else if (isBetween15And30Minutes(model.incubationTime) > 140000) {
|
} else if (isBetween15And30Minutes(model.incubationTime) > 30) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
view.context,
|
view.context,
|
||||||
context?.getString(R.string.incubation_crossed_30_minutes),
|
context?.getString(R.string.incubation_crossed_30_minutes),
|
||||||
|
|||||||
@@ -304,11 +304,11 @@ class HemoCubeFragment : Fragment() {
|
|||||||
|
|
||||||
when {
|
when {
|
||||||
resultData.contains("SNE") && this.testStatusCode < Constants.TEST_STATUS_CODE_CONFIG_COMPLETED -> {
|
resultData.contains("SNE") && this.testStatusCode < Constants.TEST_STATUS_CODE_CONFIG_COMPLETED -> {
|
||||||
val pattern = Regex("HCV-\\d{3}-\\d{4}")
|
val pattern = Regex("HPP1-\\d{4}-\\d{4}")
|
||||||
val matchResult = pattern.find(resultData)
|
val matchResult = pattern.find(resultData)
|
||||||
val hardwareId = matchResult?.value
|
val hardwareId = matchResult?.value
|
||||||
|
|
||||||
if (hardwareId.toString().length == 12) {
|
if (hardwareId.toString().length == 14) {
|
||||||
deviceHardwareId += hardwareId
|
deviceHardwareId += hardwareId
|
||||||
with(sharedPreferences.edit()) {
|
with(sharedPreferences.edit()) {
|
||||||
putString(Constants.DEVICE_ID, deviceHardwareId)
|
putString(Constants.DEVICE_ID, deviceHardwareId)
|
||||||
@@ -316,7 +316,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
this.testStatusCode = Constants.TEST_STATUS_CODE_CONFIG_COMPLETED
|
this.testStatusCode = Constants.TEST_STATUS_CODE_CONFIG_COMPLETED
|
||||||
} else {
|
} else {
|
||||||
hemoCubeViewModel.messages.postValue("config error")
|
hemoCubeViewModel.messages.postValue("Config error")
|
||||||
}
|
}
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.btnPlacebuffer.visibility = View.VISIBLE
|
binding.btnPlacebuffer.visibility = View.VISIBLE
|
||||||
@@ -459,7 +459,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
allErrorMessages += "Error: Invalid Test. Improper buffer reading (low)"
|
allErrorMessages += "Error: Invalid Test. Improper buffer reading (low)"
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.errorMessage.text = getString(R.string.error_improper_buffer_low)
|
binding.errorMessage.text = getString(R.string.error_improper_buffer_low)
|
||||||
// binding.errorMessage.visibility = View.VISIBLE
|
binding.errorMessage.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.errorMessage.text =
|
binding.errorMessage.text =
|
||||||
getString(R.string.error_improper_buffer_high)
|
getString(R.string.error_improper_buffer_high)
|
||||||
// binding.errorMessage.visibility = View.VISIBLE
|
binding.errorMessage.visibility = View.VISIBLE
|
||||||
binding.btnSubmit.isEnabled = true
|
binding.btnSubmit.isEnabled = true
|
||||||
binding.btnSubmit.isClickable = true
|
binding.btnSubmit.isClickable = true
|
||||||
}
|
}
|
||||||
@@ -498,26 +498,10 @@ class HemoCubeFragment : Fragment() {
|
|||||||
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(2)?.get(1)
|
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(2)?.get(1)
|
||||||
fittedAbs3 = gradient?.times(led3Average)?.plus(constant!!)!!
|
fittedAbs3 = gradient?.times(led3Average)?.plus(constant!!)!!
|
||||||
|
|
||||||
gradient = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(0)?.get(0)
|
gradient = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(3)?.get(0)
|
||||||
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(0)?.get(1)
|
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(3)?.get(1)
|
||||||
fittedAbs4 = gradient?.times(led4Average)?.plus(constant!!)!!
|
fittedAbs4 = gradient?.times(led4Average)?.plus(constant!!)!!
|
||||||
|
|
||||||
val slope1 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(1)?.get(0)
|
|
||||||
val intercept1 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(1)?.get(1)
|
|
||||||
val _hb1 = (led3Average - intercept1!!) / slope1!!
|
|
||||||
|
|
||||||
val slope2 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(3)?.get(0)
|
|
||||||
val intercept = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(3)?.get(1)
|
|
||||||
val _hb2 = (led4Average - intercept!!) / slope2!!
|
|
||||||
|
|
||||||
val slope3 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(2)?.get(0)
|
|
||||||
val intercept3 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(2)?.get(1)
|
|
||||||
val _hb3 = (led3Average - intercept3!!) / slope3!!
|
|
||||||
|
|
||||||
val slope4 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(3)?.get(0)
|
|
||||||
val intercept4 = Constants.DEVICE_HB_PARAMETERS[deviceHardwareId]?.get(3)?.get(1)
|
|
||||||
val _hb4 = (led4Average - intercept4!!) / slope4!!
|
|
||||||
|
|
||||||
_predictedDenovixRatio = fittedAbs3.div(fittedAbs1)
|
_predictedDenovixRatio = fittedAbs3.div(fittedAbs1)
|
||||||
|
|
||||||
if (fittedAbs1 <= fittedAbs2) {
|
if (fittedAbs1 <= fittedAbs2) {
|
||||||
@@ -525,7 +509,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
allErrorMessages += "Error: Invalid Test. Problem with de-oxygenation" + "\n"
|
allErrorMessages += "Error: Invalid Test. Problem with de-oxygenation" + "\n"
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.errorMessage.text = getString(R.string.error_invalid_test)
|
binding.errorMessage.text = getString(R.string.error_invalid_test)
|
||||||
// binding.errorMessage.visibility = View.VISIBLE
|
binding.errorMessage.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,7 +517,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
validationError = true
|
validationError = true
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.errorMessage.text = getString(R.string.error_negative_abs)
|
binding.errorMessage.text = getString(R.string.error_negative_abs)
|
||||||
// binding.errorMessage.visibility = View.VISIBLE
|
binding.errorMessage.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,7 +526,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
allErrorMessages += "Error: Low Hb. Repeat test" + "\n"
|
allErrorMessages += "Error: Low Hb. Repeat test" + "\n"
|
||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
binding.errorMessage.text = "Error: Low Hb. Repeat test"
|
binding.errorMessage.text = "Error: Low Hb. Repeat test"
|
||||||
// binding.errorMessage.visibility = View.VISIBLE
|
binding.errorMessage.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,8 +549,6 @@ class HemoCubeFragment : Fragment() {
|
|||||||
this.abs2 = fittedAbs2
|
this.abs2 = fittedAbs2
|
||||||
this.abs3 = fittedAbs3
|
this.abs3 = fittedAbs3
|
||||||
this.abs4 = fittedAbs4
|
this.abs4 = fittedAbs4
|
||||||
this.hb3 = _hb3
|
|
||||||
this.hb4 = _hb4
|
|
||||||
this.deviceRatio = deviceRatio
|
this.deviceRatio = deviceRatio
|
||||||
this.calculatedRatio = calculateRatio(deviceRatio)
|
this.calculatedRatio = calculateRatio(deviceRatio)
|
||||||
this.predictedDenovixRatio = _predictedDenovixRatio
|
this.predictedDenovixRatio = _predictedDenovixRatio
|
||||||
@@ -574,7 +556,7 @@ class HemoCubeFragment : Fragment() {
|
|||||||
.toString() + ", " + currentDeviceData?.coefficients?.get(1).toString()
|
.toString() + ", " + currentDeviceData?.coefficients?.get(1).toString()
|
||||||
this.classificationResult = findResult(calculatedRatio)
|
this.classificationResult = findResult(calculatedRatio)
|
||||||
this.prdClassification = absorbanceBasedClassification(predictedDenovixRatio)
|
this.prdClassification = absorbanceBasedClassification(predictedDenovixRatio)
|
||||||
hemoCubeViewModel.messages.postValue("HB: $_hb4")
|
hemoCubeViewModel.messages.postValue(this.prdClassification)
|
||||||
this.errorMessages = allErrorMessages
|
this.errorMessages = allErrorMessages
|
||||||
this.resultData = deviceLog
|
this.resultData = deviceLog
|
||||||
this.batteryLevel = hemoCubeViewModel.getBatteryLevel().toString()
|
this.batteryLevel = hemoCubeViewModel.getBatteryLevel().toString()
|
||||||
|
|||||||
@@ -126,8 +126,6 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
testDetails?.abs2 = DataHolder.hemoCubeTestData?.abs2
|
testDetails?.abs2 = DataHolder.hemoCubeTestData?.abs2
|
||||||
testDetails?.abs3 = DataHolder.hemoCubeTestData?.abs3
|
testDetails?.abs3 = DataHolder.hemoCubeTestData?.abs3
|
||||||
testDetails?.abs4 = DataHolder.hemoCubeTestData?.abs4
|
testDetails?.abs4 = DataHolder.hemoCubeTestData?.abs4
|
||||||
testDetails?.hb3 = DataHolder.hemoCubeTestData?.hb3
|
|
||||||
testDetails?.hb4 = DataHolder.hemoCubeTestData?.hb4
|
|
||||||
testDetails?.deviceRatio = DataHolder.hemoCubeTestData?.deviceRatio
|
testDetails?.deviceRatio = DataHolder.hemoCubeTestData?.deviceRatio
|
||||||
testDetails?.predictedDenovixRatio = DataHolder.hemoCubeTestData?.predictedDenovixRatio
|
testDetails?.predictedDenovixRatio = DataHolder.hemoCubeTestData?.predictedDenovixRatio
|
||||||
testDetails?.calculatedRatio = DataHolder.hemoCubeTestData?.calculatedRatio
|
testDetails?.calculatedRatio = DataHolder.hemoCubeTestData?.calculatedRatio
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
android:id="@+id/tv_subtitle4"
|
android:id="@+id/tv_subtitle4"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="80dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="72dp"
|
android:layout_marginTop="72dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -208,15 +208,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_device_messages"
|
android:id="@+id/tv_device_messages"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="180dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginHorizontal="24dp"
|
||||||
android:layout_marginTop="72dp"
|
android:layout_marginTop="72dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="11sp"
|
android:textSize="11sp"
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/error_message" />
|
app:layout_constraintTop_toBottomOf="@id/error_message" />
|
||||||
|
|||||||
Reference in New Issue
Block a user