Compare commits

..

30 Commits

Author SHA1 Message Date
Kaif
75875b9e4f CSV Download 2023-12-14 13:59:48 +05:30
Mariya
e7600dafec gradle version changed 2023-12-14 12:43:10 +05:30
Mariya
d6b3df25f8 gradle version changed 2023-12-13 20:53:34 +05:30
Mariya
0d7e8b0cd0 Merge remote-tracking branch 'origin/preprod' into preprod 2023-12-13 18:57:03 +05:30
Mariya
3c8570c46b gradle version changed 2023-12-13 18:56:40 +05:30
Pritimay Sarkar
96f9d4d6da coeffs for dev4 2023-12-13 18:55:41 +05:30
Mariya
e7505077ce Merge remote-tracking branch 'origin/preprod' into preprod
# Conflicts:
#	app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt
2023-12-12 12:21:52 +05:30
Kaif
41e30cf178 Incremented the version number for giving testing release 2023-12-08 13:59:07 +05:30
Pritimay Sarkar
a34c095fde Merge remote-tracking branch 'origin/Feature_Develop_the_feature_to_shift_between_multiple_languages_in_testing_app' into preprod 2023-12-08 13:55:07 +05:30
Mariya
80fa523ec9 String Issues fixed 2023-12-05 17:57:32 +05:30
Mariya
7a2e5ead51 String Issues fixed 2023-12-05 17:53:46 +05:30
Mariya
f109c52288 app Build added 2023-12-05 17:50:46 +05:30
Mariya
a3a5c0d6fb pending strings added 2023-12-04 15:49:39 +05:30
Kaif
fb5e6f3b49 Fixed string error 2023-12-01 16:22:13 +05:30
Kaif
8a22b44496 Added app version 2023-12-01 16:10:15 +05:30
Kaif
10d822c5d6 Kannada and Hindi language support added 2023-12-01 15:55:49 +05:30
Mariya
4a248f7c49 deleted unwanted codes 2023-12-01 12:23:44 +05:30
Mariya
2123b2a7b4 Merge remote-tracking branch 'origin/preprod' into preprod 2023-12-01 10:54:05 +05:30
Pritimay Sarkar
704223e403 Merge branch 'LanguageTranslation' into 'preprod'
Merge multi-lingual changes to preprod

See merge request sminnovations/hpos!15
2023-11-30 08:52:52 +00:00
Pritimay Sarkar
6097a05701 Merge branch 'preprod' into 'LanguageTranslation'
# Conflicts:
#   app/src/main/java/com/example/hpostesting/data/dao/MyDataBase.kt
#   app/src/main/java/com/example/hpostesting/presentation/KitScanActivity.kt
#   app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt
#   app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeViewModel.kt
2023-11-30 08:52:01 +00:00
Mariya
290bf77950 Merge remote-tracking branch 'origin/preprod' into preprod 2023-11-30 13:38:13 +05:30
Mariya
ad595a6299 pending translation strings of hemocube fragment added 2023-11-30 13:21:02 +05:30
Mariya
22bf66fc94 kannada and hindi version of strings added 2023-11-29 15:51:38 +05:30
Mariya
1dd66bcd6e kannada and hindi version of strings added 2023-11-28 15:39:57 +05:30
Pritimay Sarkar
a02ba3e9ea release 2.1.39 with updated coeffs for dev2 2023-11-28 12:05:06 +05:30
Pritimay Sarkar
457c652161 add low Hb check and log errors 2023-11-27 10:23:44 +05:30
Mariya
5bebd88dfd Merge remote-tracking branch 'origin/preprod' into preprod 2023-11-24 11:36:20 +05:30
Pritimay Sarkar
6fa5e760c1 Merge branch 'Bug_Entering_a_new_kit_number_through_the_home_screen_triggers_an_invalid_message' into preprod 2023-11-22 10:37:54 +05:30
Pritimay Sarkar
8940352e05 prior testing related changes for clinical validation 2023-11-22 10:36:59 +05:30
Kaif
28bd9cbd43 Kit number invalid error fixed 2023-11-20 14:14:19 +05:30
37 changed files with 1527 additions and 600 deletions

View File

