Merge branch 'hb3-hb4' into preprod-temp
This commit is contained in:
@@ -16,7 +16,7 @@ android {
|
|||||||
|
|
||||||
// prod - production, preprod - preproduction, quality - qc
|
// prod - production, preprod - preproduction, quality - qc
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "in.sminnovations.hpostesting"
|
applicationId "in.sminnovations.hpostesting.quality"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 56
|
versionCode 56
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ object Constants {
|
|||||||
"HC-V1-020",
|
"HC-V1-020",
|
||||||
"HCV-000-3001",
|
"HCV-000-3001",
|
||||||
"HCV-000-3002",
|
"HCV-000-3002",
|
||||||
|
<<<<<<< HEAD
|
||||||
"HCV-000-3003",
|
"HCV-000-3003",
|
||||||
"HCV-000-3004",
|
"HCV-000-3004",
|
||||||
"HCV-000-3005",
|
"HCV-000-3005",
|
||||||
@@ -74,6 +75,9 @@ object Constants {
|
|||||||
"HCV-000-3008",
|
"HCV-000-3008",
|
||||||
"HCV-000-3009",
|
"HCV-000-3009",
|
||||||
"HCV-000-3010"
|
"HCV-000-3010"
|
||||||
|
=======
|
||||||
|
"devuser",
|
||||||
|
>>>>>>> hb3-hb4
|
||||||
)
|
)
|
||||||
|
|
||||||
const val password = "SMI@12345"
|
const val password = "SMI@12345"
|
||||||
@@ -107,13 +111,28 @@ object Constants {
|
|||||||
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
|
listOf(1.0, 0.0) // LED4, 560nm
|
||||||
),
|
),
|
||||||
"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
|
listOf(1.0, 0.0) // LED4, 560nm
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
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(42.241, -24.105), // 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(
|
"HCV-000-3003" to listOf(
|
||||||
listOf(0.723142, -0.09135), // LED1, 435nm
|
listOf(0.723142, -0.09135), // LED1, 435nm
|
||||||
@@ -169,6 +188,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(
|
"HCV-000-3001" to listOf(
|
||||||
listOf(20000, 25074),
|
listOf(20000, 25074),
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
|||||||
import com.google.android.datatransport.runtime.dagger.Provides
|
import com.google.android.datatransport.runtime.dagger.Provides
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class], version = 13, exportSchema = false)
|
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class], version = 13, exportSchema = false)
|
||||||
|
=======
|
||||||
|
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class], version = 12, exportSchema = false)
|
||||||
|
>>>>>>> hb3-hb4
|
||||||
@TypeConverters(Converters::class)
|
@TypeConverters(Converters::class)
|
||||||
abstract class MyDatabase : RoomDatabase() {
|
abstract class MyDatabase : RoomDatabase() {
|
||||||
abstract fun userDao(): UserDao
|
abstract fun userDao(): UserDao
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ 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,
|
||||||
|
|||||||
@@ -502,6 +502,14 @@ class HemoCubeFragment : Fragment() {
|
|||||||
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(3)?.get(1)
|
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(3)?.get(1)
|
||||||
fittedAbs4 = gradient?.times(led4Average)?.plus(constant!!)!!
|
fittedAbs4 = gradient?.times(led4Average)?.plus(constant!!)!!
|
||||||
|
|
||||||
|
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) {
|
||||||
@@ -549,6 +557,8 @@ 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
|
||||||
@@ -556,7 +566,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(this.prdClassification)
|
hemoCubeViewModel.messages.postValue("Hb3: $_hb3,\n Hb4: $_hb4")
|
||||||
this.errorMessages = allErrorMessages
|
this.errorMessages = allErrorMessages
|
||||||
this.resultData = deviceLog
|
this.resultData = deviceLog
|
||||||
this.batteryLevel = hemoCubeViewModel.getBatteryLevel().toString()
|
this.batteryLevel = hemoCubeViewModel.getBatteryLevel().toString()
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user