Compare commits
4 Commits
usb_releas
...
2.1.128
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63891fdade | ||
|
|
1400f71d61 | ||
|
|
70ba5077d6 | ||
|
|
179752b0b0 |
@@ -19,8 +19,8 @@ android {
|
||||
applicationId "in.sminnovations.hpostesting.dev"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 127
|
||||
versionName "2.1.127"
|
||||
versionCode 128
|
||||
versionName "2.1.128"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 127,
|
||||
"versionName": "2.1.127",
|
||||
"versionCode": 128,
|
||||
"versionName": "2.1.128",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -28,7 +28,7 @@ object Constants {
|
||||
const val DOCUMENT_ID_FOR_UPDATE ="2o71vBKLqdgEKYtFG8Lb"
|
||||
const val ABHA_APP_PACKAGE = "in.ndhm.phr"
|
||||
|
||||
const val MOLBIO_INTEGRATION = true
|
||||
const val MOLBIO_INTEGRATION = false
|
||||
const val FIREBASE_INTEGRATION = true
|
||||
const val deviceProvisionEmail = "HPOS_provisioner@bigtec.co.in"
|
||||
const val deviceProvisionPassword = "f2ab0e7f9d69"
|
||||
|
||||
@@ -35,6 +35,8 @@ enum class TestStatus(val code: Double) {
|
||||
BUFFER_PRINT_STARTED(6.0),
|
||||
BUFFER_PRINT_COMPLETED(7.0),
|
||||
SAMPLE_STARTED(8.0),
|
||||
CUVETTE_ABSENTT(30.2),
|
||||
CUVETTE_PRESENTT(30.1),
|
||||
SAMPLE_COMPLETED(9.0),
|
||||
SAMPLE_PRINT_STARTED(10.0),
|
||||
SAMPLE_PRINT_COMPLETED(11.0),
|
||||
|
||||
@@ -58,7 +58,7 @@ class ActivitiesFragment : Fragment() {
|
||||
|
||||
if (userData.isNotEmpty()) {
|
||||
userData.forEach { user ->
|
||||
if(isBetween15And30Minutes(user.incubationTime) > 30 && user.testStatus == false){
|
||||
if((isBetween15And30Minutes(user.incubationTime) > 30 || isBetween15And30Minutes(user.incubationTime) < 0) && user.testStatus == false){
|
||||
hemoCubeViewModel.deleteByStatus()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -862,7 +862,8 @@ class HomeFragment : Fragment() {
|
||||
// )
|
||||
Toast.makeText(requireContext(), "Successfully added- $userId", Toast.LENGTH_SHORT).show()
|
||||
binding.userId.setText("")
|
||||
binding.etBloodGroup.clearListSelection()
|
||||
binding.age.setText("")
|
||||
binding.etBloodGroup.setText("")
|
||||
// val userData = UserData(_id = userId)
|
||||
// DataHolder.selectedTest = userData
|
||||
// findNavController().navigate(R.id.action_nav_home_to_mainActivity)
|
||||
|
||||
@@ -134,7 +134,7 @@ class PrefsFragment: PreferenceFragmentCompat(){
|
||||
|
||||
// App Version Preference
|
||||
val appVersionPreference = Preference(requireContext())
|
||||
appVersionPreference.title = "App Version"
|
||||
appVersionPreference.title = "App Version SMI"
|
||||
appVersionPreference.summary =
|
||||
getAppVersion(requireContext()) + " [ " + getAppEnvironment(requireContext()) + " ]"
|
||||
|
||||
|
||||
@@ -117,10 +117,13 @@ class HBTestFragment : Fragment() {
|
||||
testDetails.testTime = SimpleDateFormat(
|
||||
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
|
||||
).format(Calendar.getInstance().time)
|
||||
//Toast.makeText(requireContext(), "deviceID"+deviceId, Toast.LENGTH_LONG).show()
|
||||
hBTestViewModel.uploadFirebaseQc(testDetails)
|
||||
}
|
||||
binding.btnBuffer.setOnClickListener {
|
||||
binding.btnBuffer.visibility = View.GONE
|
||||
binding.btnSample.isEnabled = false
|
||||
binding.btnSample.isClickable = false
|
||||
hBTestViewModel.messages.postValue("Buffer Started")
|
||||
runBCommand()
|
||||
}
|
||||
@@ -174,7 +177,6 @@ class HBTestFragment : Fragment() {
|
||||
override fun onUsbRead(data: ByteArray?) {
|
||||
data?.let {
|
||||
val stringData = String(it)
|
||||
deviceId = stringData
|
||||
hBTestViewModel.messages.postValue(stringData)
|
||||
binding.tvSubtitle4.text = stringData
|
||||
}
|
||||
@@ -224,7 +226,12 @@ class HBTestFragment : Fragment() {
|
||||
}
|
||||
})
|
||||
}
|
||||
fun extractV2HardwareId(input: String): String? {
|
||||
val pattern = Regex("SNS\\s*(.*?)\\s*SNE")
|
||||
val matchResult: MatchResult? = pattern.find(input)
|
||||
|
||||
return matchResult?.groups?.get(1)?.value
|
||||
}
|
||||
private fun listenToHemoCube() {
|
||||
|
||||
val fullReadOutput = StringBuilder()
|
||||
@@ -240,10 +247,10 @@ class HBTestFragment : Fragment() {
|
||||
resultData += stringData
|
||||
hBTestViewModel.messages.postValue(resultData)
|
||||
// binding.tvSubtitle4.text = resultData
|
||||
if (stringData.contains("SN")) {
|
||||
if (stringData.contains("SNE")) {
|
||||
val slData = stringData.split(" ")
|
||||
if (slData.size > 1) {
|
||||
val hardwareId = slData[1].trim()
|
||||
deviceId = extractV2HardwareId(resultData).toString()
|
||||
hBTestViewModel.messages.postValue("Place buffer and click below button to start test")
|
||||
// with(sharedPreferences.edit()) {
|
||||
// putString(Constants.DEVICE_ID, hardwareId)
|
||||
|
||||
@@ -87,6 +87,8 @@ class HemoCubeFragment : Fragment() {
|
||||
private var checkCuvette = false
|
||||
private var checkRefreshCuvette = false
|
||||
private var checkCuvetteSam = false
|
||||
private var checkSubmit = false
|
||||
private var submitClick = false
|
||||
private var sampleClick = false
|
||||
private var refreshClick = false
|
||||
private lateinit var binding: FragmentHemoCubeReferenceBinding
|
||||
@@ -182,23 +184,31 @@ class HemoCubeFragment : Fragment() {
|
||||
binding.tvSubtitle4.movementMethod = ScrollingMovementMethod()
|
||||
binding.tvDeviceMessages.movementMethod = ScrollingMovementMethod()
|
||||
binding.btnSubmit.setOnClickListener {
|
||||
with(sharedPreferences.edit()) {
|
||||
putBoolean(Constants.QUICK_CAPTURE, false)
|
||||
apply()
|
||||
submitClick = true
|
||||
if(checkSubmit){
|
||||
with(sharedPreferences.edit()) {
|
||||
putBoolean(Constants.QUICK_CAPTURE, false)
|
||||
apply()
|
||||
}
|
||||
if(DataHolder.hemoCubeTestData!!.classificationResult != "Invalid"){
|
||||
DataHolder.sampleReadCounter++
|
||||
}
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
activity?.runOnUiThread {
|
||||
Log.d("HemoCubeFragment","Test Process completed, result saved")
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
binding.btnSubmit.visibility = View.GONE
|
||||
}
|
||||
hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
||||
isOnline, true, sharedPreferences.getString(Constants.KIT_NUMBER, ""),quickCapture
|
||||
)
|
||||
}else{
|
||||
checkCuvettePresence()
|
||||
binding.btnSubmit.isEnabled = true
|
||||
binding.btnSubmit.isClickable = true
|
||||
}
|
||||
if(DataHolder.hemoCubeTestData!!.classificationResult != "Invalid"){
|
||||
DataHolder.sampleReadCounter++
|
||||
}
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
activity?.runOnUiThread {
|
||||
Log.d("HemoCubeFragment","Test Process completed, result saved")
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
binding.btnSubmit.visibility = View.GONE
|
||||
}
|
||||
hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
||||
isOnline, true, sharedPreferences.getString(Constants.KIT_NUMBER, ""),quickCapture
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
binding.tvTitle2.visibility = View.GONE
|
||||
@@ -664,6 +674,21 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
showRetryButtonForCuvette()
|
||||
}
|
||||
resultData.contains("#CIN") && this.submitClick && this.testStatusCode < TestStatus.CUVETTE_PRESENTT.code -> {
|
||||
hemoCubeViewModel.messages.postValue(getString(R.string.cuvette_presentt))
|
||||
this.testStatusCode = TestStatus.CUVETTE_PRESENTT.code
|
||||
activity?.runOnUiThread {
|
||||
binding.testing.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
resultData.contains("#AIN") && this.submitClick && this.testStatusCode <= TestStatus.CUVETTE_ABSENTT.code -> {
|
||||
hemoCubeViewModel.messages.postValue(getString(R.string.cuvette_absentt))
|
||||
this.testStatusCode = TestStatus.CUVETTE_ABSENTT.code
|
||||
activity?.runOnUiThread {
|
||||
checkSubmit = true
|
||||
binding.testing.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
resultData.contains("#BS") && this.testStatusCode < TestStatus.BUFFER_STARTED.code -> {
|
||||
hemoCubeViewModel.messages.postValue(getString(R.string.buffer_started))
|
||||
this.testStatusCode = TestStatus.BUFFER_STARTED.code
|
||||
@@ -735,6 +760,7 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
(resultData.contains("#SC") || resultData.contains("#SC1")) && this.testStatusCode < TestStatus.SAMPLE_COMPLETED.code -> {
|
||||
this.testStatusCode = TestStatus.SAMPLE_COMPLETED.code
|
||||
activity?.runOnUiThread {
|
||||
@@ -748,6 +774,7 @@ class HemoCubeFragment : Fragment() {
|
||||
fetchResult()
|
||||
}
|
||||
|
||||
|
||||
resultData.contains("ovf") -> {
|
||||
activity?.runOnUiThread {
|
||||
binding.testing.visibility = View.GONE
|
||||
@@ -1354,7 +1381,7 @@ class HemoCubeFragment : Fragment() {
|
||||
"%.3f".format(
|
||||
borderlineMetric
|
||||
)
|
||||
}"
|
||||
} \n Remove Cuvette & Click Submit"
|
||||
)
|
||||
if (DataHolder.hemoCubeTestData?.testType == "HB")
|
||||
hemoCubeViewModel.messages.postValue("Hb: $calculatedHb4")
|
||||
@@ -1446,6 +1473,24 @@ class HemoCubeFragment : Fragment() {
|
||||
return "Positive for Sickle Cell. Confirm with HPLC"
|
||||
}
|
||||
}
|
||||
// if (deviceRatioClass == "Negative Borderline") {
|
||||
// if (borderlineMetric < negativeBoderLine10mm1){//1.34
|
||||
// return "Sickle Cell Trait"
|
||||
// }else if(borderlineMetric > negativeBoderLine10mm1){
|
||||
// return "Normal"
|
||||
// }else if(borderlineMetric == negativeBoderLine10mm1){
|
||||
// return "Sickle Cell Trait"
|
||||
// }
|
||||
// }
|
||||
// if (deviceRatioClass == "Positive for Sickle Cell. HPLC for Confirmation") {
|
||||
// if (borderlineMetric < positiveBoderLine10mm1){//1.34
|
||||
// return "Sickle Cell Disease"
|
||||
// }else if(borderlineMetric > positiveBoderLine10mm1){
|
||||
// return "Sickle Cell Trait"
|
||||
// }else if(borderlineMetric == positiveBoderLine10mm1){
|
||||
// return "Sickle Cell Disease"
|
||||
// }
|
||||
// }
|
||||
}else if(cuvetteSize == "2mm"){
|
||||
if (deviceRatioClass == "Negative Borderline") {
|
||||
if (borderlineMetric < negativeBoderLine2mm1){//1.34
|
||||
|
||||
@@ -289,6 +289,8 @@
|
||||
<string name="check_cuvette">Checking cuvette presence</string>
|
||||
<string name="cuvette_present">Cuvette present</string>
|
||||
<string name="cuvette_absent">Cuvette absent</string>
|
||||
<string name="cuvette_presentt">Cuvette Present , Please Remove Cuvette And Try Again</string>
|
||||
<string name="cuvette_absentt">Cuvette Absent,Now You Can Submit</string>
|
||||
<string name="retry">Retry</string>
|
||||
<string name="Firefox">Firefox</string>
|
||||
<string name="Files">Files</string>
|
||||
|
||||
@@ -288,6 +288,8 @@
|
||||
<string name="check_cuvette">ಕುವೆಟ್ ಇರುವಿಕೆಯನ್ನು ಪರಿಶೀಲಿಸಲಾಗುತ್ತಿದೆ</string>
|
||||
<string name="cuvette_present">ಕುವೆಟ್ಟೆ ಇರುತ್ತದೆ</string>
|
||||
<string name="cuvette_absent">ಕುವೆಟ್ಟೆ ಇರುವುದಿಲ್ಲ </string>
|
||||
<string name="cuvette_presentt">Cuvette Present , Please Remove Cuvette And Try Again</string>
|
||||
<string name="cuvette_absentt">Cuvette Absent,Now You Can Submit</string>
|
||||
<string name="retry">ಮರುಪ್ರಯತ್ನಿಸಿ</string>
|
||||
<string name="Firefox">ಫೈರ್ಫಾಕ್ಸ್</string>
|
||||
<string name="Files">ಫೈಲ್</string>
|
||||
|
||||
@@ -291,6 +291,8 @@
|
||||
<string name="check_cuvette">Checking cuvette presence</string>
|
||||
<string name="cuvette_present">Cuvette present , you can start the test</string>
|
||||
<string name="cuvette_absent">Cuvette is absent , please place the cuvette and retry again</string>
|
||||
<string name="cuvette_presentt">Cuvette Present , Please Remove Cuvette And Try Again</string>
|
||||
<string name="cuvette_absentt">Cuvette Absent,Now You Can Submit</string>
|
||||
<string name="retry">Retry again</string>
|
||||
<string name="usb_terminal">Usb Terminal</string>
|
||||
<string name="menu_about">About</string>
|
||||
|
||||
3768
hs_err_pid3592.log
Normal file
3768
hs_err_pid3592.log
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user