@@ -19,8 +19,8 @@ android {
applicationId "in.sminnovations.hpostesting"
minSdk 21
targetSdk 34
versionCode 30
versionName "2.1.30"
versionCode 51
versionName "2.1.51"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -49,9 +49,14 @@ android {
abortOnError false
checkReleaseBuilds false
}
packagingOptions {
exclude 'mockito-extensions/org.mockito.plugins.MockMaker'
}
}
dependencies {
implementation "com.google.dagger:hilt-android:2.46"
kapt "com.google.dagger:hilt-android-compiler:2.46"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
@@ -75,6 +80,8 @@ dependencies {
implementation 'com.google.android.things:androidthings:1.0'
implementation 'com.google.firebase:firebase-appdistribution:16.0.0-beta11'
implementation("com.google.firebase:firebase-appdistribution-api-ktx:16.0.0-beta11")
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
// Testing
@@ -86,17 +93,17 @@ dependencies {
androidTestImplementation 'org.mockito:mockito-android:3.12.4'
androidTestImplementation 'org.mockito:mockito-inline:3.12.4'
testImplementation "androidx.arch.core:core-testing:2.2.0"
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation 'com.opencsv:opencsv:4.6'
implementation 'com.github.mik3y:usb-serial-for-android:3.5.1'
implementation "androidx.fragment:fragment-ktx:1.6.1"
implementation "androidx.fragment:fragment-ktx:1.6.2"
// CSV read, write
implementation 'com.opencsv:opencsv:4.6'
implementation 'com.opencsv:opencsv:5.9'
// Barcode scanner
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
@@ -105,25 +112,27 @@ dependencies {
implementation 'com.google.android.gms:play-services-code-scanner:16.1.0'
//Room
implementation "androidx.room:room-ktx:2.6.0-rc01"
implementation "androidx.room:room-runtime:2.6.0-rc01"
kapt ("androidx.room:room-compiler:2.6.0-rc01")
implementation "androidx.room:room-ktx:2.6.0"
implementation "androidx.room:room-runtime:2.6.0"
kapt ("androidx.room:room-compiler:2.6.0")
//image
implementation 'com.github.bumptech.glide:glide:4.13.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
// Navigation Component
implementation "androidx.navigation:navigation-fragment-ktx:2.7.3"
implementation "androidx.navigation:navigation-ui-ktx:2.7.3"
implementation "androidx.navigation:navigation-fragment-ktx:2.7.5"
implementation "androidx.navigation:navigation-ui-ktx:2.7.5"
//Dagger - Hilt
implementation "com.google.dagger:hilt-android:2.46"
kapt "com.google.dagger:hilt-android-compiler:2.46"
kapt "androidx.hilt:hilt-compiler:1.0.0"
kapt "androidx.hilt:hilt-compiler:1.1.0"
// Retrofit + GSON
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "androidx.preference:preference-ktx:1.2.1"
}

View File

@@ -61,7 +61,8 @@
android:name="com.example.hpostesting.presentation.dashboard.DashboardActivity"
android:exported="false"
android:label="@string/title_activity_dashboard"
android:theme="@style/Theme.HPOS.NoActionBar" />
android:theme="@style/Theme.HPOS.NoActionBar"
tools:ignore="MissingClass" />
<service
android:name="com.example.hpostesting.presentation.testRight.UsbService"

View File

@@ -80,34 +80,58 @@ object Constants {
val DEVICE_CONFIGURATION: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
"HCV-000-3001" to listOf(
listOf(1.264817, -0.85965), // LED1, 435nm
listOf(1.313, -0.89), // LED1, 435nm
listOf(0.581462456, -0.58502), // LED2, 415nm
listOf(0.184991, 0.001704), // LED3, 555nm
listOf(0.2012, 0.0092), // LED3, 555nm
listOf(1.0, 0.0) // LED4
),
"HCV-000-3002" to listOf(
listOf(1.264817, -0.85965),
listOf(0.581462456, -0.58502),
listOf(0.184991, 0.001704),
listOf(1.0, 0.0)
listOf(0.723142, -0.09135), // LED1, 435nm
listOf(0.581462456, -0.58502), // LED2, 415nm
listOf(0.1964, 0.011565), // LED3, 555nm
listOf(1.0, 0.0) // LED4
),
"HCV-000-3003" to listOf(
listOf(0.723142, -0.09135), // LED1, 435nm
listOf(0.581462456, -0.58502), // LED2, 415nm
listOf(0.1964, 0.011565), // LED3, 555nm
listOf(1.0, 0.0) // LED4
),
"HCV-000-3004" to listOf(
listOf(1.6837, -1.1417), // LED1, 435nm
listOf(0.581462456, -0.58502), // LED2, 415nm
listOf(0.2241, -0.0106), // LED3, 555nm
listOf(1.0, 0.0) // LED4
),
)
const val INCUBATION_TIME_MIN = 15
const val INCUBATION_TIME_MAX = 30
const val INCUBATION_TIME_MIN = 0
const val INCUBATION_TIME_MAX = 1400
val BUFFER_INTENSITY_THRESHOLDS: Map<String, List<List<Int>>> = mapOf<String, List<List<Int>>>(
"HCV-000-3001" to listOf(
listOf(24000, 24500),
listOf(21000, 24500),
listOf(21000, 24500),
listOf(21000, 24500),
listOf(20000, 25074),
listOf(20000, 24596),
listOf(20000, 26065),
listOf(20000, 27093),
),
"HCV-000-3002" to listOf(
listOf(21000, 24500),
listOf(21000, 24500),
listOf(21000, 24500),
listOf(21000, 24500),
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
),
"HCV-000-3003" to listOf(
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
),
"HCV-000-3004" to listOf(
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
listOf(24500, 26250),
)
)
}

View File

@@ -0,0 +1,30 @@
package com.example.hpostesting.data.constant
import android.content.Context
import android.content.SharedPreferences
import java.util.Locale
object LanguageManager {
private const val LANGUAGE_PREF_KEY = "language_pref"
fun setLocale(context: Context, languageCode: String) {
val locale = Locale(languageCode)
Locale.setDefault(locale)
val resources = context.resources
val configuration = resources.configuration
configuration.setLocale(locale)
context.createConfigurationContext(configuration)
}
fun persistLanguagePreference(context: Context, languageCode: String) {
val prefs: SharedPreferences = context.getSharedPreferences("AppPrefs", Context.MODE_PRIVATE)
prefs.edit().putString(LANGUAGE_PREF_KEY, languageCode).apply()
}
fun getSavedLanguage(context: Context): String {
val prefs: SharedPreferences = context.getSharedPreferences("AppPrefs", Context.MODE_PRIVATE)
return prefs.getString(LANGUAGE_PREF_KEY, "en") ?: "en"
}
}

View File

@@ -23,4 +23,7 @@ interface HemoCubeDao {
@Query("UPDATE hemo_cube_test_table SET localFlag = :newValue WHERE _id = :id")
suspend fun updateFieldById(id: String, newValue: Boolean)
@Query("UPDATE hemo_cube_test_table SET isCSVCreated = :newValue WHERE _id = :id")
suspend fun updateCSVFieldById(id: String, newValue: Boolean)
}

View File

@@ -11,7 +11,7 @@ import com.example.hpostesting.data.model.patient.HemoCubeTestData
import com.google.android.datatransport.runtime.dagger.Provides
import javax.inject.Singleton
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class], version = 9, exportSchema = false)
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class], version = 12, exportSchema = false)
@TypeConverters(Converters::class)
abstract class MyDatabase : RoomDatabase() {
abstract fun userDao(): UserDao

View File

@@ -1,18 +1,21 @@
package com.example.hpostesting.data.datasource
import android.os.Environment
import com.example.hpostesting.data.model.patient.HemoCubeTestData
import com.opencsv.CSVWriter
import java.io.File
import java.io.FileWriter
import java.io.IOException
class LocalFileDataSource {
fun saveCsvToDisk(filepath: String, contents: ArrayList<Array<String>>){
fun saveCsvToDisk(filepath: String, contents: ArrayList<Array<String>>) {
val writer = CSVWriter(FileWriter(filepath))
writer.writeAll(contents) // data is adding to csv
writer.close()
}
fun saveTextToDisk(filepath: String, contents: String){
fun saveTextToDisk(filepath: String, contents: String) {
val writer = FileWriter(File(filepath))
writer.append(contents)
@@ -20,4 +23,138 @@ class LocalFileDataSource {
writer.close()
}
fun exportDataToCSV(
fileName: String, dataList: List<HemoCubeTestData>
): Boolean {
try {
val formattedFileName = fileName.replace(Regex("[^a-zA-Z0-9.-]"), "_") // Replace special characters with underscores
val filePath = File(getExternalStorageDirectory(), formattedFileName)
val writer = FileWriter(filePath)
val csvWriter = CSVWriter(writer)
// Write CSV header
val header = arrayOf(
"_id",
"name",
"incubationTime",
"bloodGroup",
"birthYear", // Include other fields from the data class
"state",
"abhaId",
"userImageURL",
"location",
"reportUploadTime",
"testType",
"testTime",
"testStatus",
"gender",
"localFlag", // Add more fields as necessary
"deviceId",
"appVersion",
"deviceSerialNumber",
"deviceType",
"kitSerial",
"resultData",
"led1Buffer",
"led2Buffer",
"led3Buffer",
"led4Buffer",
"led1Sample",
"led2Sample",
"led3Sample",
"led4Sample",
"led1Average",
"led2Average",
"led3Average",
"led4Average",
"abs1",
"abs2",
"abs3",
"abs4",
"deviceRatio",
"calculatedRatio",
"predictedDenovixRatio",
"coefficients",
"classificationResult",
"prdClassification",
"errorMessages",
"batteryLevel",
"batteryCapacity",
"batteryMaxCapacity",
"batteryTemperature",
"batteryVoltage"
)
csvWriter.writeNext(header)
// Write data rows
for (data in dataList) {
val row = arrayOf(
data._id,
data.name,
data.incubationTime,
data.bloodGroup,
data.birthYear, // Include other fields similarly
data.state,
data.abhaId,
data.userImageURL,
data.location?.toString(),
data.reportUploadTime ?: "",
data.testType ?: "",
data.testTime ?: "",
data.testStatus?.toString() ?: "",
data.gender,
data.localFlag.toString(),
data.deviceId ?: "",
data.appVersion ?: "",
data.deviceSerialNumber,
data.deviceType,
data.kitSerial,
data.resultData,
data.led1Buffer?.toString() ?: "",
data.led2Buffer?.toString() ?: "",
data.led3Buffer?.toString() ?: "",
data.led4Buffer?.toString() ?: "",
data.led1Sample?.toString() ?: "",
data.led2Sample?.toString() ?: "",
data.led3Sample?.toString() ?: "",
data.led4Sample?.toString() ?: "",
data.led1Average?.toString() ?: "",
data.led2Average?.toString() ?: "",
data.led3Average?.toString() ?: "",
data.led4Average?.toString() ?: "",
data.abs1?.toString() ?: "",
data.abs2?.toString() ?: "",
data.abs3?.toString() ?: "",
data.abs4?.toString() ?: "",
data.deviceRatio?.toString() ?: "",
data.calculatedRatio?.toString() ?: "",
data.predictedDenovixRatio?.toString() ?: "",
data.coefficients ?: "",
data.classificationResult,
data.prdClassification,
data.errorMessages,
data.batteryLevel,
data.batteryCapacity,
data.batteryMaxCapacity,
data.batteryTemperature,
data.batteryVoltage
)
csvWriter.writeNext(row)
}
writer.close()
return true
} catch (e: IOException) {
e.printStackTrace()
return false
}
}
private fun getExternalStorageDirectory(): File {
val folder = File(Environment.getExternalStorageDirectory(), "HposFolder")
if (!folder.exists()) {
folder.mkdirs()
}
return folder
}
}

View File

@@ -49,9 +49,11 @@ data class HemoCubeTestData(
var coefficients: String? = "",
var classificationResult: String = "",
var prdClassification: String = "",
var errorMessages: String = "",
var batteryLevel: String = "",
var batteryCapacity: String = "",
var batteryMaxCapacity: String = "",
var batteryTemperature: String = "",
var batteryVoltage: String = "",
var isCSVCreated: Boolean = false
)

View File

@@ -28,9 +28,7 @@ object AppModule {
fun provideMyDatabase(@ApplicationContext context: Context): MyDatabase {
return Room.databaseBuilder(
context, MyDatabase::class.java, "my_database"
)
.fallbackToDestructiveMigration()
.build()
).fallbackToDestructiveMigration().build()
}
@Provides
@@ -76,4 +74,10 @@ object AppModule {
fun provideRepository(): Repository {
return DatabaseRepository()
}
@Provides
@Singleton
fun provideLocalFileDataSource(): LocalFileDataSource {
return LocalFileDataSource()
}
}

View File

@@ -1,5 +1,6 @@
package com.example.hpostesting.presentation
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
@@ -10,7 +11,8 @@ import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.presentation.hemocube.HemocubeActivity
import com.example.hpostesting.presentation.testRight.TestRightActivity
import com.google.android.material.snackbar.Snackbar
@@ -32,7 +34,7 @@ class KitScanActivity : AppCompatActivity() {
ScanContract()
) { result: ScanIntentResult ->
if (result.contents.isNullOrEmpty()) {
Toast.makeText(this, "Cancelled: Unable to scan, Try Again!!", Toast.LENGTH_LONG).show()
Toast.makeText(this, R.string.cancelled_unable_scan, Toast.LENGTH_LONG).show()
} else {
Log.d(TAG, result.contents)
processScannedData(result.contents)
@@ -43,6 +45,12 @@ class KitScanActivity : AppCompatActivity() {
binding.nameEditText.setText(contents)
}
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -119,16 +127,25 @@ class KitScanActivity : AppCompatActivity() {
}
Toast.makeText(
applicationContext,
"Kit number is updated, Please Select user before starting test",
R.string.kit_updated,
Toast.LENGTH_SHORT
).show()
val i = Intent(applicationContext, DashboardActivity::class.java)
startActivity(i)
finish()
} else {
DataHolder.kitSerial = binding.nameEditText.text.toString()
DataHolder.selectedTest?.kitSerial = binding.nameEditText.text.toString()
with(sharedPreference.edit()) {
putString(Constants.KIT_NUMBER, binding.nameEditText.text.toString())
putInt(Constants.KIT_COUNT, 1)
apply()
}
moveToNext()
}
} else {
Toast.makeText(this, "Invalid KIT Number", Toast.LENGTH_LONG).show()
Toast.makeText(this, R.string.invalid_kit_number, Toast.LENGTH_LONG).show()
return@setOnClickListener
}
if (serialNumber.isNotEmpty() && checkDataNotNull() && isSerialValid(
@@ -144,7 +161,7 @@ class KitScanActivity : AppCompatActivity() {
}
moveToNext()
} else {
Toast.makeText(this, "Invalid KIT Number", Toast.LENGTH_LONG).show()
Toast.makeText(this, R.string.invalid_kit_number, Toast.LENGTH_LONG).show()
}
}
}
@@ -200,7 +217,7 @@ class KitScanActivity : AppCompatActivity() {
private fun checkDataNotNull(): Boolean {
return if (DataHolder.selectedTest?._id == null) {
Toast.makeText(
applicationContext, "Please Select patient before starting test", Toast.LENGTH_SHORT
applicationContext, R.string.select_patient, Toast.LENGTH_SHORT
).show()
val i = Intent(applicationContext, DashboardActivity::class.java)

View File

@@ -1,5 +1,6 @@
package com.example.hpostesting.presentation
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import android.Manifest
import android.content.*
import android.content.pm.PackageManager
@@ -9,8 +10,6 @@ import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
@@ -18,9 +17,9 @@ import androidx.core.content.ContextCompat
import androidx.core.view.get
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.data.model.patient.UserData
import com.example.hpostesting.data.model.test.TestType
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import com.google.android.gms.location.*
import com.google.android.material.snackbar.Snackbar
import com.google.firebase.crashlytics.FirebaseCrashlytics
@@ -46,6 +45,12 @@ class MainActivity : AppCompatActivity() {
}
}
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
@@ -138,7 +143,7 @@ class MainActivity : AppCompatActivity() {
else -> {
Log.d(TAG, "Device NOT Connected")
Toast.makeText(this, "Device Not Connected", Toast.LENGTH_SHORT).show()
Toast.makeText(this, R.string.device_not, Toast.LENGTH_SHORT).show()
DataHolder.usbConnected.value = false
null
}
@@ -226,7 +231,7 @@ class MainActivity : AppCompatActivity() {
) != PackageManager.PERMISSION_GRANTED
) {
// Handle location permission request if needed
Toast.makeText(this, "Please enable location services", Toast.LENGTH_SHORT).show()
Toast.makeText(this, R.string.enable_location, Toast.LENGTH_SHORT).show()
requestCoarseLocationPermission()
requestFineLocationPermission()
return
@@ -313,7 +318,7 @@ class MainActivity : AppCompatActivity() {
requestFineLocationPermission()
} else {
// Coarse location permission denied
Toast.makeText(this, "Coarse location permission denied", Toast.LENGTH_SHORT)
Toast.makeText(this, R.string.coarse_location_denied, Toast.LENGTH_SHORT)
.show()
}
}
@@ -324,7 +329,7 @@ class MainActivity : AppCompatActivity() {
getLocation()
} else {
// Fine location permission denied
Toast.makeText(this, "Fine location permission denied", Toast.LENGTH_SHORT)
Toast.makeText(this, R.string.location_denied, Toast.LENGTH_SHORT)
.show()
}
}

View File

@@ -1,6 +1,8 @@
package com.example.hpostesting.presentation
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import android.Manifest
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
@@ -13,11 +15,9 @@ import androidx.annotation.RequiresApi
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.util.MyUtils
import com.google.firebase.firestore.FirebaseFirestoreSettings
import com.google.firebase.firestore.ktx.firestore
import com.google.firebase.ktx.Firebase
import `in`.sminnovations.hpostesting.R
import `in`.sminnovations.hpostesting.databinding.ActivitySplashBinding
class SplashActivity : AppCompatActivity() {
@@ -34,6 +34,12 @@ class SplashActivity : AppCompatActivity() {
private var allPermissionsGranted = false
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivitySplashBinding.inflate(layoutInflater)
@@ -77,7 +83,7 @@ class SplashActivity : AppCompatActivity() {
} else {
Toast.makeText(
this,
"You must grant permission to access all files to use the app",
R.string.permission_grant,
Toast.LENGTH_SHORT
).show()
finish()
@@ -139,7 +145,7 @@ class SplashActivity : AppCompatActivity() {
if (allGranted) {
moveToLandingPage()
} else {
Toast.makeText(this, "All permissions are required to use the app.", Toast.LENGTH_SHORT).show()
Toast.makeText(this, R.string.permission_required, Toast.LENGTH_SHORT).show()
finish()
}
}

View File

@@ -1,5 +1,7 @@
package com.example.hpostesting.presentation.adapter
import android.content.Context
import android.content.res.Resources
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -14,11 +16,13 @@ import com.example.hpostesting.data.model.patient.HemoCubeTestData
import com.example.hpostesting.data.model.patient.UserData
import `in`.sminnovations.hpostesting.R
import `in`.sminnovations.hpostesting.databinding.OfflineUserListViewBinding
import org.apache.commons.collections4.MapUtils.getString
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Date
import java.util.Locale
class OfflineUserListAdapter(private val view: View, private val batLevel: Int) :
RecyclerView.Adapter<OfflineUserListAdapter.OfflineUserListViewHolder>() {
@@ -40,7 +44,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
}
val differ = AsyncListDiffer(this, differCallback)
private val context: Context? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): OfflineUserListViewHolder {
return OfflineUserListViewHolder(
OfflineUserListViewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
@@ -61,7 +65,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (batLevel < 40) {
Toast.makeText(
view.context,
"Battery level is low than 40%, please charge the device to continue testing",
R.string.low_battery_warning,
Toast.LENGTH_SHORT
).show()
return@setOnClickListener
@@ -70,7 +74,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (userList.testStatus!!) {
Toast.makeText(
view.context,
"Test has been already conducted for this user",
R.string.test_already_conducted,
Toast.LENGTH_SHORT
).show()
} else {
@@ -78,13 +82,13 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
if (isBetween15And30Minutes(userList.incubationTime) < Constants.INCUBATION_TIME_MIN) {
Toast.makeText(
view.context,
"Incubation has not completed 15 minutes",
R.string.incubation_not_completed,
Toast.LENGTH_SHORT
).show()
} else if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
Toast.makeText(
view.context,
"Incubation crossed 30 minutes, need to repeat the incubation",
R.string.incubation_crossed_30_minutes,
Toast.LENGTH_SHORT
).show()
} else {
@@ -99,7 +103,7 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
} else {
Toast.makeText(
view.context,
"Incubation not started for this user",
R.string.incubation_not_started,
Toast.LENGTH_SHORT
).show()
}

View File

@@ -70,10 +70,10 @@ class UserListAdapter(
Glide.with(view).load(model.userImageURL).into(userImage)
if (model.testStatus!!) {
teststatus.text = "Test concluded"
teststatus.text = view.context.getString(R.string.test_concluded)
} else {
teststatus.text = "Test is Pending"
teststatus.text = view.context.getString(R.string.test_pending)
}
holder.binding.btnBlood.setOnClickListener {
@@ -94,19 +94,19 @@ class UserListAdapter(
val builder = AlertDialog.Builder(context)
.setView(dialogView)
.setTitle("Add Blood Group")
.setTitle(R.string.blood_group)
val etBloodGroup = dialogView.findViewById<AutoCompleteTextView>(R.id.et_blood_group)
builder.setPositiveButton("OK") { dialog, which ->
builder.setPositiveButton(R.string.ok) { dialog, which ->
val bloodGroup = etBloodGroup.text.toString()
if (bloodGroup.equals("Select Blood Group") || bloodGroup.isNullOrBlank()) {
etBloodGroup.error = "Please enter your blood group"
Toast.makeText(
context,
"Please enter your blood group",
Toast.LENGTH_SHORT
).show()
if (bloodGroup.equals("Select Blood Group") ||bloodGroup.equals("ರಕ್ತ ಗುಂಪು ಆಯ್ಕೆಮಾಡಿ") || bloodGroup.isNullOrBlank()) {
if (view != null) {
etBloodGroup.error =view.context.getString(R.string.blood_group_error)
}
if (view != null) {
Toast.makeText(context, view.context.getString(R.string.blood_group_toast), Toast.LENGTH_SHORT).show()
}
} else {
// Check if hemoCubeViewModel and testDetails are not null
val db: FirebaseFirestore = FirebaseFirestore.getInstance()
@@ -125,27 +125,33 @@ class UserListAdapter(
).format(Calendar.getInstance().time).toString()
)
.addOnSuccessListener {
Toast.makeText(
context,
"Blood group updated successfully",
Toast.LENGTH_SHORT
).show()
if (view != null) {
Toast.makeText(
view.context,
context?.getString(R.string.blood_group_updated_successfully),
Toast.LENGTH_SHORT
).show()
}
btnBlood.visibility = View.GONE
}
.addOnFailureListener { e ->
Toast.makeText(
context,
"Failed to update blood group: ${e.message}",
Toast.LENGTH_SHORT
).show()
if (view != null) {
Toast.makeText(
view.context,
context?.getString(R.string.failed_to_update_blood_group),
Toast.LENGTH_SHORT
).show()
}
}
} catch (e: IndexOutOfBoundsException) {
// Handle the case where no documents are found for the specified ID
Toast.makeText(
context,
"No user data found for the specified ID",
Toast.LENGTH_SHORT
).show()
if (view != null) {
Toast.makeText(
view.context,
context?.getString(R.string.no_user_data_found),
Toast.LENGTH_SHORT
).show()
}
}
}
@@ -160,7 +166,7 @@ class UserListAdapter(
// Handle the selected blood group here
}
builder.setNegativeButton("Cancel") { dialog, which ->
builder.setNegativeButton(R.string.cancel) { dialog, which ->
dialog.dismiss()
}
@@ -193,7 +199,7 @@ class UserListAdapter(
if (batLevel < 40) {
Toast.makeText(
view.context,
"Battery level is low than 40%, please charge the device to continue testing",
context?.getString(R.string.low_battery_warning),
Toast.LENGTH_SHORT
).show()
return@setOnClickListener
@@ -202,21 +208,21 @@ class UserListAdapter(
if (model.testStatus!!) {
Toast.makeText(
view.context,
"Test has been already conducted for this user",
context?.getString(R.string.test_already_conducted),
Toast.LENGTH_SHORT
).show()
} else {
if (model.incubationTime != "") {
if (isBetween15And30Minutes(model.incubationTime) < 15) {
if (isBetween15And30Minutes(model.incubationTime) < 0) {
Toast.makeText(
view.context,
"Incubation has not completed 15 minutes",
context?.getString(R.string.incubation_not_completed),
Toast.LENGTH_SHORT
).show()
} else if (isBetween15And30Minutes(model.incubationTime) > 30) {
} else if (isBetween15And30Minutes(model.incubationTime) > 140000) {
Toast.makeText(
view.context,
"Incubation crossed 30 minutes, need to repeat the incubation",
context?.getString(R.string.incubation_crossed_30_minutes),
Toast.LENGTH_SHORT
).show()
} else {
@@ -227,7 +233,7 @@ class UserListAdapter(
} else {
Toast.makeText(
view.context,
"Incubation not started for this user",
context?.getString(R.string.incubation_not_started),
Toast.LENGTH_SHORT
).show()
}

View File

@@ -20,7 +20,6 @@ import com.example.hpostesting.data.model.patient.BufferCheckData
import com.example.hpostesting.data.model.patient.DeviceData
import com.example.hpostesting.data.model.patient.toHemoCubeTestData
import com.example.hpostesting.presentation.UsbServiceListener
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
import com.example.hpostesting.presentation.utils.MyDialogListener
import com.example.hpostesting.presentation.utils.UIUtils
@@ -73,7 +72,7 @@ class HemoCubeBufferCheckFragment : Fragment() {
listenToHemoCube()
startBufferProcess()
} else {
Toast.makeText(context, "Invalid KIT Number", Toast.LENGTH_LONG).show()
Toast.makeText(context, R.string.invalid_kit_number, Toast.LENGTH_LONG).show()
return@setOnClickListener
}
activity?.runOnUiThread {
@@ -108,17 +107,17 @@ class HemoCubeBufferCheckFragment : Fragment() {
hemoCubeViewModel.getDeviceData(sharedPreferences.getString(Constants.USER_ID, ""))
} else {
Toast.makeText(
requireContext(), "No internet connection avaiable", Toast.LENGTH_SHORT
requireContext(), R.string.internt_not, Toast.LENGTH_SHORT
).show()
}
isOnline = isNetworkAvailable
}
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
if (result == "Success") {
showToast("Kit result uploaded successfully")
showToast(R.string.kit_uploaded)
}
if (result == "Local") {
showToast("Kit result uploading failed, note it down manually")
showToast(R.string.kit_upload_failed)
}
binding.progressBar.visibility = View.GONE
@@ -152,7 +151,7 @@ class HemoCubeBufferCheckFragment : Fragment() {
}
})
} catch (e: Exception) {
showToast("test is going on")
showToast(R.string.test_ongoing)
Firebase.crashlytics.recordException(e)
}
}
@@ -270,17 +269,18 @@ class HemoCubeBufferCheckFragment : Fragment() {
return "NULL"
}
} catch (e: Exception) {
showToast("error while performing classification")
showToast(R.string.error_classification)
Firebase.crashlytics.recordException(e)
return "ERROR"
}
return "NULL"
}
private fun showToast(message: String) {
Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
private fun showToast(messageResId: Int) {
Toast.makeText(requireContext(), getString(messageResId), Toast.LENGTH_SHORT).show()
}
private fun startBufferProcess() {
(activity as HemocubeBufferCheckActivity).mService.sendAndListenToHemoCube(HemoCubeCommands.startBuffer,

View File

@@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.get
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
import com.example.hpostesting.presentation.testRight.UsbService
import com.hoho.android.usbserial.driver.UsbSerialDriver
@@ -73,6 +74,12 @@ open class HemocubeBufferCheckActivity : AppCompatActivity() {
}
}
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityHemocubeBinding.inflate(layoutInflater)
@@ -92,7 +99,7 @@ open class HemocubeBufferCheckActivity : AppCompatActivity() {
} else {
myMenu?.get(0)?.icon =
ContextCompat.getDrawable(this, R.drawable.ic_baseline_usb_off_24)
Toast.makeText(this, "Device is Disconnected", Toast.LENGTH_SHORT).show()
Toast.makeText(this, R.string.device_disconnected, Toast.LENGTH_SHORT).show()
}
}
}
@@ -103,7 +110,7 @@ open class HemocubeBufferCheckActivity : AppCompatActivity() {
val availableDrivers = UsbSerialProber.getDefaultProber().findAllDrivers(manager)
if (availableDrivers.isEmpty()) {
Toast.makeText(this, "No device found", Toast.LENGTH_SHORT).show()
Toast.makeText(this, R.string.no_device_found, Toast.LENGTH_SHORT).show()
} else {
mDriver = availableDrivers[0]
mConnection = manager.openDevice(mDriver.device)

View File

@@ -1,5 +1,6 @@
package com.example.hpostesting.presentation.dashboard
import android.content.Context
import android.os.Bundle
import android.view.Menu
import android.widget.Toast
@@ -10,13 +11,11 @@ import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import com.example.hpostesting.data.constant.LanguageManager
import com.google.android.material.navigation.NavigationView
import com.google.firebase.appdistribution.FirebaseAppDistribution
import com.google.firebase.appdistribution.FirebaseAppDistributionException
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.crashlytics.ktx.crashlytics
//import com.google.firebase.appdistribution.FirebaseAppDistribution
//import com.google.firebase.appdistribution.FirebaseAppDistributionException
import dagger.hilt.android.AndroidEntryPoint
import `in`.sminnovations.hpostesting.R
import `in`.sminnovations.hpostesting.databinding.ActivityDashboardBinding
@@ -27,6 +26,12 @@ class DashboardActivity : AppCompatActivity() {
private lateinit var appBarConfiguration: AppBarConfiguration
private lateinit var binding: ActivityDashboardBinding
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -59,7 +64,6 @@ class DashboardActivity : AppCompatActivity() {
return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
}
override fun onResume() {
super.onResume()

View File

@@ -8,6 +8,7 @@ import android.content.Intent
import android.content.SharedPreferences
import android.os.BatteryManager
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -72,6 +73,7 @@ class HomeFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
checkUnprocessedCSVData()
viewModel.allUserData.observe(viewLifecycleOwner) { userData ->
deleteIncompleteRegistrations(userData)
}
@@ -107,13 +109,11 @@ class HomeFragment : Fragment() {
hemoCubeViewModel.fireBaseBulkUpload.observe(viewLifecycleOwner) { result ->
if (result == "Success") {
Toast.makeText(
requireContext(),
"Test Results Uploaded Successfully",
Toast.LENGTH_SHORT
requireContext(), R.string.test_upload, Toast.LENGTH_SHORT
).show()
}
if (result == "Error") {
Toast.makeText(requireContext(), "Test Results Upload Failed", Toast.LENGTH_SHORT)
Toast.makeText(requireContext(), R.string.test_upload_failed, Toast.LENGTH_SHORT)
.show()
}
}
@@ -132,6 +132,9 @@ class HomeFragment : Fragment() {
startActivity(Intent(requireContext(), KitScanActivity::class.java))
requireActivity().finish()
}
binding.downloadCSV.setOnClickListener {
showDownloadDialog(requireContext())
}
}
private fun setUserId() {
@@ -141,7 +144,9 @@ class HomeFragment : Fragment() {
if (userId.length >= 18 && !bloodGroup.equals("Select Blood Group") || !bloodGroup.isNullOrBlank()) {
hemoCubeViewModel.addUser(
HemoCubeTestData(
_id = userId, bloodGroup = bloodGroup.toString(), incubationTime = SimpleDateFormat(
_id = userId,
bloodGroup = bloodGroup.toString(),
incubationTime = SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time).toString()
)
@@ -182,8 +187,12 @@ class HomeFragment : Fragment() {
rvAdapter = view?.let {
UserListAdapter(
requireContext(), hemoCubeViewModel, recyclerViewOptions,
it, batLevel, requireActivity()
requireContext(),
hemoCubeViewModel,
recyclerViewOptions,
it,
batLevel,
requireActivity()
)
}!!
binding.rvOrder.adapter = rvAdapter
@@ -203,14 +212,14 @@ class HomeFragment : Fragment() {
private fun logoutUser(context: Context) {
val builder = AlertDialog.Builder(context)
builder.setTitle("Log Out")
builder.setMessage("Do you want to LogOut the Application?")
builder.setPositiveButton("Yes") { dialog, _ ->
builder.setTitle(R.string.log_out)
builder.setMessage(R.string.do_log_out)
builder.setPositiveButton(R.string.yes) { dialog, _ ->
saveUserId("")
findNavController().navigate(R.id.action_nav_home_to_loginFragment)
dialog.dismiss()
}
builder.setNegativeButton("No") { dialog, _ ->
builder.setNegativeButton(R.string.no) { dialog, _ ->
dialog.dismiss()
}
@@ -308,11 +317,19 @@ class HomeFragment : Fragment() {
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
val uploadDataVisibility =
if (userDataList.any { !it.localFlag && it.testStatus == true}) View.VISIBLE else View.GONE
if (userDataList.any { !it.localFlag && it.testStatus == true }) View.VISIBLE else View.GONE
binding.uploadData.visibility = uploadDataVisibility
}
}
private fun checkUnprocessedCSVData() {
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
val downloadDataVisibility =
if (userDataList.any { !it.isCSVCreated && it.testStatus == true }) View.VISIBLE else View.GONE
binding.downloadCSV.visibility = downloadDataVisibility
}
}
private fun showUploadDialog(context: Context) {
val builder = AlertDialog.Builder(context)
builder.setTitle(R.string.upload_db_registration_title)
@@ -330,6 +347,23 @@ class HomeFragment : Fragment() {
dialog.show()
}
private fun showDownloadDialog(context: Context) {
val builder = AlertDialog.Builder(context)
builder.setTitle(R.string.download_db_registration_title)
builder.setMessage(R.string.download_db_registration_message)
builder.setPositiveButton(R.string.downloadcsv) { dialog, _ ->
downloadLocalDBData(dialog)
}
builder.setNegativeButton(R.string.cancel) { dialog, _ ->
dialog.dismiss()
}
val dialog = builder.create()
dialog.show()
}
private fun uploadLocalDBData(dialog: DialogInterface) {
viewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
if (userDataList.isEmpty()) {
@@ -357,6 +391,28 @@ class HomeFragment : Fragment() {
}
}
private fun downloadLocalDBData(dialog: DialogInterface) {
hemoCubeViewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
val downloadList = mutableListOf<HemoCubeTestData>()
userDataList.forEach { userData ->
if (!userData.isCSVCreated) {
downloadList.add(userData) // Add the userData to downloadList
}
}
if (downloadList.isNotEmpty()) {
// Call ViewModel function to create CSV with filtered data
hemoCubeViewModel.createCSV(downloadList, requireContext())
Toast.makeText(requireContext(), "Done", Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(requireContext(), "Failed", Toast.LENGTH_SHORT).show()
}
dialog.dismiss()
}
}
private fun deleteIncompleteRegistrations(userDataList: List<UserData>) {
userDataList.forEach { userData ->
if (userData.csvPath.isEmpty()) {

View File

@@ -1,49 +1,66 @@
package com.example.hpostesting.presentation.dashboard
import android.content.Context
import android.content.pm.PackageManager
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import com.example.hpostesting.presentation.dashboard.ui.slideshow.SlideshowViewModel
import `in`.sminnovations.hpostesting.databinding.FragmentSlideshowBinding
import android.widget.Toast
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import com.example.hpostesting.data.constant.LanguageManager
import `in`.sminnovations.hpostesting.R
private var isLanguageChanged = false
class SlideshowFragment : Fragment() {
class SlideshowFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
val preferenceScreen = preferenceManager.createPreferenceScreen(requireContext())
private var _binding: FragmentSlideshowBinding? = null
val languagePreference = ListPreference(requireContext())
languagePreference.key = "language_preference"
languagePreference.title = getString(R.string.app_language)
languagePreference.summary = getString(R.string.select_language)
languagePreference.entries = arrayOf("English", "Kannada", "Hindi")
languagePreference.entryValues = arrayOf("en", "kn", "hi")
languagePreference.setDefaultValue("en")
// This property is only valid between onCreateView and
// onDestroyView.
private val binding get() = _binding!!
languagePreference.onPreferenceChangeListener =
Preference.OnPreferenceChangeListener { _, newValue ->
val languageCode = newValue as String
updateLanguage(requireContext(), languageCode)
true
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
val slideshowViewModel =
ViewModelProvider(this).get(SlideshowViewModel::class.java)
preferenceScreen.addPreference(languagePreference)
setPreferenceScreen(preferenceScreen)
_binding = FragmentSlideshowBinding.inflate(inflater, container, false)
val root: View = binding.root
// App Version Preference
val appVersionPreference = Preference(requireContext())
appVersionPreference.title = "App Version"
appVersionPreference.summary = getAppVersion(requireContext())
val pInfo = requireActivity().packageManager.getPackageInfo(
requireActivity().packageName, 0
)
val version = pInfo.versionName
binding.textSlideshow.text = version
preferenceScreen.addPreference(languagePreference)
preferenceScreen.addPreference(appVersionPreference)
setPreferenceScreen(preferenceScreen)
// val textView: TextView = binding.textSlideshow
// slideshowViewModel.text.observe(viewLifecycleOwner) {
// textView.text = it
// }
return root
if (isLanguageChanged) {
Toast.makeText(requireContext(), R.string.language_update, Toast.LENGTH_SHORT).show()
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
private fun updateLanguage(context: Context, languageCode: String) {
LanguageManager.persistLanguagePreference(context, languageCode)
LanguageManager.setLocale(context, languageCode)
requireActivity().recreate() // Recreate activity to apply language changes
isLanguageChanged = true
}
private fun getAppVersion(context: Context): String {
return try {
val pInfo = context.packageManager.getPackageInfo(context.packageName, 0)
pInfo.versionName
} catch (e: PackageManager.NameNotFoundException) {
"N/A"
}
}
}

View File

@@ -47,10 +47,10 @@ class LoginFragment : Fragment() {
performLogin(loginId, password)
} else {
if (loginId.isBlank()) {
binding.loginId.error = "Please enter a proper Login ID"
binding.loginId.error = R.string.enter_proper_login_id.toString()
}
if (password.isBlank()) {
binding.password.error = "Please enter a proper password"
binding.password.error = R.string.enter_proper_password.toString()
}
}
}
@@ -72,10 +72,10 @@ class LoginFragment : Fragment() {
navigateToHomeFragment()
return
} else {
Toast.makeText(requireContext(), "Wrong Password", Toast.LENGTH_SHORT).show()
Toast.makeText(requireContext(), R.string.wrong_password, Toast.LENGTH_SHORT).show()
}
}
Toast.makeText(requireContext(), "Wrong UserID", Toast.LENGTH_SHORT).show()
Toast.makeText(requireContext(), R.string.wrong_user_id, Toast.LENGTH_SHORT).show()
}
private fun saveUserId(userId: String) {

View File

@@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.get
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.presentation.hemocube.HemoCubeFragment
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
import com.example.hpostesting.presentation.testRight.UsbService
@@ -77,6 +78,12 @@ class DiagnosticsActivity : AppCompatActivity() {
}
}
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityDiagnosticsBinding.inflate(layoutInflater)

View File

@@ -14,6 +14,7 @@ import android.os.IBinder
import android.view.Menu
import androidx.activity.viewModels
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.presentation.testRight.UsbService
import com.hoho.android.usbserial.driver.UsbSerialDriver
import `in`.sminnovations.hpostesting.R
@@ -21,8 +22,15 @@ import `in`.sminnovations.hpostesting.databinding.ActivityDigitalCardBinding
import `in`.sminnovations.hpostesting.databinding.ActivityHemocubeBinding
class DigitalCardActivity : AppCompatActivity() {
private lateinit var binding: ActivityDigitalCardBinding
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityDigitalCardBinding.inflate(layoutInflater)

View File

@@ -8,7 +8,6 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
@@ -20,7 +19,6 @@ import com.example.hpostesting.data.model.patient.DeviceData
import com.example.hpostesting.data.model.patient.toHemoCubeTestData
import com.example.hpostesting.presentation.UsbServiceListener
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import androidx.navigation.fragment.findNavController
import com.example.hpostesting.presentation.utils.MyDialogListener
import com.example.hpostesting.presentation.utils.UIUtils
import com.google.firebase.crashlytics.ktx.crashlytics
@@ -58,6 +56,7 @@ class HemoCubeFragment : Fragment() {
private var _predictedDenovixRatio = 0.0
private var validationError = false
private var deviceHardwareId = ""
private var allErrorMessages = ""
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?,
@@ -127,7 +126,7 @@ class HemoCubeFragment : Fragment() {
private fun observeViewModel() {
hemoCubeViewModel.fireBaseUpload.observe(viewLifecycleOwner) { result ->
if (result == "Success") {
showToast("Test Results Uploaded Successfully")
showToast(R.string.test_upload)
activity?.runOnUiThread {
binding.btnSubmit.visibility = View.GONE
@@ -141,11 +140,11 @@ class HemoCubeFragment : Fragment() {
}
}
if (result == "Local") {
showToast("Internet not available, test details stored locally")
showToast(R.string.internt_not_local)
startActivity(Intent(requireActivity(), DashboardActivity::class.java))
}
if (result == "Error") {
showToast("Error uploading data, test details stored locally")
showToast(R.string.error_local)
startActivity(Intent(requireActivity(), DashboardActivity::class.java))
}
@@ -206,16 +205,16 @@ class HemoCubeFragment : Fragment() {
false
}
} catch (e: Exception) {
showToast("error while getting existing buffer")
showToast(R.string.error_exist)
false
}
}
private fun showBufferAlertDialog() {
val title = "WARNING"
val message = "Do you want to continue with existing buffer?"
val message = getString(R.string.do_exist)
val negativeText = getString(R.string.no)
val positiveText = "Yes"
val positiveText = getString(R.string.yes)
UIUtils.createAlertDialog(requireContext(),
title,
@@ -231,7 +230,7 @@ class HemoCubeFragment : Fragment() {
activity?.runOnUiThread {
binding.btnPlacebuffer.visibility = View.GONE
binding.btnSamplestart.visibility = View.VISIBLE
binding.tvSubtitle4.text = "Place Sample"
binding.tvSubtitle4.text = getString(R.string.place_sample)
}
isUsingExistingBuffer = true
}
@@ -263,7 +262,7 @@ class HemoCubeFragment : Fragment() {
}
})
} catch (e: Exception) {
showToast("test is going on")
showToast(R.string.test_ongoing)
Firebase.crashlytics.recordException(e)
}
}
@@ -308,37 +307,37 @@ class HemoCubeFragment : Fragment() {
activity?.runOnUiThread {
binding.btnPlacebuffer.visibility = View.VISIBLE
}
hemoCubeViewModel.messages.postValue("Start")
hemoCubeViewModel.messages.postValue(getString(R.string.start))
}
stringData.contains("#BS") -> {
hemoCubeViewModel.messages.postValue("Buffer Started")
hemoCubeViewModel.messages.postValue(getString(R.string.buffer_started))
}
stringData.contains("#BC") -> {
activity?.runOnUiThread {
binding.tvSubtitle4.text = "Buffer Completed"
binding.tvSubtitle4.text = getString(R.string.buffer_completed)
binding.btnSamplestart.visibility = View.VISIBLE
}
}
stringData.contains("#SS") -> {
activity?.runOnUiThread {
binding.tvSubtitle4.text = "Sample Started"
binding.tvSubtitle4.text = getString(R.string.sample_started)
binding.btnSamplestart.visibility = View.GONE
}
}
stringData.contains("#SC") -> {
hemoCubeViewModel.messages.postValue("Sample Completed \nGathering data")
hemoCubeViewModel.messages.postValue(
getString(R.string.sample_completed) + "\n" + getString(R.string.gathering_data))
fetchResult()
testingTrace.stop()
}
resultData.contains("REND") -> {
hemoCubeViewModel.messages.postValue(
"Data collected \n" +
" Processing data"
getString(R.string.data_collected_processing_data)
)
val resultLines = resultData.split("\\s+(?=LB|LS)".toRegex())
var bufferIntensity = resultLines[1].split(' ')[1].trim()
@@ -402,7 +401,7 @@ class HemoCubeFragment : Fragment() {
// If the test is ongoing, don't allow the back button action
// You can optionally show a message to the user indicating why the back button is disabled
// For example, show a Toast or Snackbar.
showToast("Test is ongoing. Cannot go back.")
showToast(R.string.test_go_noback)
} else {
// If the test is not ongoing, you can trigger the back action of the hosting activity
activity?.onBackPressed()
@@ -411,7 +410,7 @@ class HemoCubeFragment : Fragment() {
private fun processResult() {
try {
hemoCubeViewModel.messages.postValue("processing result")
hemoCubeViewModel.messages.postValue(getString(R.string.processing_result))
val deviceLog = resultData
val pInfo = requireActivity().packageManager.getPackageInfo(
@@ -419,33 +418,49 @@ class HemoCubeFragment : Fragment() {
)
val version = pInfo.versionName
val led1Average = log10(led1BufferForDevice?.div(led1SampleForDevice!!) ?: 0.0)
val led2Average = log10(led2BufferForDevice?.div(led2SampleForDevice!!) ?: 0.0)
val led3Average = log10(led3BufferForDevice?.div(led3SampleForDevice!!) ?: 0.0)
val led4Average = log10(led4BufferForDevice?.div(led4SampleForDevice!!) ?: 0.0)
val led1Average = log10(led1BufferForDevice.div(led1SampleForDevice))
val led2Average = log10(led2BufferForDevice.div(led2SampleForDevice))
val led3Average = log10(led3BufferForDevice.div(led3SampleForDevice))
val led4Average = log10(led4BufferForDevice.div(led4SampleForDevice))
val deviceRatio = led3Average / led1Average
if (led1BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(0)?.get(0)!!
|| led2BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(1)?.get(0)!!
|| led3BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(2)?.get(0)!!
|| led4BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(3)?.get(0)!!
if (led1BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(0)
?.get(0)!!
|| led2BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
1
)?.get(0)!!
|| led3BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
2
)?.get(0)!!
|| led4BufferForDevice < Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
3
)?.get(0)!!
) {
validationError = true
allErrorMessages += "Error: Invalid Test. Improper buffer reading (low)"
activity?.runOnUiThread {
binding.errorMessage.text = "Error: Invalid Test. Improper buffer reading (low)"
binding.errorMessage.text = getString(R.string.error_improper_buffer_low)
binding.errorMessage.visibility = View.VISIBLE
}
}
if (led1BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(0)?.get(1)!!
|| led2BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(1)?.get(1)!!
|| led3BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(2)?.get(1)!!
|| led4BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(3)?.get(1)!!
if (led1BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(0)
?.get(1)!!
|| led2BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
1
)?.get(1)!!
|| led3BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
2
)?.get(1)!!
|| led4BufferForDevice > Constants.BUFFER_INTENSITY_THRESHOLDS[deviceHardwareId]?.get(
3
)?.get(1)!!
) {
validationError = true
allErrorMessages += "Error: Invalid Test. Improper buffer reading (high)" + "\n"
activity?.runOnUiThread {
binding.errorMessage.text =
"Error: Invalid Test. Improper buffer reading (high)"
getString(R.string.error_improper_buffer_high)
binding.errorMessage.visibility = View.VISIBLE
binding.btnSubmit.isEnabled = true
binding.btnSubmit.isClickable = true
@@ -468,12 +483,13 @@ class HemoCubeFragment : Fragment() {
constant = Constants.DEVICE_CONFIGURATION[deviceHardwareId]?.get(3)?.get(1)
fittedAbs4 = gradient?.times(led4Average)?.plus(constant!!)!!
_predictedDenovixRatio = fittedAbs3?.div(fittedAbs1!!)!!
_predictedDenovixRatio = fittedAbs3.div(fittedAbs1)
if (fittedAbs1!! <= fittedAbs2!!) {
if (fittedAbs1 <= fittedAbs2) {
validationError = true
allErrorMessages += "Error: Invalid Test. Problem with de-oxygenation" + "\n"
activity?.runOnUiThread {
binding.errorMessage.text = "Error: Invalid Test. Problem with de-oxygenation"
binding.errorMessage.text = getString(R.string.error_invalid_test)
binding.errorMessage.visibility = View.VISIBLE
}
}
@@ -481,7 +497,16 @@ class HemoCubeFragment : Fragment() {
if (fittedAbs1 < 0 || fittedAbs2 < 0 || fittedAbs3 < 0 || fittedAbs4 < 0) {
validationError = true
activity?.runOnUiThread {
binding.errorMessage.text = "Error: Negative Abs. Retake Blank Reading"
binding.errorMessage.text = getString(R.string.error_negative_abs)
binding.errorMessage.visibility = View.VISIBLE
}
}
if (fittedAbs3 < 0.1) {
validationError = true
allErrorMessages += "Error: Low Hb. Repeat test" + "\n"
activity?.runOnUiThread {
binding.errorMessage.text = "Error: Low Hb. Repeat test"
binding.errorMessage.visibility = View.VISIBLE
}
}
@@ -513,12 +538,16 @@ class HemoCubeFragment : Fragment() {
this.classificationResult = findResult(calculatedRatio)
this.prdClassification = absorbanceBasedClassification(predictedDenovixRatio)
hemoCubeViewModel.messages.postValue(this.prdClassification)
this.errorMessages = allErrorMessages
this.resultData = deviceLog
this.batteryLevel = hemoCubeViewModel.getBatteryLevel().toString()
this.batteryCapacity = hemoCubeViewModel.getBatteryCapacity(requireContext()).toString()
this.batteryMaxCapacity = hemoCubeViewModel.getBatteryMaxCapacity(requireContext()).toString()
this.batteryCapacity =
hemoCubeViewModel.getBatteryCapacity(requireContext()).toString()
this.batteryMaxCapacity =
hemoCubeViewModel.getBatteryMaxCapacity(requireContext()).toString()
this.batteryTemperature = hemoCubeViewModel.getBatteryTemperature().toString()
this.batteryVoltage = hemoCubeViewModel.getBatteryVoltage(requireContext()).toString()
this.batteryVoltage =
hemoCubeViewModel.getBatteryVoltage(requireContext()).toString()
}
if (!isUsingExistingBuffer) {
@@ -531,18 +560,18 @@ class HemoCubeFragment : Fragment() {
}
}
if (!validationError) {
activity?.runOnUiThread {
binding.btnSubmit.visibility = View.VISIBLE
binding.btnSubmit.isEnabled = true
binding.btnSubmit.isClickable = true
binding.clParent.setBackgroundColor(Color.parseColor("#edfffd"))
}
// if (!validationError) {
activity?.runOnUiThread {
binding.btnSubmit.visibility = View.VISIBLE
binding.btnSubmit.isEnabled = true
binding.btnSubmit.isClickable = true
binding.clParent.setBackgroundColor(Color.parseColor("#edfffd"))
}
// }
} catch (e: Exception) {
Toast.makeText(
requireContext(),
"Error while processing device data",
R.string.error_processing_device_data,
Toast.LENGTH_SHORT
).show()
Firebase.crashlytics.recordException(e)
@@ -554,28 +583,28 @@ class HemoCubeFragment : Fragment() {
hemoCubeViewModel.messages.postValue("result classification")
if (calculatedRatio != null) {
if (calculatedRatio < 0.05)
return "Inconclusive. Very low Absorbance - Repeat test with Higher Blood Volume"
return getString(R.string.error_repeat_test_higher_volume)
if (calculatedRatio in 0.05..0.155)
return "Normal"
return getString(R.string.normal)
if (calculatedRatio in 0.155..0.175)
return "Negative Borderline. Repeat Test"
return getString(R.string.negative_borderline)
if (calculatedRatio in 0.175..0.22)
return "Sickle Cell Trait"
return getString(R.string.sickle_cell_trait)
if (calculatedRatio in 0.22..0.25)
return "Positive for Sickle Cell. HPLC for Confirmation"
return getString(R.string.positive_for_sickle_cell)
if (calculatedRatio in 0.25..0.35)
return "Sickle Cell Disease"
return getString(R.string.sickle_cell_disease)
if (calculatedRatio > 0.35)
return "Inconclusive. Repeat with test with lower volume of blood"
return getString(R.string.error_repeat_test_lower_volume)
} else {
return "INVALID"
return getString(R.string.invalid)
}
} catch (e: Exception) {
showToast("error while performing classification")
showToast(R.string.error_classification)
Firebase.crashlytics.recordException(e)
return "ERROR"
return getString(R.string.error)
}
return "INVALID"
return getString(R.string.invalid)
}
private fun absorbanceBasedClassification(predictedDenovixRatio: Double?): String {
@@ -583,28 +612,28 @@ class HemoCubeFragment : Fragment() {
hemoCubeViewModel.messages.postValue("result classification")
if (predictedDenovixRatio != null) {
if (predictedDenovixRatio in 0.0..0.16)
return "Normal"
return getString(R.string.normal)
if (predictedDenovixRatio in 0.16..0.165)
return "Negative Borderline"
return getString(R.string.negative_borderline)
if (predictedDenovixRatio in 0.165..0.235)
return "Sickle Cell Trait"
return getString(R.string.sickle_cell_trait)
if (predictedDenovixRatio in 0.235..0.24)
return "Positive Borderline"
return getString(R.string.positive_borderline)
if (predictedDenovixRatio in 0.24..1.0)
return "Sickle Cell Disease"
return getString(R.string.sickle_cell_disease)
} else {
return "INVALID"
return getString(R.string.invalid)
}
} catch (e: Exception) {
showToast("error while performing classification")
showToast(R.string.error_classification)
Firebase.crashlytics.recordException(e)
return "ERROR"
return getString(R.string.error)
}
return "INVALID"
return getString(R.string.invalid)
}
private fun showToast(message: String) {
Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
private fun showToast(messageResId: Int) {
Toast.makeText(requireContext(), getString(messageResId), Toast.LENGTH_SHORT).show()
}
private fun startBufferProcess() {
@@ -662,4 +691,4 @@ class HemoCubeFragment : Fragment() {
return true
return false
}
}
}

View File

@@ -1,13 +1,11 @@
package com.example.hpostesting.presentation.hemocube
import android.app.Application
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
import android.os.BatteryManager
import android.util.Log
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
@@ -16,13 +14,12 @@ import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.NetworkStatusLiveData
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.dao.HemoCubeDao
import com.example.hpostesting.data.datasource.LocalFileDataSource
import com.example.hpostesting.data.model.Response
import com.example.hpostesting.data.model.patient.BufferCheckData
import com.example.hpostesting.data.model.patient.DeviceData
import com.example.hpostesting.data.model.patient.HemoCubeTestData
import com.example.hpostesting.data.model.patient.UserData
import com.example.hpostesting.data.model.patient.toHemoCubeTestData
import com.example.hpostesting.data.repository.DatabaseRepository
import com.example.hpostesting.data.repository.Repository
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.launch
@@ -36,244 +33,257 @@ class HemoCubeViewModel @Inject constructor(
private val hemoCubeDao: HemoCubeDao,
private val repository: Repository,
context: Context,
private val localFileDataSource: LocalFileDataSource
) : ViewModel() {
var isServiceConnected = false
val progressBar = MutableLiveData(false)
val testDetails = DataHolder.selectedTest?.toHemoCubeTestData()
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
val testDetails = DataHolder.selectedTest?.toHemoCubeTestData()
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
// Get the device ID of the device you want to retrieve data for (e.g., the first device in the list)
// Get the device ID of the device you want to retrieve data for (e.g., the first device in the list)
private val _networkStatusLiveData = NetworkStatusLiveData(context)
val allUserData = hemoCubeDao.getAll()
val deviceData = MutableLiveData<DeviceData?>()
val networkStatusLiveData: LiveData<Boolean>
get() = _networkStatusLiveData
val fireBaseUpload = MutableLiveData<String>()
val fireBaseBulkUpload = MutableLiveData<String>()
private val _networkStatusLiveData = NetworkStatusLiveData(context)
val allUserData = hemoCubeDao.getAll()
val deviceData = MutableLiveData<DeviceData?>()
val networkStatusLiveData: LiveData<Boolean>
get() = _networkStatusLiveData
val fireBaseUpload = MutableLiveData<String>()
val fireBaseBulkUpload = MutableLiveData<String>()
private val batteryStatus: Intent? =
IntentFilter(Intent.ACTION_BATTERY_CHANGED).let { ifilter ->
context.registerReceiver(null, ifilter)
}
fun uploadHemoCubeResultToDatabase(
isOnline: Boolean,
testStatus: Boolean,
kitSerial: String?
) =
viewModelScope.launch {
if (kitSerial != null) {
testDetails?.kitSerial = kitSerial
}
testDetails?.testStatus = testStatus
try {
if (isOnline) {
parseData()
addResultTestToDb()
} else {
parseData()
testDetails?.testTime = SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
hemoCubeDao.insertAll(testDetails!!)
fireBaseUpload.postValue("Local")
}
} catch (e: Exception) {
Log.e("Testdb", "Upload failed: ${e.message}")
}
}
fun uploadHemoCubeResultToDatabaseforbuffercheckN(bufferCheckData: BufferCheckData) =
viewModelScope.launch {
addResultTestToDbforbuffercheck(bufferCheckData)
}
fun getDeviceData(deviceId: String?) = viewModelScope.launch {
deviceData.postValue(deviceId?.let { repository.getDeviceDataById(it) })
private val batteryStatus: Intent? =
IntentFilter(Intent.ACTION_BATTERY_CHANGED).let { ifilter ->
context.registerReceiver(null, ifilter)
}
private fun parseData() {
testDetails?.deviceRatio = DataHolder.hemocubeResult
testDetails?.resultData = DataHolder.hemoCubeTestData?.resultData.toString()
testDetails?.location = DataHolder.location
testDetails?.testTime = SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
testDetails?.appVersion = DataHolder.hemoCubeTestData?.appVersion
testDetails?.deviceId = DataHolder.hemoCubeTestData?.deviceId
testDetails?.deviceSerialNumber =
sharedPreference.getString(Constants.USER_ID, "").toString()
testDetails?.kitSerial = sharedPreference.getString(Constants.KIT_NUMBER, "").toString()
testDetails?.led1Buffer = DataHolder.hemoCubeTestData?.led1Buffer
testDetails?.led2Buffer = DataHolder.hemoCubeTestData?.led2Buffer
testDetails?.led3Buffer = DataHolder.hemoCubeTestData?.led3Buffer
testDetails?.led4Buffer = DataHolder.hemoCubeTestData?.led4Buffer
testDetails?.led1Sample = DataHolder.hemoCubeTestData?.led1Sample
testDetails?.led2Sample = DataHolder.hemoCubeTestData?.led2Sample
testDetails?.led3Sample = DataHolder.hemoCubeTestData?.led3Sample
testDetails?.led4Sample = DataHolder.hemoCubeTestData?.led4Sample
testDetails?.led1Average = DataHolder.hemoCubeTestData?.led1Average
testDetails?.led2Average = DataHolder.hemoCubeTestData?.led2Average
testDetails?.led3Average = DataHolder.hemoCubeTestData?.led3Average
testDetails?.led4Average = DataHolder.hemoCubeTestData?.led4Average
testDetails?.abs1 = DataHolder.hemoCubeTestData?.abs1
testDetails?.abs2 = DataHolder.hemoCubeTestData?.abs2
testDetails?.abs3 = DataHolder.hemoCubeTestData?.abs3
testDetails?.abs4 = DataHolder.hemoCubeTestData?.abs4
testDetails?.deviceRatio = DataHolder.hemoCubeTestData?.deviceRatio
testDetails?.predictedDenovixRatio = DataHolder.hemoCubeTestData?.predictedDenovixRatio
testDetails?.calculatedRatio = DataHolder.hemoCubeTestData?.calculatedRatio
testDetails?.coefficients = DataHolder.hemoCubeTestData?.coefficients
testDetails?.classificationResult = DataHolder.hemoCubeTestData?.classificationResult!!
testDetails?.prdClassification =
DataHolder.hemoCubeTestData?.prdClassification.toString()
testDetails?.batteryLevel = DataHolder.hemoCubeTestData?.batteryLevel.toString()
testDetails?.batteryCapacity = DataHolder.hemoCubeTestData?.batteryCapacity.toString()
testDetails?.batteryMaxCapacity =
DataHolder.hemoCubeTestData?.batteryMaxCapacity.toString()
testDetails?.batteryTemperature =
DataHolder.hemoCubeTestData?.batteryTemperature.toString()
testDetails?.batteryVoltage = DataHolder.hemoCubeTestData?.batteryVoltage.toString()
}
fun uploadHemoCubeResultToDatabase(
isOnline: Boolean,
testStatus: Boolean,
kitSerial: String?
) =
viewModelScope.launch {
if (kitSerial != null) {
testDetails?.kitSerial = kitSerial
}
testDetails?.testStatus = testStatus
private fun addResultTestToDb() {
viewModelScope.launch {
try {
testDetails!!.reportUploadTime = SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
when (val response = repository.addTestToDatabase(testDetails)) {
is Response.Success -> {
val kitCount = sharedPreference.getInt(Constants.KIT_COUNT, 0)
with(sharedPreference.edit()) {
putInt(Constants.KIT_COUNT, kitCount.plus(1))
apply()
}
Log.i("Testdb", "Data uploaded to Firestore successfully")
fireBaseUpload.postValue("Success")
testDetails.localFlag = true
hemoCubeDao.insertAll(testDetails)
}
is Response.Error -> {
Log.e("Testdb", "Error uploading data to Firestore: $response")
fireBaseUpload.postValue("Error")
hemoCubeDao.insertAll(testDetails)
}
}
} catch (e: Exception) {
Log.e("Testdb", "Exception during data upload: ${e.message}")
fireBaseUpload.postValue("Error")
try {
if (isOnline) {
parseData()
addResultTestToDb()
} else {
parseData()
testDetails?.testTime = getCurrentDate()
hemoCubeDao.insertAll(testDetails!!)
fireBaseUpload.postValue("Local")
}
} catch (e: Exception) {
Log.e("Testdb", "Upload failed: ${e.message}")
}
}
private fun addResultTestToDbforbuffercheck(bufferCheckData: BufferCheckData) {
viewModelScope.launch {
try {
when (val response =
repository.addTestToDatabaseforBufferCheck(bufferCheckData)) {
is Response.Success -> {
Log.i("Testdb", "Data uploaded to Firestore successfully")
fireBaseUpload.postValue("Success")
}
is Response.Error -> {
Log.e("Testdb", "Error uploading data to Firestore: $response")
fireBaseUpload.postValue("Error")
}
}
} catch (e: Exception) {
Log.e("Testdb", "Exception during data upload: ${e.message}")
fireBaseUpload.postValue("Error")
}
}
fun uploadHemoCubeResultToDatabaseforbuffercheckN(bufferCheckData: BufferCheckData) =
viewModelScope.launch {
addResultTestToDbforbuffercheck(bufferCheckData)
}
fun bulkAddResultTestToDb(userData: HemoCubeTestData) {
viewModelScope.launch {
userData.reportUploadTime = SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
when (repository.addTestToDatabase(userData)) {
fun getDeviceData(deviceId: String?) = viewModelScope.launch {
deviceData.postValue(deviceId?.let { repository.getDeviceDataById(it) })
}
private fun parseData() {
testDetails?.deviceRatio = DataHolder.hemocubeResult
testDetails?.resultData = DataHolder.hemoCubeTestData?.resultData.toString()
testDetails?.location = DataHolder.location
testDetails?.testTime = getCurrentDate()
testDetails?.appVersion = DataHolder.hemoCubeTestData?.appVersion
testDetails?.deviceId = DataHolder.hemoCubeTestData?.deviceId
testDetails?.deviceSerialNumber =
sharedPreference.getString(Constants.USER_ID, "").toString()
testDetails?.kitSerial = sharedPreference.getString(Constants.KIT_NUMBER, "").toString()
testDetails?.led1Buffer = DataHolder.hemoCubeTestData?.led1Buffer
testDetails?.led2Buffer = DataHolder.hemoCubeTestData?.led2Buffer
testDetails?.led3Buffer = DataHolder.hemoCubeTestData?.led3Buffer
testDetails?.led4Buffer = DataHolder.hemoCubeTestData?.led4Buffer
testDetails?.led1Sample = DataHolder.hemoCubeTestData?.led1Sample
testDetails?.led2Sample = DataHolder.hemoCubeTestData?.led2Sample
testDetails?.led3Sample = DataHolder.hemoCubeTestData?.led3Sample
testDetails?.led4Sample = DataHolder.hemoCubeTestData?.led4Sample
testDetails?.led1Average = DataHolder.hemoCubeTestData?.led1Average
testDetails?.led2Average = DataHolder.hemoCubeTestData?.led2Average
testDetails?.led3Average = DataHolder.hemoCubeTestData?.led3Average
testDetails?.led4Average = DataHolder.hemoCubeTestData?.led4Average
testDetails?.abs1 = DataHolder.hemoCubeTestData?.abs1
testDetails?.abs2 = DataHolder.hemoCubeTestData?.abs2
testDetails?.abs3 = DataHolder.hemoCubeTestData?.abs3
testDetails?.abs4 = DataHolder.hemoCubeTestData?.abs4
testDetails?.deviceRatio = DataHolder.hemoCubeTestData?.deviceRatio
testDetails?.predictedDenovixRatio = DataHolder.hemoCubeTestData?.predictedDenovixRatio
testDetails?.calculatedRatio = DataHolder.hemoCubeTestData?.calculatedRatio
testDetails?.coefficients = DataHolder.hemoCubeTestData?.coefficients
testDetails?.classificationResult = DataHolder.hemoCubeTestData?.classificationResult!!
testDetails?.prdClassification =
DataHolder.hemoCubeTestData?.prdClassification.toString()
testDetails?.batteryLevel = DataHolder.hemoCubeTestData?.batteryLevel.toString()
testDetails?.batteryCapacity = DataHolder.hemoCubeTestData?.batteryCapacity.toString()
testDetails?.batteryMaxCapacity =
DataHolder.hemoCubeTestData?.batteryMaxCapacity.toString()
testDetails?.batteryTemperature =
DataHolder.hemoCubeTestData?.batteryTemperature.toString()
testDetails?.batteryVoltage = DataHolder.hemoCubeTestData?.batteryVoltage.toString()
}
private fun addResultTestToDb() {
viewModelScope.launch {
try {
testDetails!!.reportUploadTime = getCurrentDate()
when (val response = repository.addTestToDatabase(testDetails)) {
is Response.Success -> {
fireBaseBulkUpload.postValue("Success")
updateLocalFlag(userData._id)
val kitCount = sharedPreference.getInt(Constants.KIT_COUNT, 0)
with(sharedPreference.edit()) {
putInt(Constants.KIT_COUNT, kitCount.plus(1))
apply()
}
Log.i("Testdb", "Data uploaded to Firestore successfully")
fireBaseUpload.postValue("Success")
testDetails.localFlag = true
hemoCubeDao.insertAll(testDetails)
}
else -> {
fireBaseBulkUpload.postValue("Error")
is Response.Error -> {
Log.e("Testdb", "Error uploading data to Firestore: $response")
fireBaseUpload.postValue("Error")
hemoCubeDao.insertAll(testDetails)
}
}
} catch (e: Exception) {
Log.e("Testdb", "Exception during data upload: ${e.message}")
fireBaseUpload.postValue("Error")
}
}
private fun updateLocalFlag(userId: String) = viewModelScope.launch {
hemoCubeDao.updateFieldById(id = userId, true)
}
fun addUser(userData: HemoCubeTestData) = viewModelScope.launch {
hemoCubeDao.insertAll(userData)
}
fun deleteById(userId: String) = viewModelScope.launch {
hemoCubeDao.deleteById(id = userId)
}
fun getBatteryLevel(): Float? {
val batteryPct: Float? = batteryStatus?.let { intent ->
val level: Int = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1)
val scale: Int = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1)
level * 100 / scale.toFloat()
}
return batteryPct
}
fun getBatteryTemperature(): Float? {
val batteryTemp: Float? = batteryStatus?.let { intent ->
val temperature = intent?.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0) ?: 0
temperature.toFloat() / 10
}
return batteryTemp
}
fun getBatteryVoltage(context: Context): Float {
val batteryIntent =
context.registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
val voltage = batteryIntent?.getIntExtra(BatteryManager.EXTRA_VOLTAGE, 0) ?: 0
// milli-volts to volts
return voltage.toFloat() / 1000
}
fun getBatteryCapacity(context: Context): Int {
val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
val currentCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)
return currentCapacity
}
fun getBatteryMaxCapacity(context: Context): Float {
val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
val designCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)
val currentCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)
// Calculate the estimated maximum battery capacity in mAh
val maxCapacity = currentCapacity.toFloat() / designCapacity.toFloat() * 100
return maxCapacity
}
}
private fun addResultTestToDbforbuffercheck(bufferCheckData: BufferCheckData) {
viewModelScope.launch {
try {
when (val response =
repository.addTestToDatabaseforBufferCheck(bufferCheckData)) {
is Response.Success -> {
Log.i("Testdb", "Data uploaded to Firestore successfully")
fireBaseUpload.postValue("Success")
}
is Response.Error -> {
Log.e("Testdb", "Error uploading data to Firestore: $response")
fireBaseUpload.postValue("Error")
}
}
} catch (e: Exception) {
Log.e("Testdb", "Exception during data upload: ${e.message}")
fireBaseUpload.postValue("Error")
}
}
}
fun bulkAddResultTestToDb(userData: HemoCubeTestData) {
viewModelScope.launch {
userData.reportUploadTime = getCurrentDate()
when (repository.addTestToDatabase(userData)) {
is Response.Success -> {
fireBaseBulkUpload.postValue("Success")
updateLocalFlag(userData._id)
}
else -> {
fireBaseBulkUpload.postValue("Error")
}
}
}
}
private fun updateLocalFlag(userId: String) = viewModelScope.launch {
hemoCubeDao.updateFieldById(id = userId, true)
}
fun addUser(userData: HemoCubeTestData) = viewModelScope.launch {
hemoCubeDao.insertAll(userData)
}
fun deleteById(userId: String) = viewModelScope.launch {
hemoCubeDao.deleteById(id = userId)
}
fun getBatteryLevel(): Float? {
val batteryPct: Float? = batteryStatus?.let { intent ->
val level: Int = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1)
val scale: Int = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1)
level * 100 / scale.toFloat()
}
return batteryPct
}
fun getBatteryTemperature(): Float? {
val batteryTemp: Float? = batteryStatus?.let { intent ->
val temperature = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, 0)
temperature.toFloat() / 10
}
return batteryTemp
}
fun getBatteryVoltage(context: Context): Float {
val batteryIntent =
context.registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
val voltage = batteryIntent?.getIntExtra(BatteryManager.EXTRA_VOLTAGE, 0) ?: 0
// milli-volts to volts
return voltage.toFloat() / 1000
}
fun getBatteryCapacity(context: Context): Int {
val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
val currentCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)
return currentCapacity
}
fun getBatteryMaxCapacity(context: Context): Float {
val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
val designCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)
val currentCapacity =
batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER)
// Calculate the estimated maximum battery capacity in mAh
val maxCapacity = currentCapacity.toFloat() / designCapacity.toFloat() * 100
return maxCapacity
}
fun createCSV(hemoCubeTestData: List<HemoCubeTestData>, appContext: Context) =
viewModelScope.launch {
val fileName = "HPOS${getCurrentDate()}.csv"
if (localFileDataSource.exportDataToCSV(fileName, hemoCubeTestData)) {
hemoCubeTestData.forEach { data ->
data.localFlag = true
hemoCubeDao.updateCSVFieldById(
data._id,
true
)
}
}
}
private fun getCurrentDate(): String {
return SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
}
}

View File

@@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.get
import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.constant.LanguageManager
import com.example.hpostesting.presentation.testRight.UsbService
import com.hoho.android.usbserial.driver.UsbSerialDriver
import com.hoho.android.usbserial.driver.UsbSerialProber
@@ -72,6 +73,12 @@ open class HemocubeActivity : AppCompatActivity() {
viewModel.isServiceConnected = false
}
}
override fun attachBaseContext(newBase: Context?) {
val languageCode = LanguageManager.getSavedLanguage(newBase!!)
LanguageManager.setLocale(newBase, languageCode)
super.attachBaseContext(newBase)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

View File

@@ -1,5 +1,6 @@
package com.example.hpostesting.presentation.testRight
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
@@ -14,7 +15,6 @@ import com.example.hpostesting.data.DataHolder
import com.example.hpostesting.data.constant.Constants
import com.example.hpostesting.data.model.test.TestRightResultType
import com.example.hpostesting.data.model.test.TestType
import com.example.hpostesting.presentation.dashboard.DashboardActivity
import com.example.hpostesting.util.MyUtils.calculateAgeFromYOB
import com.google.firebase.firestore.FirebaseFirestore
import com.google.firebase.firestore.ktx.firestore

View File

@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="@color/primary"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/primary" android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

View File

@@ -71,7 +71,8 @@
app:cardBackgroundColor="#FFFFFF"
app:cardCornerRadius="5dp"
app:layout_constraintTop_toBottomOf="@id/userImage"
app:cardElevation="0dp">
app:cardElevation="0dp"
tools:ignore="MissingConstraints">
<TextView
android:id="@+id/name"

View File

@@ -18,11 +18,24 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/downloadCSV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="32dp"
android:visibility="gone"
android:backgroundTint="@color/primary"
android:contentDescription="@string/downloadcsv"
android:src="@drawable/download_csv"
app:elevation="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/internetNotAvailableCL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
android:visibility="gone"
android:padding="24dp">
<TextView
@@ -31,6 +44,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="24dp"
android:text="@string/internet_not_available_please_enter_the_user_id_manually"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -106,7 +120,7 @@
android:id="@+id/internetAvailableCL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:visibility="visible"
android:padding="24dp">
<TextView

View File

@@ -4,19 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.dashboard.SlideshowFragment">
tools:context="com.example.hpostesting.presentation.dashboard.SlideshowFragment">
<TextView
android:id="@+id/text_slideshow"
style="@style/title1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:textAlignment="center"
android:textSize="20sp"
android:text="@string/to_be_launched_in_next_version_of_the_app"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,23 @@
<!-- language_spinner_preference.xml -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Select Language -->
<TextView
android:id="@+id/textSelectLanguage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select Language"
android:textStyle="bold"
android:textSize="18sp"/>
<!-- Language Spinner -->
<Spinner
android:id="@+id/languageSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>
</LinearLayout>

View File

@@ -0,0 +1,266 @@
<resources>
<string name="app_name">HPOS Testing</string>
<string-array name="instrument">
<item>TestRight</item>
<item>Denovix</item>
</string-array>
<string-array name="gender">
<item>Male</item>
<item>Female</item>
<item>Other</item>
</string-array>
<string-array name="yes_no">
<item>Yes</item>
<item>No</item>
</string-array>
<string-array name="category">
<item>GEN</item>
<item>OBC</item>
<item>SC</item>
<item>ST</item>
</string-array>
<string-array name="blood_group">
<item>O+ve</item>
<item>O-ve</item>
<item>A+ve</item>
<item>A-ve</item>
<item>B+ve</item>
<item>B-ve</item>
<item>AB+ve</item>
<item>AB-ve</item>
</string-array>
<string name="hello_blank_fragment">नमस्ते खाली फ्रेगमेंट</string>
<string name="select_the_test">टेस्ट का चयन करें</string>
<string name="set_reference">संदर्भ सेट करें</string>
<!-- Alert Dialog -->
<string name="have_you_placed">क्या आपने संदर्भ नमूने की कुवेट रख दी है?</string>
<string name="please_place">कृपया चलने से पहले संदर्भ के रूप में नमूने की कुवेट रखें</string>
<string name="yes">हाँ</string>
<string name="no">नहीं</string>
<string name="noo"></string>
<string name="connect">कनेक्ट</string>
<string name="connected">कनेक्ट किया गया</string>
<string name="read">पढ़ें</string>
<string name="update_reference">संदर्भ अपडेट करें</string>
<string name="have_you_placed_sample">क्या आपने नमूने के साथ कुवेट रख दी है?</string>
<string name="please_place_sample">कृपया चलने से पहले नमूने की कुवेट रखें</string>
<string name="yes_and_run">हाँ, चलाएं</string>
<!-- Instructions Text -->
<string name="Instructions">परीक्षण निर्देश</string>
<string name="step1"><b><u>कदम 1</u> : </b> संदर्भ/बेसलाइन सैम्पल को संदर्भ के लिए रखें, जिसमें कुवेट है।</string>
<string name="step2"><b><u>कदम 2</u> : </b> डिवाइस को मूल्य पढ़ने के लिए नीचे बटन दबाएं।</string>
<string name="step3"><b><u>कदम 1</u> : </b> शुरू करने के लिए सैम्पल विवरण दर्ज करें।</string>
<string name="step4"><b><u>कदम 1</u> : </b> एक्सपेरिमेंट के लिए सैम्पल भरी ब्लड सैम्पल को संदर्भ के लिए कुवेट में रखें।</string>
<string name="step5"><b><u>कदम 2</u> : </b> डिवाइस को मूल्य पढ़ने के लिए नीचे बटन दबाएं।</string>
<string name="login_id">लॉगिन आईडी</string>
<string name="password">पासवर्ड</string>
<string name="login">लॉगिन</string>
<string name="acquire">प्राप्त करें</string>
<string name="enter_patient_details">रोगी विवरण दर्ज करें</string>
<string name="patient_name">रोगी का नाम</string>
<string name="age">आयु (वर्षों में)</string>
<string name="gender">लिंग</string>
<string name="name_error">नाम खाली नहीं हो सकता</string>
<string name="age_error">आयु खाली नहीं हो सकती</string>
<string name="gender_error">लिंग खाली नहीं हो सकती</string>
<string name="age_error_out_of_bound">आयु वैध होनी चाहिए</string>
<string name="yob_error">जन्म की वर्ष साल नहीं हो सकता</string>
<string name="yob_error_2">अमान्य जन्म की वर्ष</string>
<string name="mobile_error">मोबाइल नंबर खाली नहीं हो सकता</string>
<string name="mobile_error_invalid">मोबाइल नंबर अमान्य है (10 अंक दर्ज करें)</string>
<string name="this_error">यह खाली नहीं हो सकता</string>
<string name="test_results">परीक्षण परिणाम</string>
<string name="name_in_textview"><b>नाम</b> : %1$s</string>
<string name="gender_in_textview"><b>लिंग</b> : %1$s</string>
<string name="age_in_textview"><b>आयु</b> : %1$s वर्ष</string>
<string name="results_in_textview"><b>परिणाम</b> :</string>
<string name="negative">नेगेटिव</string>
<string name="download_report">रिपोर्ट डाउनलोड करें</string>
<string name="home">होम</string>
<string name="new_test">नया परीक्षण</string>
<string name="start_now">अब शुरू करें</string>
<string name="hemo_cube">हेमो क्यूब</string>
<string name="hb">एचबी</string>
<string name="normal">सामान्य</string>
<string name="sickle_cell_disease">सिक्ल सेल रोग</string>
<string name="sickle_cell_trait">सिक्ल सेल ट्रेट</string>
<string name="undefined">अनिर्धारित</string>
<string name="sicklecell_nconfirmatory">सिक्लसेल\nनिश्चित</string>
<string name="sicklecell_screening">सिक्लसेल स्क्रीनिंग</string>
<string name="thalassemia">थैलसेमिया</string>
<string name="usb_connection">यूएसबी कनेक्शन</string>
<string name="high_performance_optical_spectroscopy">उच्च प्रदर्शन ऑप्टिकल स्पेक्ट्रोस्कोपी</string>
<string name="sickle_cert">सिक्ल प्रमाणपत्र</string>
<string name="sickle_find">सिक्ल फाइंड</string>
<string name="submit">सबमिट करें</string>
<string name="diagnostics">डिवाइस नुस्खा</string>
<string name="place_buffer">स्थान</string>
<string name="Start_Sample">सैम्पल शुरू करें</string>
<string name="new_kit">नया किट</string>
<string name="new_buffer">नया बफर</string>
<string name="name_error_2">अमान्य वर्ण, अनुमत अक्षर हैं अक्षर, संख्या और ( ) _ - , . केवल</string>
<string name="recommended">\*परिणाम को प्रमाणित करने के लिए प्रयोगशाला परीक्षण के साथ</string>
<string name="recommended_age">\*परिणाम को प्रमाणित करने के लिए प्रयोगशाला परीक्षण के साथ, चिकित्सक की आयु 5 वर्षों से कम है</string>
<string name="positive_borderline">सकारात्मक सीमारेखा</string>
<string name="negative_borderline">नकारात्मक सीमारेखा</string>
<string name="is_patient_under_any_medication">क्या रोगी को कोई दवा या उपचार हो रहा है?</string>
<string name="is_patient_undergoing_any_blood_transfusion">क्या रोगी को कोई रक्त प्रसूति हो रही है?</string>
<string name="scan_aadhaar_card">स्कैन आधार कार्ड</string>
<string name="patient_details">रोगी विवरण</string>
<string name="or">या</string>
<string name="scan_abha_card">स्कैन अभा कार्ड</string>
<string name="list_of_patients">रोगियों की सूची</string>
<string name="no_patient_records_found_to_test_please_add_one_from_below">परीक्षण के लिए कोई रोगी रिकॉर्ड नहीं मिला। कृपया नीचे से एक जोड़ें।</string>
<string name="add">जोड़ें</string>
<string name="test">परीक्षण</string>
<string name="pending">बकाया</string>
<string name="scan_patient_abha_id_card">रोगी अभा आईडी कार्ड स्कैन करें</string>
<string name="scan_now">अब स्कैन करें</string>
<string name="enter_abha_number_manualy">अभा नंबर हैंडपंजी से दर्ज करें</string>
<string name="abha_id">अभा आईडी</string>
<string name="patient_id_in_tv"><b>उपयोगकर्ता आईडी</b> : %1$s</string>
<string name="go">जाएं</string>
<string name="click_here">यहां क्लिक करें</string>
<string name="title_activity_dashboard">डैशबोर्ड गतिविधि</string>
<string name="navigation_drawer_open">नेविगेशन ड्रॉयर खोलें</string>
<string name="navigation_drawer_close">नेविगेशन ड्रॉयर बंद करें</string>
<string name="nav_header_title">एचपीओएस</string>
<string name="nav_header_subtitle">sminnovations.in</string>
<string name="nav_header_desc">नेविगेशन हैडर</string>
<string name="action_settings">सेटिंग्स</string>
<string name="menu_home">होम</string>
<string name="show_hemocube_result">परिणाम दिखाएं</string>
<string name="menu_gallery">गैलरी</string>
<string name="menu_settings">सेटिंग्स</string>
<string name="profile">प्रोफ़ाइल</string>
<string name="year_of_birth">जन्म की वर्ष</string>
<string name="father_s_name_husband_s_name">पिता का नाम / पति का नाम</string>
<string name="is_patient_married_yes_no">क्या रोगी विवाहित है? (हां/नहीं)</string>
<string name="category">श्रेणी</string>
<string name="blood_group">रक्त समूह</string>
<string name="digital_card">डिजिटल सलाहकार कार्ड</string>
<string name="patient_medical_records">रोगी चिकित्सा रिकॉर्ड</string>
<string name="patient_address_details">रोगी का पता</string>
<string name="district">जिला</string>
<string name="city_town">शहर / गाँव</string>
<string name="state">राज्य</string>
<string name="pincode">पिनकोड</string>
<string name="threedots">...</string>
<string name="create_abha_id_card">अभा आईडी कार्ड बनाएं</string>
<string name="official_abha_app">आधिकारिक अभा एप्लिकेशन</string>
<string name="scan_patient_aadhaar_card">रोगी का आधार कार्ड स्कैन करें</string>
<string name="enter_aadhaar_number_manualy">आधार नंबर हैंडपंजी से दर्ज करें</string>
<string name="aadhaar_number">आधार नंबर</string>
<string name="aadhaar_in_tv"><b>आधार नंबर</b></string>
<string name="please_use_official_abha_app_to_create_abha_id_and_come_back">कृपया "आधिकारिक अभा एप्लिकेशन" का उपयोग करें अभा आईडी बनाने के लिए, और वापस आएं।</string>
<string name="please_enter_aadhaar">कृपया जारी रखने के लिए आधार नंबर दर्ज करें</string>
<string name="scan_qr_code_of_the_kit">किट का क्यूआर कोड स्कैन करें</string>
<string name="enter_kit_serial_number_manually">किट सीरियल नंबर हैंडपंजी से दर्ज करें</string>
<string name="serial_number">सीरियल नंबर</string>
<string name="set_baseline_reference_again">क्या फिर से आधार लाइन सेट करना है?</string>
<string name="baseline_instruction">आधार निर्देश</string>
<string name="to_be_launched_in_next_version_of_the_app">अगले संस्करण में लॉन्च किया जाएगा</string>
<string name="invalid_kit">अमान्य किट सीरियल नंबर, सही उदाहरण, SMI/SC/019/01/001</string>
<string name="user_list">उपयोगकर्ता सूची</string>
<string name="user_id">उपयोगकर्ता आईडी</string>
<string name="aadhar_id">आधार आईडी</string>
<string name="internet_not_available_please_enter_the_user_id_manually">इंटरनेट उपलब्ध नहीं है, कृपया उपयोगकर्ता आईडी और रक्त समूह मैन्युअली प्रविष्ट करें</string>
<string name="user_id_error_message">उपयोगकर्ता आईडी 18 अंकों की होनी चाहिए और कृपया रक्त समूह का चयन करें</string>
<string name="upload_db_registration_title">डीबी टेस्ट अपलोड करें</string>
<string name="upload_db_registration_message">क्या आप स्थानीय डीबी टेस्ट को क्लाउड पर अपलोड करना चाहते हैं?</string>
<string name="download_db_registration_title">डाउनलोड डीबी टेस्ट</string>
<string name="download_db_registration_message">क्या आप लोकल डीबी टेस्ट्स को सीएसवी प्रारूप में डाउनलोड करना चाहते हैं?</string>
<string name="upload">अपलोड</string>
<string name="cancel">रद्द करें</string>
<string name="upload_success_message">अपलोड सफलता पूर्वक हुआ</string>
<string name="test_completed">टेस्ट पूरा हुआ</string>
<string name="select_blood_group">रक्त समूह चयन करें</string>
<string name="all_registered_user_are_tested_successfully">सभी पंजीकृत उपयोगकर्ता सफलता पूर्वक टेस्ट हो चुके हैं</string>
<string name="start_incubation">अंडान</string>
<string name="check_buffer">बफर जाँचें</string>
<string name="low_battery_warning">बैटरी स्तर 40% से कम है, कृपया उपकरण को चार्ज करें जारी रखने के लिए</string>
<string name="test_already_conducted">इस उपयोगकर्ता के लिए पहले ही टेस्ट हो चुका है</string>
<string name="incubation_not_completed">अंडान 15 मिनट पूर्ण नहीं हुआ है</string>
<string name="incubation_crossed_30_minutes">अंडान 30 मिनटों को पार कर गया है, अंडान फिर से करना होगा</string>
<string name="incubation_not_started">इस उपयोगकर्ता के लिए अंडान शुरू नहीं हुआ है</string>
<string name="test_concluded">टेस्ट समाप्त हुआ</string>
<string name="test_pending">टेस्ट लंबित है</string>
<string name="blood_group_error">कृपया अपना रक्त समूह दर्ज करें</string>
<string name="blood_group_toast">कृपया अपना रक्त समूह दर्ज करें</string>
<string name="blood_group_updated_successfully">रक्त समूह सफलता पूर्वक अपडेट किया गया है</string>
<string name="failed_to_update_blood_group">रक्त समूह अपडेट करने में विफल: %1$s</string>
<string name="no_user_data_found">निर्दिष्ट आईडी के लिए कोई उपयोगकर्ता डेटा नहीं मिला</string>
<string name="device_disconnected">उपकरण डिस्कनेक्ट किया गया है</string>
<string name="no_device_found">कोई डिवाइस नहीं मिली</string>
<string name="invalid_kit_number">अमान्य किट नंबर</string>
<string name="internt_not">इंटरनेट उपलब्ध नहीं है</string>
<string name="internt_not_local">इंटरनेट उपलब्ध नहीं है, टेस्ट विवरण स्थानीय रूप से सहेजे गए हैं</string>
<string name="error_local">डेटा अपलोड करने में त्रुटि, टेस्ट विवरण स्थानीय रूप से सहेजे गए हैं</string>
<string name="error_exist">मौजूदा बफर प्राप्त करते समय त्रुटि</string>
<string name="do_exist">क्या आप मौजूदा बफर के साथ जारी रखना चाहते हैं?</string>
<string name="kit_uploaded">किट परिणाम सफलता पूर्वक अपलोड हुआ</string>
<string name="kit_upload_failed">किट परिणाम अपलोड करने में विफल, इसे मैन्युअली नोट करें</string>
<string name="test_ongoing">टेस्ट जारी है</string>
<string name="test_go_noback">टेस्ट जारी है, पीछे नहीं जा सकते</string>
<string name="error_classification">वर्गीकरण करते समय त्रुटि</string>
<string name="test_upload">टेस्ट परिणाम सफलता पूर्वक अपलोड हुआ</string>
<string name="test_upload_failed">टेस्ट परिणाम अपलोड करने में विफल</string>
<string name="log_out">लॉग आउट</string>
<string name="do_log_out">क्या आप ऐप्लिकेशन से लॉगआउट करना चाहते हैं?</string>
<string name="cancelled_unable_scan">रद्द किया गया: स्कैन करने में असमर्थ, पुनः प्रयास करें!!</string>
<string name="kit_updated">किट नंबर अपडेट किया गया है, कृपया टेस्ट शुरू करने से पहले उपयोगकर्ता का चयन करें</string>
<string name="select_patient">कृपया टेस्ट शुरू करने से पहले रोगी का चयन करें</string>
<string name="enable_location">कृपया स्थान सेवाएं सक्षम करें</string>
<string name="location_denied">फाइन स्थान अनुमति निरस्त</string>
<string name="coarse_location_denied">कोर्स स्थान अनुमति निरस्त</string>
<string name="permission_grant">आपको एप्लिकेशन का उपयोग करने के लिए सभी फ़ाइलों तक पहुँच की अनुमति देनी होगी</string>
<string name="permission_required">एप्लिकेशन का उपयोग करने के लिए सभी अनुमतियाँ आवश्यक हैं</string>
<string name="device_not">उपकरण कनेक्ट नहीं है।</string>
<string name="enter_proper_login_id">कृपया सही लॉगिन आईडी दर्ज करें</string>
<string name="enter_proper_password">कृपया सही पासवर्ड दर्ज करें</string>
<string name="wrong_password">गलत पासवर्ड</string>
<string name="wrong_user_id">गलत उपयोगकर्ता आईडी</string>
<string name="error_invalid_test">अमान्य टेस्ट. डी-ऑक्सीजनेशन समस्या</string>
<string name="error_negative_abs">त्रुटि: नेगेटिव ऍब्स॰. ब्लैंक रीडिंग पुनः लें</string>
<string name="error_improper_buffer_high">त्रुटि: अमान्य टेस्ट. बफर रीडिंग सही नहीं (उच्च)</string>
<string name="error_improper_buffer_low">त्रुटि: अमान्य टेस्ट. बफर रीडिंग सही नहीं (न्यून)</string>
<string name="error_processing_device_data">उपकरण डेटा प्रोसेस करते समय त्रुटि</string>
<string name="error_repeat_test_lower_volume">अमान्य. वाल्यूम कम है - पुनः टेस्ट करें</string>
<string name="error_repeat_test_higher_volume">अमान्य. बहुत कम एब्स॰ - उच्च वाल्यूम के साथ पुनः टेस्ट करें</string>
<string name="positive_for_sickle_cell">सिकल सेल के लिए सकारात्मक. पुनः सत्यापन के लिए HPLC</string>
<string name="something_wrong_with_device">डिवाइस में कुछ गड़बड़ है, कृपया डिवाइस को बहुत और टेस्ट करने के लिए बाहर निकालें और फिर से कनेक्ट करें</string>
<string name="processing_result">प्रोसेसिंग परिणाम</string>
<string name="data_collected_processing_data">डेटा संग्रहित हो रहा है, डेटा प्रोसेसिंग हो रहा है</string>
<string name="sample_completed">सैम्पल पूरा हुआ</string>
<string name="gathering_data">डेटा एकत्र किया जा रहा है</string>
<string name="sample_started">सैम्पल शुरू हुआ</string>
<string name="buffer_completed">बफर पूरा हुआ</string>
<string name="buffer_started">बफर शुरू हुआ</string>
<string name="start">शुरू</string>
<string name="place_sample">सैम्पल रखें</string>
<string name="invalid">अमान्य</string>
<string name="error">त्रुटि</string>
<string name="language_update">भाषा सफलतापूर्वक अपडेट की गई है</string>
<string name="select_language">अपनी पसंदीदा भाषा का चयन करें</string>
<string name="app_language">ऐप भाषा</string>
<string name="add_blood_group">रक्त समूह जोड़ें</string>
<string name="ok">ठीक है</string>
<string name="downloadcsv">सीएसवी डाउनलोड करें</string>
</resources>

View File

@@ -0,0 +1,268 @@
<resources>
<string name="app_name">HPOS ಪರೀಕ್ಷೆ</string>
<string-array name="instrument">
<item>TestRight</item>
<item>Denovix</item>
</string-array>
<string-array name="gender">
<item>ಪುರುಷ</item>
<item>ಹೆಣ್ಣು</item>
<item>ಇತರ</item>
</string-array>
<string-array name="yes_no">
<item>ಹೌದು</item>
<item>ಇಲ್ಲ</item>
</string-array>
<string-array name="category">
<item>GEN</item>
<item>OBC</item>
<item>SC</item>
<item>ST</item>
</string-array>
<string-array name="blood_group">
<item>O+ve</item>
<item>O-ve</item>
<item>A+ve</item>
<item>A-ve</item>
<item>B+ve</item>
<item>B-ve</item>
<item>AB+ve</item>
<item>AB-ve</item>
</string-array>
<string name="hello_blank_fragment">ಹಲೋ ಖಾಲಿ ಫ್ರ್ಯಾಗ್ಮೆಂಟ್</string>
<string name="select_the_test">ಪರೀಕ್ಷೆಯನ್ನು ಆಯ್ಕೆಮಾಡಿ</string>
<string name="set_reference">ಸಂದರ್ಭ ಹೊಂದಿಸಿ</string>
<!-- Alert Dialog -->
<string name="have_you_placed">ನೀವು ಆಧಾರ ನಮೂದಿಸಿದ್ದೀರಾ?</string>
<string name="please_place">ದಯವಿಟ್ಟು ಚಲಾಯಿಸುವ ಮೊದಲು ನಮೂದಿಸಿದ ನಮೂನೆಯ ಕೂವೆಟ್ಟನ್ನು ಇಟ್ಟುಕೊಳ್ಳಿ</string>
<string name="yes">ಹೌದು</string>
<string name="no">ಇಲ್ಲ</string>
<string name="noo"></string>
<string name="connect">ಸಂಪರ್ಕಿಸಿ</string>
<string name="connected">ಸಂಪರ್ಕಿಸಿದೆ</string>
<string name="read">ಓದಿ</string>
<string name="update_reference">ರೇಫರೆನ್ಸ್ ಅಪ್‌ಡೇಟ್ ಮಾಡಿ</string>
<string name="have_you_placed_sample">ನೀವು ನಮೂನೆಯ ಕೂವೆಟ್ ಇಟ್ಟಿದ್ದೀರಾ?</string>
<string name="please_place_sample">ದಯವಿಟ್ಟು ಚಲಾಯಿಸುವ ಮೊದಲು ನಮೂದಿಸಿದ ನಮೂನೆಯ ಕೂವೆಟ್ಟನ್ನು ಇಟ್ಟುಕೊಳ್ಳಿ</string>
<string name="yes_and_run">ಹೌದು, ರನ್</string>
<!-- Instructions Text -->
<string name="Instructions">ಪರೀಕ್ಷಣ ನಿರ್ದೇಶಗಳು</string>
<string name="step1"><b><u>ಹೆಜ್ಜೆ 1</u> : </b> ಆಧಾರ/ಬೇಸ್ಲೈನ್ ನಮೂನೆಯನ್ನು ಹೊಂದಿಸಲು ಕೂವೆಟ್ಟನ್ನು ಇಟ್ಟುಕೊಳ್ಳಿ</string>
<string name="step2"><b><u>ಹೆಜ್ಜೆ 2</u> : </b> ಡೆವೈಸ್ ಮೌಲ್ಯಗಳನ್ನು ಓದಲು ಬಟನ್ ಕೆಳಗೆ ಒತ್ತಿ</string>
<string name="step3"><b><u>ಹೆಜ್ಜೆ 1</u> : </b> ಪ್ರಾರಂಭಿಸಲು ನಮೂನೆ ವಿವರಗಳನ್ನು ನಮೂದಿಸಿ</string>
<string name="step4"><b><u>ಹೆಜ್ಜೆ 1</u> : </b> ರಸದ ನಮೂನೆಯನ್ನು ಪರೀಕ್ಷೆಗಾಗಿ ಇಟ್ಟುಕೊಳ್ಳಿ</string>
<string name="step5"><b><u>ಹೆಜ್ಜೆ 2</u> : </b> ಡೆವೈಸ್ ಮೌಲ್ಯಗಳನ್ನು ಓದಲು ಬಟನ್ ಕೆಳಗೆ ಒತ್ತಿ</string>
<string name="login_id">ಲಾಗಿನ್ ಐಡಿ</string>
<string name="password">ಪಾಸ್‌ವರ್ಡ್</string>
<string name="login">ಲಾಗಿನ್</string>
<string name="acquire">ಸಹಿಸಿ</string>
<string name="enter_patient_details">ರೋಗಿಯ ವಿವರಗಳನ್ನು ನಮೂದಿಸಿ</string>
<string name="patient_name">ರೋಗಿಯ ಹೆಸರು</string>
<string name="age">ವಯಸ್ಸು ವರ್ಷಗಳಲ್ಲಿ</string>
<string name="gender">ಲಿಂಗ</string>
<string name="name_error">ಹೆಸರು ಖಾಲಿ ಇರಬಾರದು</string>
<string name="age_error">ವಯಸ್ಸು ಖಾಲಿ ಇರಬಾರದು</string>
<string name="gender_error">ಲಿಂಗ ಖಾಲಿ ಇರಬಾರದು</string>
<string name="age_error_out_of_bound">ವಯಸ್ಸು ಯಾವುದೇ ಸಾಧ್ಯವಿಲ್ಲ</string>
<string name="yob_error">ಹುಟ್ಟಿದ ವರ್ಷ ಖಾಲಿ ಇರಬಾರದು</string>
<string name="yob_error_2">ಅಮಾನ್ಯ ಹುಟ್ಟಿದ ವರ್ಷ</string>
<string name="mobile_error">ಮೊಬೈಲ್ ಸಂಖ್ಯೆ ಖಾಲಿ ಇರಬಾರದು</string>
<string name="mobile_error_invalid">ಮೊಬೈಲ್ ಸಂಖ್ಯೆ ಅಮಾನ್ಯ (10 ಅಂಕಗಳನ್ನು ನಮೂದಿಸಿ)</string>
<string name="this_error">ಇದು ಖಾಲಿ ಇರಬಾರದು</string>
<string name="test_results">ಪರೀಕ್ಷಾ ಫಲಿತಾಂಶಗಳು</string>
<string name="name_in_textview"><b>ಹೆಸರು</b> : %1$s</string>
<string name="gender_in_textview"><b>ಲಿಂಗ</b> : %1$s</string>
<string name="age_in_textview"><b>ವಯಸ್ಸು</b> : %1$s ವರ್ಷಗಳು</string>
<string name="results_in_textview"><b>ಫಲಿತಾಂಶಗಳು</b> :</string>
<string name="negative">ನೆಗೆಟಿವ್\ \ </string>
<string name="download_report">ವರದಿ\nಡೌನ್ಲೋಡ್ ಮಾಡಿ</string>
<string name="home">ಹೋಮ್</string>
<string name="new_test">ಹೊಸ ಪರೀಕ್ಷೆ</string>
<string name="start_now">ಈಗ ಪ್ರಾರಂಭಿಸಿ</string>
<string name="hemo_cube">ಹೆಮೋ ಕ್ಯೂಬ್</string>
<string name="hb">ಹೆಮೊಗ್ಲೊಬಿನ್</string>
<string name="normal">ಸಾಮಾನ್ಯ\ \ </string>
<string name="sickle_cell_disease">ಸಿಕ್ಲ್ ಸೆಲ್ ರೋಗ\ \ </string>
<string name="sickle_cell_trait">ಸಿಕ್ಲ್ ಸೆಲ್ ಗುಣ\ \ </string>
<string name="undefined">ಅವ್ಯಾಖ್ಯಾತ\ \ </string>
<string name="sicklecell_nconfirmatory">ಸಿಕ್ಲ್‌ಸೆಲ್\nದೃಢೀಕರಣ</string>
<string name="sicklecell_screening">ಸಿಕ್ಲ್ ಸೆಲ್ ಸ್ಕ್ರೀನಿಂಗ್</string>
<string name="thalassemia">ಥ್ಯಾಲಸೀಮಿಯಾ</string>
<string name="usb_connection">USB ಕನೆಕ್ಷನ್</string>
<string name="high_performance_optical_spectroscopy">ಹೈ ಪರಫಾರ್ಮೆನ್ಸ್\nಆಪ್ಟಿಕಲ್ ಸ್ಪೆಕ್ಟ್ರೋಸ್ಕೊಪಿ</string>
<string name="sickle_cert">ಸಿಕ್ಲ್ ಸರ್ಟಿಫಿಕೇಟ್</string>
<string name="sickle_find">ಸಿಕ್ಲ್ ಹುಡುಕಿ</string>
<string name="submit">ಸಲ್ಲಿಸಿ</string>
<string name="diagnostics">ಡೆವೈಸ್ ಟೆಸ್ಟ್</string>
<string name="place_buffer">ಪ್ರಾರಂಭಿಸಿ</string>
<string name="Start_Sample">ನಮೂನೆ ಪ್ರಾರಂಭಿಸಿ</string>
<string name="new_kit">ಹೊಸ ಕಿಟ್</string>
<string name="new_buffer">ಹೊಸ ಬಫರ್</string>
<string name="name_error_2">ಅಮಾನ್ಯ ಅಕ್ಷರ, ಅನುಮತವಾದ ಅಕ್ಷರಗಳು ಅಕ್ಷರಗಳು, ಸಂಖ್ಯೆಗಳು ಮತ್ತು ( ) _ - , . ಮಾತ್ರ</string>
<string name="recommended">\*ಫಲಿತಾಂಶವನ್ನು ಪ್ರಯೋಗಶಾಲೆಯ ಪರೀಕ್ಷಾದಿಂದ ದೃಢೀಕರಿಸಬೇಕು</string>
<string name="recommended_age">\*ಫಲಿತಾಂಶವನ್ನು ಪ್ರಯೋಗಶಾಲೆಯ ಪರೀಕ್ಷಾದಿಂದ ದೃಢೀಕರಿಸಬೇಕು ಏಕೆಂದರೆ ರೋಗಿಯ ವಯಸ್ಸು 5 ವರ್ಷಗಳಿಗಿಂತ ಕಡಿಮೆ</string>
<string name="positive_borderline">ಧನಸ್ಪರ್ಶ</string>
<string name="negative_borderline">ನೆಗೆಟಿವ್ ಬಾರ್ಡರ್‌ಲೈನ್</string>
<string name="is_patient_under_any_medication">ರೋಗಿ ಯಾವುದೇ ಔಷಧಿ ಅಥವಾ ಚಿಕಿತ್ಸೆಯಲ್ಲಿದ್ದಾನೆಯೇ?</string>
<string name="is_patient_undergoing_any_blood_transfusion">ರೋಗಿಗೆ ರಕ್ತ ಪ್ರವಾಹನೆ ನಡೆಯುತ್ತಿದೆಯೇ?</string>
<string name="scan_aadhaar_card">ಆಧಾರ್ ಕಾರ್ಡ್\nಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="patient_details">ರೋಗಿ ವಿವರಗಳು</string>
<string name="or">ಅಥವಾ</string>
<string name="scan_abha_card">ABHA ಕಾರ್ಡ್\nಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="list_of_patients">ರೋಗಿಗಳ ಪಟ್ಟಿ</string>
<string name="no_patient_records_found_to_test_please_add_one_from_below">ಪರೀಕ್ಷಿಸಲು ಯಾವುದೇ ರೋಗಿ ವಿವರಗಳು ಸಿಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ಕೆಳಗಿನಿಂದ ಒಂದನ್ನು ಸೇರಿಸಿ.</string>
<string name="add">ಸೇರಿಸಿ</string>
<string name="test">ಪರೀಕ್ಷೆ</string>
<string name="pending">ಬಾಕಿ</string>
<string name="scan_patient_abha_id_card">ABHA ಐಡಿ ಕಾರ್ಡ್ ಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="scan_now">ಈಗ ಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="enter_abha_number_manualy">ABHA ಸಂಖ್ಯೆಯನ್ನು ಕೈಯಿಂದ ನಮೂದಿಸಿ</string>
<string name="abha_id">ABHA ಐಡಿ</string>
<string name="patient_id_in_tv"><b>ಬಳಕೆದಾರ ಐಡಿ</b> : %1$s</string>
<string name="go">ಹೋಗಿ</string>
<string name="click_here">ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ</string>
<string name="title_activity_dashboard">ಡ್ಯಾಶ್‌ಬೋರ್ಡ್ ಆರಂಭ</string>
<string name="navigation_drawer_open">ನೇವಿಗೇಷನ್ ಡ್ರಾಯರ್ ತೆರೆಯಲಿ</string>
<string name="navigation_drawer_close">ನೇವಿಗೇಷನ್ ಡ್ರಾಯರ್ ಮುಚ್ಚಲಿ</string>
<string name="nav_header_title">HPOS</string>
<string name="nav_header_subtitle">sminnovations.in</string>
<string name="nav_header_desc">ನೇವಿಗೇಷನ್ ಹೆಡರ್</string>
<string name="action_settings">ಸೆಟ್ಟಿಂಗ್ಗಳು</string>
<string name="menu_home">ಹೋಮ್</string>
<string name="show_hemocube_result">ಫಲಿತಾಂಶ ತೋರಿಸಿ</string>
<string name="menu_gallery">ಗ್ಯಾಲರಿ</string>
<string name="menu_settings">ಸೆಟ್ಟಿಂಗ್ಗಳು</string>
<string name="profile">ಪ್ರೊಫೈಲ್</string>
<string name="year_of_birth">ಹುಟ್ಟಿದ ವರ್ಷ</string>
<string name="father_s_name_husband_s_name">ತಂದೆಯ/ಗಂಡನ ಹೆಸರು</string>
<string name="is_patient_married_yes_no">ರೋಗಿ ಮದುವೆಯಾಗಿದ್ದಾನೆಯೇ? (ಹೌದು/ಇಲ್ಲ)</string>
<string name="category">ವರ್ಗ</string>
<string name="blood_group">ರಕ್ತ ಗುಂಪು</string>
<string name="digital_card">ಡಿಜಿಟಲ್ ಸಲಹಾ ಕಾರ್ಡ್</string>
<string name="patient_medical_records">ರೋಗಿ ವೈದ್ಯಕೀಯ ದಾಖಲೆಗಳು</string>
<string name="patient_address_details">ರೋಗಿಯ ವಿಳಾಸ ವಿವರಗಳು</string>
<string name="district">ಜಿಲ್ಲೆ</string>
<string name="city_town">ನಗರ/ಪಟ್ಟಣ</string>
<string name="state">ರಾಜ್ಯ</string>
<string name="pincode">ಪಿನ್‌ಕೋಡ್</string>
<string name="threedots">...</string>
<string name="create_abha_id_card">ABHA ಐಡಿ ಕಾರ್ಡ್ ರಚಿಸಿ</string>
<string name="official_abha_app">ಆಧಿಕಾರಿ ABHA ಆಪ್</string>
<string name="scan_patient_aadhaar_card">ರೋಗಿ ಆಧಾರ್ ಕಾರ್ಡ್ ಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="enter_aadhaar_number_manualy">ಆಧಾರ್ ಸಂಖ್ಯೆಯನ್ನು ಕೈಯಿಂದ ನಮೂದಿಸಿ</string>
<string name="aadhaar_number">ಆಧಾರ್ ಸಂಖ್ಯೆ</string>
<string name="aadhaar_in_tv"><b>ಆಧಾರ್ ಸಂಖ್ಯೆ</b></string>
<string name="please_use_official_abha_app_to_create_abha_id_and_come_back">ದಯವಿಟ್ಟು "ಆಧಿಕಾರಿ ABHA ಆಪ್" ಅನ್ನು ಬಳಸಿ ABHA ಐಡಿ ರಚಿಸಿ ಮತ್ತು ಹಿಂತಿರುಗಿ ಬನ್ನಿ.</string>
<string name="please_enter_aadhaar">ಮುಂದುವರಿಸಲು ದಯವಿಟ್ಟು ಆಧಾರ್ ಸಂಖ್ಯೆಯನ್ನು ನಮೂದಿಸಿ</string>
<string name="scan_qr_code_of_the_kit">ಕಿಟ್ ಯಾವಾಗಲೂ QR ಕೋಡ್ ಸ್ಕ್ಯಾನ್ ಮಾಡಿ</string>
<string name="enter_kit_serial_number_manually">ಕಿಟ್ ಸೀರಿಯಲ್ ಸಂಖ್ಯೆಯನ್ನು ಕೈಯಿಂದ ನಮೂದಿಸಿ</string>
<string name="serial_number">ಸೀರಿಯಲ್ ಸಂಖ್ಯೆ</string>
<string name="set_baseline_reference_again">ಬೇಸ್ಲೈನ್/ಸಂದರ್ಭ ಹೊಂದಿಸಿರಾ?</string>
<string name="baseline_instruction">ಬೇಸ್ಲೈನ್ ನಿರ್ದೇಶನ</string>
<string name="to_be_launched_in_next_version_of_the_app">ಮುಂದಿನ ಆಪ್ ಆವೃತ್ತಿಯಲ್ಲಿ ಪ್ರಕಟಿಸಲಾಗಿದೆ</string>
<string name="invalid_kit">ಅಮಾನ್ಯ ಕಿಟ್ ಸೀರಿಯಲ್ ಸಂಖ್ಯೆ, ಶರಿಯಾದ ಉದಾಹರಣೆ, SMI/SC/019/01/001</string>
<string name="user_list">ಬಳಕೆದಾರ ಪಟ್ಟಿ</string>
<string name="user_id">ಬಳಕೆದಾರ ಐಡಿ</string>
<string name="aadhar_id">ಆಧಾರ್ ಐಡಿ</string>
<string name="internet_not_available_please_enter_the_user_id_manually">ಇಂಟರ್ನೆಟ್ ಇಲ್ಲದೆ, ದಯವಿಟ್ಟು ಬಳಕೆದಾರ ಐಡಿ ಮತ್ತು ರಕ್ತ ಗುಂಪುವನ್ನು ಕೈಯಿಂದ ನಮೂದಿಸಿ</string>
<string name="user_id_error_message">ಬಳಕೆದಾರ ಐಡಿ 18 ಅಂಕಗಳಿರಬೇಕು ಮತ್ತು ದಯವಿಟ್ಟು ರಕ್ತ ಗುಂಪುವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ</string>
<string name="upload_db_registration_title">ಸ್ಥಾನಿಕ DB ಪರೀಕ್ಷೆಗಳನ್ನು ಅಪ್ಲೋಡ್ ಮಾಡಿ</string>
<string name="upload_db_registration_message">ನೀವು ಸ್ಥಾನಿಕ DB ಪರೀಕ್ಷೆಗಳನ್ನು ಕ್ಲೌಡ್‌ಗೆ ಅಪ್ಲೋಡ್ ಮಾಡಲು ಬಯಸುತ್ತೀರಾ?</string>
<string name="download_db_registration_title">ಡೌನ್ಲೋಡ್ ಡಿಬಿ ಟೆಸ್ಟ್‌ಗಳು</string>
<string name="download_db_registration_message">ನೀವು ಲೋಕಲ್ ಡಿಬಿ ಟೆಸ್ಟ್‌ಗಳನ್ನು CSV ಆಕರದಲ್ಲಿ ಡೌನ್ಲೋಡ್ ಮಾಡಲು ಬಯಸುತ್ತೀರಾ?</string>
<string name="upload">ಅಪ್ಲೋಡ್ ಮಾಡಿ</string>
<string name="cancel">ರದ್ದು ಮಾಡಿ</string>
<string name="upload_success_message">ಯಶಸ್ವಿಯಾಗಿ ಅಪ್ಲೋಡ್ ಮಾಡಲಾಗಿದೆ</string>
<string name="test_completed">ಪರೀಕ್ಷೆ ಮುಗಿಯಿತು</string>
<string name="select_blood_group">ರಕ್ತ ಗುಂಪು ಆಯ್ಕೆಮಾಡಿ</string>
<string name="all_registered_user_are_tested_successfully">ಎಲ್ಲಾ ನೋಂದಣಿಗೆ ಬಂದ ಬಳಕೆದಾರರನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಪರೀಕ್ಷಿಸಲಾಗಿದೆ</string>
<string name="start_incubation">ಇನ್ಕ್ಯೂಬೇಶನ್ ಆರಂಭ</string>
<string name="check_buffer">ಬಫರ್ ಚೆಕ್ ಮಾಡಿ</string>
<!-- Kannada Translations -->
<string name="low_battery_warning">ಬ್ಯಾಟರಿ ಸ್ತರ 40% ಕ್ಕಿಂತ ಕಡಿಮೆಯಾಗಿದೆ, ದಯವಿಟ್ಟು ಸಾಧನವನ್ನು ಮುಂದುವರಿಸಲು ಸಾಧನವನ್ನು ಚಾರ್ಜ್ ಮಾಡಿ</string>
<string name="test_already_conducted">ಈ ಬಳಕೆದಾರನ ಮೇಲೆ ಪರೀಕ್ಷೆ ಇನ್ನು ಮುಗಿದಿದೆ</string>
<string name="incubation_not_completed">ಇನ್ಕ್ಯೂಬೇಷನ್ ಹತ್ತಿಲ್ಲ 15 ನಿಮಿಷಗಳ ಪೂರ್ತಿ ಆಗಿಲ್ಲ</string>
<string name="incubation_crossed_30_minutes">ಇನ್ಕ್ಯೂಬೇಷನ್ 30 ನಿಮಿಷಗಳನ್ನು ದಾಟಿದೆ, ಇನ್ನೊಮ್ಮೆ ಇನ್ಕ್ಯೂಬೇಷನ್ ಮಾಡಬೇಕಾಗಿದೆ</string>
<string name="incubation_not_started">ಈ ಬಳಕೆದಾರನ ಮೇಲೆ ಇನ್ಕ್ಯೂಬೇಷನ್ ಆರಂಭವಾಗಿಲ್ಲ</string>
<string name="test_concluded">ಪರೀಕ್ಷೆ ಮುಗಿಯಿತು</string>
<string name="test_pending">ಪರೀಕ್ಷೆ ಬಾಕಿ ಇದೆ</string>
<string name="blood_group_error">ದಯವಿಟ್ಟು ನಿಮ್ಮ ರಕ್ತ ಗುಂಡಾರವನ್ನು ನಮೂದಿಸಿ</string>
<string name="blood_group_toast">ದಯವಿಟ್ಟು ನಿಮ್ಮ ರಕ್ತ ಗುಂಡಾರವನ್ನು ನಮೂದಿಸಿ</string>
<string name="blood_group_updated_successfully">ರಕ್ತ ಗುಂಡಾರ ಯಶಸ್ವಿಯಾಗಿ ನವೀಕರಿಸಲಾಗಿದೆ</string>
<string name="failed_to_update_blood_group">ರಕ್ತ ಗುಂಡಾರ ನವೀಕರಿಸಲು ವಿಫಲವಾಗಿದೆ: %1$s</string>
<string name="no_user_data_found">ನೀರು ನಿರ್ದಿಷ್ಟ ಐಡಿಗೆ ಯಾವುದೇ ಬಳಕೆದಾರ ಡೇಟಾ ಕಂಡುಬಂದಿಲ್ಲ</string>
<string name="device_disconnected">ಸಾಧನ ಹಂಚಿಹೋಯಿತು</string>
<string name="no_device_found">ಯಾವುದೇ ಸಾಧನ ಕಂಡುಬಂದಿಲ್ಲ</string>
<string name="invalid_kit_number">ಅಮಾನ್ಯವಾದ ಕಿಟ್ ಸಂಖ್ಯೆ</string>
<string name="internt_not">ಇಂಟರ್ನೆಟ್ ಲಭ್ಯವಿಲ್ಲ</string>
<string name="internt_not_local">ಇಂಟರ್ನೆಟ್ ಲಭ್ಯವಿಲ್ಲ, ಪರೀಕ್ಷೆ ವಿವರಗಳನ್ನು ಸ್ಥಾನಿಕವಾಗಿ ಉಳಿಸಲಾಗಿದೆ</string>
<string name="error_local">ಡೇಟಾ ಅಪ್ಲೋಡ್ ಮಾಡುವಾಗ ತಪ್ಪಾಗಿದೆ, ಪರೀಕ್ಷೆ ವಿವರಗಳನ್ನು ಸ್ಥಾನಿಕವಾಗಿ ಉಳಿಸಲಾಗಿದೆ</string>
<string name="error_exist">ಇನ್ನೊಂದು ಬಫರ್ ಪಡೆಯುವಾಗ ತಪ್ಪಾಗಿದೆ</string>
<string name="do_exist">ನೀವು ಇನ್ನೊಂದು ಬಫರ್ ಜಾರಿಗೆ ಹೋಗಲು ಇಚ್ಛಿಸುತ್ತಾರಾ?</string>
<string name="test_go_noback">ಪರೀಕ್ಷೆ ಜರುಗುತ್ತಿದೆ, ಹಿಂತಿರುಗಲು ಸಾಧ್ಯವಿಲ್ಲ</string>
<string name="kit_uploaded">ಕಿಟ್ ಪರಿಣಾಮ ಯಶಸ್ವಿಯಾಗಿ ಅಪ್ಲೋಡ್ ಆಗಿದೆ</string>
<string name="kit_upload_failed">ಕಿಟ್ ಪರಿಣಾಮ ಅಪ್ಲೋಡ್ ಆಗಲಿಲ್ಲ, ಅದನ್ನು ಕೈಯಾರೆ ಹೊಸದಾಗಿ ಬರೆಯಿರಿ</string>
<string name="test_ongoing">ಪರೀಕ್ಷೆ ಜರುಗುತ್ತಿದೆ</string>
<string name="error_classification">ವರ್ಗೀಕರಣ ನಡೆಸುವಾಗ ತಪ್ಪಾಗಿದೆ</string>
<string name="test_upload">ಪರೀಕ್ಷೆ ಫಲಿತಾಂಶ ಯಶಸ್ವಿಯಾಗಿ ಅಪ್ಲೋಡ್ ಆಗಿದೆ</string>
<string name="test_upload_failed">ಪರೀಕ್ಷೆ ಫಲಿತಾಂಶ ಅಪ್ಲೋಡ್ ಆಗಲಿಲ್ಲ</string>
<string name="log_out">ಲಾಗೌಟ್ ಮಾಡಿ</string>
<string name="do_log_out">ನೀವು ಅಪ್ಲಿಕೇಶನ್ ನಿಂದ ಲಾಗೌಟ್ ಮಾಡಲು ಬಯಸುತ್ತಿದ್ದೀರಾ?</string>
<string name="cancelled_unable_scan">ರದ್ದು ಮಾಡಲಾಗಿದೆ: ಸ್ಕ್ಯಾನ್ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ, ಮತ್ತೊಮ್ಮೆ ಪ್ರಯಾಸಿಸಿ!!</string>
<string name="kit_updated">ಕಿಟ್ ಸಂಖ್ಯೆ ನವೀಕರಿಸಲಾಗಿದೆ, ದಯವಿಟ್ಟು ಟೆಸ್ಟ್ ಆರಂಭಿಸುವ ಮೊದಲು ಬಳಸುವವನನ್ನು ಆಯ್ಕೆಮಾಡಿ</string>
<string name="select_patient">ದಯವಿಟ್ಟು ಟೆಸ್ಟ್ ಆರಂಭಿಸುವ ಮೊದಲು ರೋಗಿಯನ್ನು ಆಯ್ಕೆಮಾಡಿ</string>
<string name="enable_location">ದಯವಿಟ್ಟು ಸ್ಥಾನ ಸೇವೆಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ</string>
<string name="location_denied">ಸರಿಯಾದ ಸ್ಥಾನ ಅನುಮತಿ ನಿರಾಕರಿಸಲಾಗಿದೆ</string>
<string name="coarse_location_denied">ಅಲ್ಪ ಸರಿಯಾದ ಸ್ಥಾನ ಅನುಮತಿ ನಿರಾಕರಿಸಲಾಗಿದೆ</string>
<string name="permission_grant">ನೀವು ಈ ಅಪ್ಲಿಕೇಶನ್ ಬಳಸಲು ಎಲ್ಲಾ ಫೈಲ್‌ಗಳಿಗೆ ಪ್ರವೇಶ ಅನುಮತಿ ನೀಡಬೇಕು</string>
<string name="permission_required">ಈ ಅಪ್ಲಿಕೇಶನ್ ಬಳಸಲು ಎಲ್ಲಾ ಅನುಮತಿಗಳು ಅಗತ್ಯವಿವೆ.</string>
<string name="device_not">ಡೆವೈಸ್ ಸಂಪರ್ಕಿಸಲಾಗಿಲ್ಲ.</string>
<string name="enter_proper_login_id">ದಯವಿಟ್ಟು ಸರಿಯಾದ ಲಾಗಿನ್ ಐಡಿ ನಮೂದಿಸಿ</string>
<string name="enter_proper_password">ದಯವಿಟ್ಟು ಸರಿಯಾದ ಪಾಸ್‌ವರ್ಡ್ ನಮೂದಿಸಿ</string>
<string name="wrong_password">ತಪ್ಪಾದ ಪಾಸ್‌ವರ್ಡ್</string>
<string name="wrong_user_id">ತಪ್ಪಾದ ಬಳಕೆದಾರ ಐಡಿ</string>
<string name="error_invalid_test">ಅಮಾನ್ಯ ಟೆಸ್ಟ್. ಡಿ-ಆಕ್ಸಿಜನೇಷನ್ ಸಮಸ್ಯೆ</string>
<string name="error_negative_abs">ದೋಷ: ನೆಗೆಟಿವ್ ಆಬ್ಸ್. ಬ್ಲ್ಯಾಂಕ್ ರೀಡಿಂಗ್ ಪುನಃ ತೆಗೆದುಕೊಳ್ಳಿ</string>
<string name="error_improper_buffer_high">ದೋಷ: ಅಮಾನ್ಯ ಟೆಸ್ಟ್. ಬಫರ್ ರೀಡಿಂಗ್ ಅಸರವಿಲ್ಲ (ಹೈ)</string>
<string name="error_improper_buffer_low">ದೋಷ: ಅಮಾನ್ಯ ಟೆಸ್ಟ್. ಬಫರ್ ರೀಡಿಂಗ್ ಅಸರವಿಲ್ಲ (ಲೋ)</string>
<string name="error_processing_device_data">ಡೇಟಾ ಪ್ರಕ್ರಿಯಿಸುವಾಗ ದೋಷ</string>
<string name="error_repeat_test_lower_volume">ಅಮಾನ್ಯ. ರೇಟ್ ಹೆಚ್ಚುವ ಹೊರತು ಪುನಃ ಟೆಸ್ಟ್ ಮಾಡಿ</string>
<string name="error_repeat_test_higher_volume">ಅಮಾನ್ಯ. ಅತ್ಯಂತ ಕಡಿಮೆ ಅಭ್ಸರ್ಬೆನ್ಸ್ - ಹೆಚ್ಚು ಹೊರತು ಪುನಃ ಟೆಸ್ಟ್</string>
<string name="positive_for_sickle_cell">ಸಿಕ್ಲ್ ಸೆಲ್ ಸಾಕಾರಿ. HPLC ದೃಢೀಕರಣಕ್ಕಾಗಿ</string>
<string name="something_wrong_with_device">ಸಾಧನದಲ್ಲಿ ಏನಾದರೂ ತಪ್ಪಾಗಿದೆ, ದಯವಿಟ್ಟು ಸಾಧನವನ್ನು ಹತ್ತಿರಕ್ಕೆ ತರಿಸಿ ಮತ್ತೆ ಬಳಸಿ ಬಳಸಿ ಬಳಸಿ ಪರೀಕ್ಷಿಸಿ</string>
<string name="processing_result">ಪ್ರಕ್ರಿಯಿಸುತ್ತಿದೆ ಫಲಿತ</string>
<string name="data_collected_processing_data">ಸಮಿತಿ ಸೇರಿಸಿದ ಡೇಟಾ, ಡೇಟಾ ಪ್ರಕ್ರಿಯಿಸುತ್ತಿದೆ</string>
<string name="sample_completed">ನಮೂನೆ ಪೂರ್ಣಗೊಂಡಿದೆ</string>
<string name="gathering_data">ಡೇಟಾ ಸಂಗ್ರಹಿಸುತ್ತಿದೆ</string>
<string name="sample_started">ನಮೂನೆ ಪ್ರಾರಂಭವಾಗಿದೆ</string>
<string name="buffer_completed">ಬಫರ್ ಪೂರ್ಣಗೊಂಡಿದೆ</string>
<string name="buffer_started">ಬಫರ್ ಪ್ರಾರಂಭವಾಗಿದೆ</string>
<string name="start">ಆರಂಭ</string>
<string name="place_sample">ನಮೂನೆ ಇಟ್ಟುಕೊಳ್ಳಿ</string>
<string name="invalid">ಅಮಾನ್ಯ</string>
<string name="error">ದೋಷ</string>
<string name="language_update">ಭಾಷೆ ಯಶಸ್ವಿಯಾಗಿ ನವೀಕರಿಸಲಾಗಿದೆ</string>
<string name="select_language">ನಿಮ್ಮ ಆದರಿತ ಭಾಷೆಯನ್ನು ಆಯ್ಕೆ ಮಾಡಿ</string>
<string name="app_language">ಅಪ್ಲಿಕೇಶನ್ ಭಾಷೆ</string>
<string name="add_blood_group">ರಕ್ತ ಗುಂಡನ್ನು ಸೇರಿಸಿ</string>
<string name="ok">ಸರಿ</string>
<string name="downloadcsv">CSV ಡೌನ್ಲೋಡ್ ಮಾಡಿ</string>
<!-- Add translations for other strings -->
</resources>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="languages">
<item>English</item>
<item>Kannada</item>
<!-- Add more languages as needed -->
</string-array>
<string-array name="language_values">
<item>en</item>
<item>ka</item>
<!-- Use language codes (e.g., en, kn) as values -->
</string-array>
</resources>

View File

@@ -67,7 +67,6 @@
<!-- <string name="step4"><b><u>Step 1</u> : </b> Place the cuvette containing sample for experiment.</string>-->
<string name="step4"><b><u>Step 1</u> : </b> Place the cuvette containing blood sample mixed with kit solution.</string>
<string name="step5"><b><u>Step 2</u> : </b> Press the button below to start the device reading values.</string>
<string name="login_id">Login ID</string>
<string name="password">Password</string>
<string name="login">Login</string>
@@ -80,7 +79,6 @@
<string name="age_error">Age can\'t be empty</string>
<string name="gender_error">Gender can\'t be empty</string>
<string name="age_error_out_of_bound">Age should be valid</string>
<string name="yob_error">Year of birth can\'t be empty</string>
<string name="yob_error_2">Invalid Year of Birth</string>
<string name="mobile_error">Mobile Number can\'t be empty</string>
@@ -121,7 +119,7 @@
<string name="recommended">\*Result to be confirmed with laboratory test</string>
<string name="recommended_age">\*Result to be confirmed with laboratory test as age of the patient is less than 5 years</string>
<string name="positive_borderline">Positive Borderline</string>
<string name="negative_borderline">Negative Borderline</string>
<string name="negative_borderline">Negative Borderline, Repeat Test</string>
<string name="is_patient_under_any_medication">Is Patient under any medication or treatment?</string>
<string name="is_patient_undergoing_any_blood_transfusion">Is Patient undergoing any blood transfusion?</string>
<string name="scan_aadhaar_card">Scan Aadhaar\nCard</string>
@@ -147,7 +145,6 @@
<string name="nav_header_subtitle">sminnovations.in</string>
<string name="nav_header_desc">Navigation header</string>
<string name="action_settings">Settings</string>
<string name="menu_home">Home</string>
<string name="show_hemocube_result">Show Result</string>
<string name="menu_gallery">Gallery</string>
@@ -158,6 +155,7 @@
<string name="is_patient_married_yes_no">Is Patient Married? (Yes/No)</string>
<string name="category">Category</string>
<string name="blood_group">Blood Group</string>
<string name="add_blood_group">Add Blood Group</string>
<string name="digital_card">Digital Counselling Card</string>
<string name="patient_medical_records">Patient Medical Records</string>
<string name="patient_address_details">Patient Address Details</string>
@@ -188,6 +186,8 @@
<string name="user_id_error_message">User ID should be 18 digits and please select the blood group</string>
<string name="upload_db_registration_title">Upload DB Tests</string>
<string name="upload_db_registration_message">Do you want to upload the local DB tests to the cloud?</string>
<string name="download_db_registration_title">Download DB Tests</string>
<string name="download_db_registration_message">Do you want to download the local DB tests in CSV format?</string>
<string name="upload">Upload</string>
<string name="cancel">Cancel</string>
<string name="upload_success_message">Upload done successfully</string>
@@ -196,5 +196,71 @@
<string name="all_registered_user_are_tested_successfully">All registered user are tested successfully</string>
<string name="start_incubation">Incubate</string>
<string name="check_buffer">Check Buffer</string>
<string name="low_battery_warning">Battery level is low than 40%, please charge the device to continue testing</string>
<string name="test_already_conducted">Test has been already conducted for this user</string>
<string name="incubation_not_completed">Incubation has not completed 15 minutes</string>
<string name="incubation_crossed_30_minutes">Incubation crossed 30 minutes, need to repeat the incubation</string>
<string name="incubation_not_started">Incubation not started for this user</string>
<string name="test_concluded">Test concluded</string>
<string name="test_pending">Test is Pending</string>
<string name="blood_group_error">Please enter your blood group</string>
<string name="blood_group_toast">Please enter your blood group</string>
<string name="blood_group_updated_successfully">Blood group updated successfully</string>
<string name="failed_to_update_blood_group">Failed to update blood group: %1$s</string>
<string name="no_user_data_found">No user data found for the specified ID</string>
<string name="device_disconnected">Device is Disconnected</string>
<string name="no_device_found">No device found</string>
<string name="invalid_kit_number">Invalid KIT Number</string>
<string name="internt_not">Internet is Not Available</string>
<string name="internt_not_local">Internet not available, test details stored locally</string>
<string name="error_local">Error uploading data, test details stored locally</string>
<string name="error_exist">error while getting existing buffer</string>
<string name="do_exist">Do you want to continue with existing buffer?</string>
<string name="kit_uploaded">Kit result uploaded successfully</string>
<string name="kit_upload_failed">Kit result uploading failed, note it down manually</string>
<string name="test_ongoing">test is going on</string>
<string name="test_go_noback">test is going on, can\'t go back</string>
<string name="error_classification">error while performing classification</string>
<string name="test_upload">Test Results Uploaded Successfully</string>
<string name="test_upload_failed">Test Results Upload Failed</string>
<string name="log_out">LOG OUT</string>
<string name="do_log_out">Do you want to LogOut the Application?</string>
<string name="cancelled_unable_scan">Cancelled: Unable to scan, Try Again!!</string>
<string name="kit_updated">Kit number is updated, Please Select user before starting test</string>
<string name="select_patient">Please Select patient before starting test</string>
<string name="enable_location">Please enable location services</string>
<string name="location_denied">Fine location permission denied</string>
<string name="coarse_location_denied">Coarse location permission denied</string>
<string name="permission_grant">You must grant permission to access all files to use the app</string>
<string name="permission_required">All permissions are required to use the app.</string>
<string name="device_not">Device Not Connected.</string>
<string name="enter_proper_login_id">Please enter a proper Login ID</string>
<string name="enter_proper_password">Please enter a proper password</string>
<string name="wrong_password">Wrong Password</string>
<string name="wrong_user_id">Wrong UserID</string>
<string name="error_invalid_test">Invalid Test. Problem with de-oxygenation</string>
<string name="error_negative_abs">Error: Negative Abs. Retake Blank Reading</string>
<string name="error_improper_buffer_high">Error: Invalid Test. Improper buffer reading (high)</string>
<string name="error_improper_buffer_low">Error: Invalid Test. Improper buffer reading (low)</string>
<string name="error_processing_device_data">error while processing device data</string>
<string name="error_repeat_test_lower_volume">Inconclusive. Repeat with test with lower volume of blood</string>
<string name="error_repeat_test_higher_volume">Inconclusive. Very low Absorbance - Repeat test with Higher Blood Volume</string>
<string name="positive_for_sickle_cell">Positive for Sickle Cell. HPLC for Confirmation</string>
<string name="something_wrong_with_device">Something is wrong with the device, please disconnect and reconnect the device and test the user again</string>
<string name="processing_result">processing result</string>
<string name="data_collected_processing_data">Data collected, Processing data</string>
<string name="sample_completed">Sample Completed</string>
<string name="gathering_data">Gathering data</string>
<string name="sample_started">Sample Started</string>
<string name="buffer_completed">Buffer Completed</string>
<string name="buffer_started">Buffer Started</string>
<string name="start">Start</string>
<string name="place_sample">Place Sample</string>
<string name="invalid">Invalid</string>
<string name="error">Error</string>
<string name="language_update">Language updated successfully</string>
<string name="select_language">Select your preferred language</string>
<string name="app_language">App Language</string>
<string name="ok">OK</string>
<string name="downloadcsv">Download CSV</string>
</resources>

View File

@@ -0,0 +1,15 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Language Settings">
<!-- Spinner to select language -->
<Preference
android:key="language_preference"
android:title="Select Language"
android:summary="Choose your preferred language"
android:dialogTitle="Select Language"
android:widgetLayout="@layout/language_spinner_preference"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -1,127 +0,0 @@
package com.example.hpostesting
import android.content.Context
import android.content.SharedPreferences
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.lifecycle.LiveData
import com.example.hpostesting.data.dao.HemoCubeDao
import com.example.hpostesting.data.model.Response
import com.example.hpostesting.data.model.patient.HemoCubeTestData
import com.example.hpostesting.data.model.patient.toHemoCubeTestData
import com.example.hpostesting.data.repository.DatabaseRepository
import com.example.hpostesting.data.repository.Repository
import com.example.hpostesting.presentation.hemocube.HemoCubeFragment
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
import com.example.hpostesting.presentation.hemocube.HemocubeActivity
import com.example.hpostesting.util.TestCoroutineRule
import `in`.sminnovations.hpostesting.databinding.FragmentHemoCubeReferenceBinding
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runBlockingTest
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mockito.ArgumentMatchers.any
import org.mockito.ArgumentMatchers.anyString
import org.mockito.Mock
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when`
import org.mockito.MockitoAnnotations
@ExperimentalCoroutinesApi
class HemoCubeViewModelTest {
// Add rule for testing LiveData
@get:Rule
val rule = InstantTaskExecutorRule()
// Add rule for testing coroutines
@get:Rule
val coroutineRule = TestCoroutineRule()
// Mock dependencies
@Mock
lateinit var hemoCubeDao: HemoCubeDao
@Mock
lateinit var repository: Repository
// Mock context
@Mock
lateinit var context: Context
// Mock LiveData for testing
@Mock
lateinit var networkStatusLiveData: LiveData<Boolean>
// Initialize the ViewModel
lateinit var viewModel: HemoCubeViewModel
private lateinit var hemoCubeFragment: HemoCubeFragment
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
// viewModel = HemoCubeViewModel(hemoCubeDao, repository, context)
hemoCubeFragment = HemoCubeFragment()
}
@Test
fun `uploadHemoCubeResultToDatabase with online status should call addResultTestToDb`() =
coroutineRule.runBlockingTest {
// Mock data and setup
val isOnline = true
val testStatus = true
val kitSerial = "12345"
// Mock the necessary methods
`when`(repository.addTestToDatabase(viewModel.testDetails!!))
.thenReturn(Response.Success("Success"))
// Call the function to be tested
viewModel.uploadHemoCubeResultToDatabase(isOnline, testStatus, kitSerial)
// Verify that addResultTestToDb is called
advanceUntilIdle()
assertEquals("Local", viewModel.fireBaseUpload.value)
}
// Similar tests can be written for other methods in HemoCubeViewModel
@Mock
private lateinit var mockSharedPreferences: SharedPreferences
@Mock
private lateinit var mockActivity: HemocubeActivity // Replace with your actual Activity class
@Mock
private lateinit var mockBinding: FragmentHemoCubeReferenceBinding // Replace with your actual Binding class
@Test
fun `findResult with valid input`() {
// Arrange
val validString = "valid string"
val fullReadOutput = "full read output"
`when`(mockSharedPreferences.getString(anyString(), anyString())).thenReturn("dummy_value")
`when`(mockActivity.runOnUiThread(any())).thenAnswer {
val runnable = it.getArgument(0, Runnable::class.java)
runnable.run()
}
// Act
val result = hemoCubeFragment.findResult(calculatedRatio = 0.06)
// Assert
// Add appropriate assertions based on the behavior you expect
// verify(mockSharedPreferences).edit()
// verify(mockBinding).btnSubmit.visibility = View.VISIBLE
// verify(mockBinding).btnSubmit.isEnabled = true
// Add more verifications as needed
assertEquals("Normal", result)
}
}