Compare commits
51 Commits
dev-for-V0
...
dev-withou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbce8cad63 | ||
|
|
ef620371f3 | ||
|
|
3fd36080ec | ||
|
|
1f8f2010ca | ||
|
|
c4ca1b7169 | ||
|
|
904c0fd2ad | ||
|
|
d7ef2b7ef9 | ||
|
|
efe9d83e2b | ||
|
|
74d8479aab | ||
|
|
b9a5b1c763 | ||
|
|
748af4155f | ||
|
|
0445e28fc1 | ||
|
|
aa4cf1b7c3 | ||
|
|
0c155ae131 | ||
|
|
4b60188582 | ||
|
|
f258cc3440 | ||
|
|
c91082ee6d | ||
|
|
e78ae3a29e | ||
|
|
e112035756 | ||
|
|
1031551bca | ||
|
|
9c4a4290bb | ||
|
|
f578c17b5f | ||
|
|
fdb63d808d | ||
|
|
dd2e115995 | ||
|
|
70f703199a | ||
|
|
d5955507b8 | ||
|
|
31e92a0cbb | ||
|
|
96ba5ce92f | ||
|
|
0635cb6813 | ||
|
|
326936fc26 | ||
|
|
da195ab573 | ||
|
|
47f586ff63 | ||
|
|
9c22bdabf9 | ||
|
|
0a103795cd | ||
|
|
541b555c05 | ||
|
|
d14afa0942 | ||
|
|
71a364a9a2 | ||
|
|
9aa89f810e | ||
|
|
262c3c19d2 | ||
|
|
12af81d142 | ||
|
|
29115786fa | ||
|
|
614192c04c | ||
|
|
4fe1a0e187 | ||
|
|
688165eaad | ||
|
|
a9c2a4c365 | ||
|
|
014e9bdc96 | ||
|
|
a3484153ed | ||
|
|
0bdf551574 | ||
|
|
d9882b14aa | ||
|
|
49fda2fdcb | ||
|
|
b47d55fce2 |
@@ -19,8 +19,8 @@ android {
|
||||
applicationId "in.sminnovations.hpostesting.dev"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 121
|
||||
versionName "2.1.121"
|
||||
versionCode 122
|
||||
versionName "2.1.122"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -62,6 +62,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.dagger:hilt-android:2.46"
|
||||
implementation 'androidx.activity:activity:1.8.0'
|
||||
kapt "com.google.dagger:hilt-android-compiler:2.46"
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.12.0'
|
||||
@@ -137,6 +138,7 @@ dependencies {
|
||||
implementation "androidx.room:room-ktx:2.6.1"
|
||||
implementation "androidx.room:room-runtime:2.6.1"
|
||||
kapt ("androidx.room:room-compiler:2.6.1")
|
||||
implementation "net.zetetic:android-database-sqlcipher:4.4.0"
|
||||
|
||||
//image
|
||||
implementation 'com.github.bumptech.glide:glide:4.13.2'
|
||||
@@ -166,5 +168,6 @@ dependencies {
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.aar'])
|
||||
implementation 'io.nats:jnats:2.11.4'
|
||||
implementation 'org.apache.commons:commons-math3:3.6.1'
|
||||
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting
|
||||
|
||||
import androidx.test.core.app.ActivityScenario
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
<!--
|
||||
~ // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
~ // Notice: All information contained herein is, and remains
|
||||
~ // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
~ // if any. The intellectual and technical concepts contained
|
||||
~ // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
~ // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
~ // patents in process, and are protected by trade secret or copyright law.
|
||||
~ // Dissemination of this information or reproduction of this material
|
||||
~ // is strictly forbidden unless prior written permission is obtained
|
||||
~ // from ShanMukha Innovations Pvt. Ltd.
|
||||
-->
|
||||
|
||||
<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">
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.BATTERY_STATS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
@@ -25,16 +24,20 @@
|
||||
|
||||
<application
|
||||
android:name="com.example.hpostesting.HPOSTestingApplication"
|
||||
android:largeHeap="true"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/hpos_icon"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:roundIcon="@mipmap/hpos_icon_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.HPOSTesting"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.usb_teminal.UsbTerminalActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.deviceinfo.DeviceActivity"
|
||||
android:exported="false" />
|
||||
@@ -60,23 +63,20 @@
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.calibration.CalibrationActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"/>
|
||||
|
||||
android:theme="@style/Theme.HPOS.NoActionBar" />
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.assurance.AssuranceControlsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"/>
|
||||
|
||||
android:theme="@style/Theme.HPOS.NoActionBar" />
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.hemocube.HemocubeActivity"
|
||||
android:exported="false"
|
||||
android:noHistory="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:parentActivityName="com.example.hpostesting.presentation.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.trueheme.TrueHemeActivity"
|
||||
android:exported="false"
|
||||
@@ -84,7 +84,6 @@
|
||||
android:parentActivityName="com.example.hpostesting.presentation.MainActivity"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.buffercheck.HemocubeBufferCheckActivity"
|
||||
android:exported="false"
|
||||
@@ -101,20 +100,21 @@
|
||||
android:name="com.example.hpostesting.presentation.dashboard.DashboardActivity"
|
||||
android:exported="false"
|
||||
android:label="@string/title_activity_dashboard"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||
tools:ignore="AppLinkUrlError,MissingClass">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="content" />
|
||||
<data android:scheme="file" />
|
||||
<data android:mimeType="application/vnd.android.package-archive" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
<service
|
||||
android:name="com.example.hpostesting.util.UsbService"
|
||||
android:enabled="true"
|
||||
@@ -125,9 +125,17 @@
|
||||
android:exported="true"
|
||||
android:noHistory="true"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.MAIN" />-->
|
||||
<!-- <category android:name="android.intent.category.HOME" />-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
<!-- <category android:name="android.intent.category.MONKEY"/>-->
|
||||
<!-- <category android:name="android.intent.category.LAUNCHER_APP" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@@ -164,8 +172,7 @@
|
||||
android:name="com.journeyapps.barcodescanner.CaptureActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:stateNotNeeded="true"
|
||||
tools:replace="android:screenOrientation" />
|
||||
<!-- ${applicationId}-->
|
||||
tools:replace="android:screenOrientation" /> <!-- ${applicationId} -->
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
@@ -175,7 +182,6 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1 +1,14 @@
|
||||
#
|
||||
# // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
# // Notice: All information contained herein is, and remains
|
||||
# // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
# // if any. The intellectual and technical concepts contained
|
||||
# // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
# // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
# // patents in process, and are protected by trade secret or copyright law.
|
||||
# // Dissemination of this information or reproduction of this material
|
||||
# // is strictly forbidden unless prior written permission is obtained
|
||||
# // from ShanMukha Innovations Pvt. Ltd.
|
||||
#
|
||||
|
||||
BASE_URL= https://datacollection.micropcr.com/api/
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting
|
||||
|
||||
import android.app.Application
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.api
|
||||
|
||||
import com.example.hpostesting.data.model.devicediagnostics.DeviceDiagnosticsRequest
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.api
|
||||
|
||||
import com.example.hpostesting.data.model.devicediagnostics.DeviceDiagnosticsRequest
|
||||
@@ -10,6 +23,7 @@ import com.example.hpostesting.data.model.updates.CheckUpdateResponse
|
||||
import com.example.hpostesting.data.model.updates.DeviceUpdateRequest
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.ResponseBody
|
||||
import retrofit2.Response
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Multipart
|
||||
@@ -32,7 +46,7 @@ interface MolbioResultApi {
|
||||
@POST("deviceService/device/getUpdate")
|
||||
suspend fun deviceUpdate(
|
||||
@Body deviceUpdateRequest: DeviceUpdateRequest,
|
||||
): ResponseBody
|
||||
): Response<ResponseBody>
|
||||
|
||||
@GET("deviceService/device/getClientCertificate")
|
||||
suspend fun downloadClientCertificate(
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
object Constants {
|
||||
const val ACTION_USB_PERMISSION = "shanmukha.in.sickle_cell.USB_PERMISSION"
|
||||
const val HEMOCUBE_USB_PERMISSION = "shanmukha.in.sickle_cell_homocube.USB_PERMISSION"
|
||||
|
||||
const val passphrase = "smi_#@sql"
|
||||
const val BASE_URL = "www.google.com"
|
||||
const val DOCUMENT_ID_FOR_UPDATE ="2o71vBKLqdgEKYtFG8Lb"
|
||||
const val ABHA_APP_PACKAGE = "in.ndhm.phr"
|
||||
|
||||
const val MOLBIO_INTEGRATION = true
|
||||
const val FIREBASE_INTEGRATION = false
|
||||
const val deviceProvisionEmail = "HPOS_provisioner@bigtec.co.in"
|
||||
const val deviceProvisionPassword = "f2ab0e7f9d69"
|
||||
const val DEVICE_ID_API = "deviceIDAPI"
|
||||
@@ -246,7 +260,9 @@ object Constants {
|
||||
const val BUFFER_VALUE_3 = "BufferValue3"
|
||||
const val BUFFER_VALUE_4 = "BufferValue4"
|
||||
const val DEVICE_ID = "DEVICE_ID"
|
||||
const val LABNAME = "LAB_NAME"
|
||||
|
||||
const val IS_TOKEN_AVAILABLE = "IS_TOKEN_AVAILABLE"
|
||||
const val BUFFER_LED_LOWER_BOUND = 21000
|
||||
const val BUFFER_LED_UPPER_BOUND = 23500
|
||||
|
||||
@@ -1229,7 +1245,7 @@ object Constants {
|
||||
const val PQ_MODE = true
|
||||
const val READINGS_PER_SAMPLE = 1
|
||||
|
||||
const val MINIMUM_BATTERY_LEVEL = 0
|
||||
const val MINIMUM_BATTERY_LEVEL = 40F
|
||||
|
||||
val BUFFER_INTENSITY_THRESHOLDS: Map<String, List<List<Int>>> = mapOf<String, List<List<Int>>>(
|
||||
"HCV-000-3001" to listOf(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
@@ -25,6 +38,7 @@ object DataHolder {
|
||||
var hemoCubeTestData: HemoCubeTestData? = null
|
||||
var kitSerial: String = ""
|
||||
var location: UserData.Location? = null
|
||||
var ipAddress: String = "0.0"
|
||||
var testExp: Boolean = true
|
||||
var hemocubeResult: Double? = null
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
enum class HemoCubeCommands(val command: String) {
|
||||
@@ -16,4 +29,5 @@ enum class HemoCubeCommands(val command: String) {
|
||||
THIRD_GAIN_COMMAND("V\r"),
|
||||
FORTH_GAIN_COMMAND("W\r"),
|
||||
CHECK_CUVETTE_COMMAND("L\r"),
|
||||
CHECK_TEMP_COMMAND("A\r"),
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
enum class TestRightCommands(val command: String) {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.constant
|
||||
|
||||
enum class TestStatus(val code: Double) {
|
||||
@@ -10,12 +23,13 @@ enum class TestStatus(val code: Double) {
|
||||
FIRST_EMPTY_AIR_READING_PRINT_COMPLETED(4.4),
|
||||
EPROM_ADC_RETRIEVAL_STARTED(4.5),
|
||||
EPROM_ADC_RETRIEVAL_COMPLETED(4.6),
|
||||
CUVETTE_ABSENT(4.7),
|
||||
CUVETTE_PRESENT(4.8),
|
||||
TEMPERATURE_CHECK(4.7),
|
||||
CUVETTE_ABSENT(4.8),
|
||||
CUVETTE_PRESENT(4.9),
|
||||
CUVETTE_ABSENTS(7.7),
|
||||
CUVETTE_PRESENTS(7.8),
|
||||
BUFFER_STARTED(4.9),
|
||||
BUFFER_COMPLETED(5.1),
|
||||
BUFFER_STARTED(5.1),
|
||||
BUFFER_COMPLETED(5.2),
|
||||
BUFFER_PRINT_STARTED(6.0),
|
||||
BUFFER_PRINT_COMPLETED(7.0),
|
||||
SAMPLE_STARTED(8.0),
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
@@ -13,10 +26,10 @@ interface HemoCubeDao {
|
||||
@Query("SELECT * from hemo_cube_test_table")
|
||||
fun getAll(): LiveData<List<HemoCubeTestData>>
|
||||
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE molbioFlag=false")
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE molbioFlag=0")
|
||||
fun getMolbioPending(): List<HemoCubeTestData>
|
||||
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE localFlag=false")
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE localFlag=0")
|
||||
fun getFirebasePending():List<HemoCubeTestData>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
@@ -37,7 +50,8 @@ interface HemoCubeDao {
|
||||
@Query("UPDATE hemo_cube_test_table SET isCSVCreated = :newValue WHERE _id = :id")
|
||||
suspend fun updateCSVFieldById(id: String, newValue: Boolean)
|
||||
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE localFlag = 0")
|
||||
@Query("SELECT * from hemo_cube_test_table WHERE molbioFlag = 0")
|
||||
fun getPendingUser(): LiveData<List<HemoCubeTestData>>
|
||||
|
||||
@Update
|
||||
suspend fun updateTest(hemoCubeTestData: HemoCubeTestData)
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.room.Database
|
||||
@@ -6,11 +19,12 @@ import androidx.room.TypeConverters
|
||||
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.MolbioHemocubeData
|
||||
import com.example.hpostesting.data.model.patient.UserData
|
||||
|
||||
@Database(
|
||||
entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class],
|
||||
version = 30,
|
||||
entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class,MolbioHemocubeData::class],
|
||||
version = 34,
|
||||
exportSchema = false
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
@@ -18,4 +32,5 @@ abstract class MyDatabase : RoomDatabase() {
|
||||
abstract fun userDao(): UserDao
|
||||
abstract fun hemoCubeDao(): HemoCubeDao
|
||||
abstract fun hemoCubeBufferDao(): HemoCubeBufferDao
|
||||
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.dao
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.datasource
|
||||
|
||||
import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.datasource
|
||||
|
||||
import android.os.Environment
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
data class CalculationVariableForTest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
data class ErrorMessage (
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
data class Location(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
import com.example.hpostesting.data.model.test.TestRightResultType
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
import java.util.Calendar
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
sealed class Response<out R> {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model
|
||||
|
||||
import com.example.hpostesting.data.constant.Constants
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.calibration
|
||||
|
||||
data class CalibrationData (
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.devicediagnostics
|
||||
|
||||
data class AdditionalDetails(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.devicediagnostics
|
||||
|
||||
data class DeviceDiagnosticsData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.devicediagnostics
|
||||
|
||||
data class DeviceDiagnosticsRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.devicediagnostics
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class Credentials(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class Device(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class DeviceProvisionData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class DeviceProvisionRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class DeviceType(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class DeviceUser(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.deviceprovision
|
||||
|
||||
data class ProvisionData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.diagnostics
|
||||
|
||||
data class DiagnosticsData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.jig
|
||||
|
||||
data class JigData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.log
|
||||
|
||||
data class UploadLogsData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.log
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
data class Device(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
data class DeviceType(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
data class DeviceUser(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
data class LoginData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
data class LoginRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.login
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.molbioresult
|
||||
|
||||
import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
||||
import com.example.hpostesting.data.model.patient.MolbioHemocubeData
|
||||
|
||||
data class MolbioV2Result(
|
||||
val age: Int? = 31,
|
||||
// val age: Int? = 31,
|
||||
val analysisDate: String? = "2024-02-08 16:33:56",
|
||||
val analysisId: String? = "",
|
||||
val analysisStatus: String? = "",
|
||||
val analysisType: String? = "HPOS",
|
||||
val analysisTypeMethod: String? = "",
|
||||
val bloodGroup: String? = "",
|
||||
// val bloodGroup: String? = "",
|
||||
val coefficients: List<Int>? = listOf(22, 22),
|
||||
val collectionLocation: List<Any>? = listOf(),
|
||||
val collectionTime: String? = "2024-02-08 16:33:56",
|
||||
@@ -17,12 +31,12 @@ data class MolbioV2Result(
|
||||
val curveFitting: String? = "Linear",
|
||||
val deviceName: String? = "HPOS",
|
||||
val expiryTime: String? = "2024-02-08 16:33:56",
|
||||
val gender: String? = "",
|
||||
// val gender: String? = "",
|
||||
val interpretation: String? = "",
|
||||
val `operator`: String? = "",
|
||||
val patientId: Int? = 4545,
|
||||
val pregnancy: Boolean? = false,
|
||||
val rawData: HemoCubeTestData? = HemoCubeTestData(),
|
||||
val rawData: MolbioHemocubeData? = HemoCubeTestData().MolbioHemocubeData(),
|
||||
val recommendation: String? = "NA",
|
||||
val sampleId: String? = "",
|
||||
val sampleType: String? = "",
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.molbioresult
|
||||
|
||||
import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
||||
import com.example.hpostesting.data.model.patient.MolbioHemocubeData
|
||||
|
||||
data class MolbioV2ResultData(
|
||||
val age: Int? = 0,
|
||||
// val age: Int? = 0,
|
||||
val analysisDate: String? = "2024-02-08 16:33:56",
|
||||
val analysisStatus: String? = "",
|
||||
val analysisType: String? = "",
|
||||
val analysisTypeMethod: String? = "",
|
||||
val bloodGroup: String? = "",
|
||||
// val bloodGroup: String? = "",
|
||||
val coefficients: List<Int>? = listOf(),
|
||||
val collectionLocation: List<Any>? = listOf(),
|
||||
val collectionTime: String? = "2024-02-08 16:33:56",
|
||||
@@ -18,13 +32,13 @@ data class MolbioV2ResultData(
|
||||
val curveFitting: String? = "",
|
||||
val deviceId: Int? = 0,
|
||||
val expiryTime: String? = "2024-02-08 16:33:56",
|
||||
val gender: String? = "",
|
||||
// val gender: String? = "",
|
||||
val id: Int? = 0,
|
||||
val interpretation: String? = "",
|
||||
val `operator`: String? = "",
|
||||
val patientId: Int? = 0,
|
||||
val pregnancy: Boolean? = false,
|
||||
val rawData: HemoCubeTestData? = HemoCubeTestData(),
|
||||
val rawData: MolbioHemocubeData? = HemoCubeTestData().MolbioHemocubeData(),
|
||||
val recommendation: String? = "",
|
||||
val sampleId: String? = "",
|
||||
val sampleType: String? = "",
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.molbioresult
|
||||
|
||||
data class MolbioV2ResultRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.molbioresult
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.molbioresult
|
||||
|
||||
import com.example.hpostesting.data.model.patient.UserData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import androidx.room.Entity
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import androidx.room.Entity
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import androidx.room.Entity
|
||||
@@ -93,4 +106,91 @@ data class HemoCubeTestData(
|
||||
var filter: String? = "",
|
||||
var volume: String? = "",
|
||||
var isCSVCreated: Boolean = false,
|
||||
var labName: String? = ""
|
||||
)
|
||||
|
||||
fun HemoCubeTestData.MolbioHemocubeData() = MolbioHemocubeData(
|
||||
sampleid = sampleid,
|
||||
_id = _id,
|
||||
name = name,
|
||||
incubationTime = incubationTime,
|
||||
state = state,
|
||||
location = location,
|
||||
reportUploadTime = reportUploadTime,
|
||||
testType = testType,
|
||||
testTime = testTime,
|
||||
testStatus = testStatus,
|
||||
localFlag = localFlag,
|
||||
deviceId = deviceId,
|
||||
appVersion = appVersion,
|
||||
deviceSerialNumber = deviceSerialNumber,
|
||||
deviceType = deviceType,
|
||||
kitSerial = kitSerial,
|
||||
resultData = resultData,
|
||||
led1Buffer = led1Buffer,
|
||||
led2Buffer = led2Buffer,
|
||||
led3Buffer = led3Buffer,
|
||||
led4Buffer = led4Buffer,
|
||||
led1Sample = led1Sample,
|
||||
led2Sample = led2Sample,
|
||||
led3Sample = led3Sample,
|
||||
led4Sample = led4Sample,
|
||||
led1Average = led1Average,
|
||||
led2Average = led2Average,
|
||||
led3Average = led3Average,
|
||||
led4Average = led4Average,
|
||||
abs1 = abs1,
|
||||
abs2 = abs2,
|
||||
abs3 = abs3,
|
||||
abs4 = abs4,
|
||||
hb3 = hb3,
|
||||
hb4 = hb4,
|
||||
led1Gain1 = led1Gain1,
|
||||
led2Gain1 = led2Gain1,
|
||||
led3Gain1 = led3Gain1,
|
||||
led4Gain1 = led4Gain1,
|
||||
led1Gain2 = led1Gain2,
|
||||
led2Gain2 = led2Gain2,
|
||||
led3Gain2 = led3Gain2,
|
||||
led4Gain2 = led4Gain2,
|
||||
led1Gain3 = led1Gain3,
|
||||
led2Gain3 = led2Gain3,
|
||||
led3Gain3 = led3Gain3,
|
||||
led4Gain3 = led4Gain3,
|
||||
led1Gain4 = led1Gain4,
|
||||
led2Gain4 = led2Gain4,
|
||||
led3Gain4 = led3Gain4,
|
||||
led4Gain4 = led4Gain4,
|
||||
led1Air1 = led1Air1,
|
||||
led2Air1 = led2Air1,
|
||||
led3Air1 = led3Air1,
|
||||
led4Air1 = led4Air1,
|
||||
led1Air2 = led1Air2,
|
||||
led2Air2 = led2Air2,
|
||||
led3Air2 = led3Air2,
|
||||
led4Air2 = led4Air2,
|
||||
deviceRatio = deviceRatio,
|
||||
calculatedRatio = calculatedRatio,
|
||||
predictedDenovixRatio = predictedDenovixRatio,
|
||||
slopeRatio = slopeRatio,
|
||||
coefficients = coefficients,
|
||||
classificationResult = classificationResult,
|
||||
prdClassification = prdClassification,
|
||||
deviceRatioClass = deviceRatioClass,
|
||||
slopeRatioClass = slopeRatioClass,
|
||||
borderlineMethod2Class = borderlineMethod2Class,
|
||||
errorMessages = errorMessages,
|
||||
batteryLevel = batteryLevel,
|
||||
batteryCapacity = batteryCapacity,
|
||||
batteryMaxCapacity = batteryMaxCapacity,
|
||||
batteryTemperature = batteryTemperature,
|
||||
batteryVoltage = batteryVoltage,
|
||||
molbioFlag = molbioFlag,
|
||||
quickCapture = quickCapture,
|
||||
solution = solution,
|
||||
concentration = concentration,
|
||||
filter = filter,
|
||||
volume = volume,
|
||||
isCSVCreated = isCSVCreated,
|
||||
labName = labName
|
||||
)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
|
||||
@Entity(tableName = "molbio_hemo_cube_test_table")
|
||||
data class MolbioHemocubeData(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
var sampleid: Int = 0,
|
||||
var _id: String = "",
|
||||
var name: String = "",
|
||||
var incubationTime: String = "",
|
||||
var state: String = "",
|
||||
var location: UserData.Location? = null,
|
||||
var reportUploadTime: String? = "",
|
||||
var testType: String? = "HEMOCUBE",
|
||||
var testTime: String? = "",
|
||||
var testStatus: Boolean? = false,
|
||||
var localFlag: Boolean = false,
|
||||
var deviceId: String? = "",
|
||||
var appVersion: String? = "",
|
||||
var deviceSerialNumber: String = "",
|
||||
var deviceType: String = "HEMOCUBE",
|
||||
var kitSerial: String = "",
|
||||
var resultData: String = "",
|
||||
var led1Buffer: Double? = null,
|
||||
var led2Buffer: Double? = null,
|
||||
var led3Buffer: Double? = null,
|
||||
var led4Buffer: Double? = null,
|
||||
var led1Sample: Double? = null,
|
||||
var led2Sample: Double? = null,
|
||||
var led3Sample: Double? = null,
|
||||
var led4Sample: Double? = null,
|
||||
var led1Average: Double? = null,
|
||||
var led2Average: Double? = null,
|
||||
var led3Average: Double? = null,
|
||||
var led4Average: Double? = null,
|
||||
var abs1: Double? = null,
|
||||
var abs2: Double? = null,
|
||||
var abs3: Double? = null,
|
||||
var abs4: Double? = null,
|
||||
var hb3: Double? = null,
|
||||
var hb4: Double? = null,
|
||||
var led1Gain1: Double? = null,
|
||||
var led2Gain1: Double? = null,
|
||||
var led3Gain1: Double? = null,
|
||||
var led4Gain1: Double? = null,
|
||||
var led1Gain2: Double? = null,
|
||||
var led2Gain2: Double? = null,
|
||||
var led3Gain2: Double? = null,
|
||||
var led4Gain2: Double? = null,
|
||||
var led1Gain3: Double? = null,
|
||||
var led2Gain3: Double? = null,
|
||||
var led3Gain3: Double? = null,
|
||||
var led4Gain3: Double? = null,
|
||||
var led1Gain4: Double? = null,
|
||||
var led2Gain4: Double? = null,
|
||||
var led3Gain4: Double? = null,
|
||||
var led4Gain4: Double? = null,
|
||||
var led1Air1: Double? = null,
|
||||
var led2Air1: Double? = null,
|
||||
var led3Air1: Double? = null,
|
||||
var led4Air1: Double? = null,
|
||||
var led1Air2: Double? = null,
|
||||
var led2Air2: Double? = null,
|
||||
var led3Air2: Double? = null,
|
||||
var led4Air2: Double? = null,
|
||||
var deviceRatio: Double? = null,
|
||||
var calculatedRatio: Double? = null,
|
||||
var predictedDenovixRatio: Double? = null,
|
||||
var slopeRatio: Double? = null,
|
||||
var coefficients: String? = "",
|
||||
var classificationResult: String = "",
|
||||
var prdClassification: String = "",
|
||||
var deviceRatioClass: String = "",
|
||||
var slopeRatioClass: String = "",
|
||||
var borderlineMethod2Class: String = "",
|
||||
var errorMessages: String = "",
|
||||
var batteryLevel: String = "",
|
||||
var batteryCapacity: String = "",
|
||||
var batteryMaxCapacity: String = "",
|
||||
var batteryTemperature: String = "",
|
||||
var batteryVoltage: String = "",
|
||||
var molbioFlag: Boolean = false,
|
||||
var quickCapture: Boolean = false,
|
||||
var solution: String? = "",
|
||||
var concentration: String? = "",
|
||||
var filter: String? = "",
|
||||
var volume: String? = "",
|
||||
var isCSVCreated: Boolean = false,
|
||||
var labName: String? = ""
|
||||
)
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import java.util.Date
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.patient
|
||||
|
||||
import androidx.room.Entity
|
||||
@@ -30,6 +43,7 @@ data class UserData(
|
||||
var result: TestRightResultType? = null,
|
||||
var resultRatio: Double? = null,
|
||||
var prdClassification: String = "",
|
||||
var sampleid: Int = 0
|
||||
) {
|
||||
enum class Gender {
|
||||
MALE,
|
||||
@@ -47,6 +61,8 @@ fun UserData.toHemoCubeTestData() = HemoCubeTestData(
|
||||
_id = _id,
|
||||
name = name,
|
||||
bloodGroup = bloodGroup,
|
||||
sampleid = sampleid,
|
||||
incubationTime = incubationTime,
|
||||
birthYear = birthYear,
|
||||
gender = gender,
|
||||
state = state,
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.test
|
||||
|
||||
data class TestRightCalculationData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.test
|
||||
|
||||
data class TestRightDeviceConstants(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.test
|
||||
|
||||
enum class TestRightResultType {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.test
|
||||
|
||||
enum class TestType {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.updates
|
||||
|
||||
data class CheckUpdateData(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.updates
|
||||
|
||||
data class CheckUpdateRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.updates
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.model.updates
|
||||
|
||||
data class DeviceUpdateRequest(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.repository
|
||||
|
||||
import android.net.Uri
|
||||
@@ -32,6 +45,7 @@ import com.google.firebase.storage.ktx.storage
|
||||
import kotlinx.coroutines.tasks.await
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.ResponseBody
|
||||
import retrofit2.HttpException
|
||||
import java.io.File
|
||||
import java.net.ConnectException
|
||||
import java.net.SocketTimeoutException
|
||||
@@ -39,6 +53,7 @@ import javax.inject.Inject
|
||||
import javax.inject.Named
|
||||
|
||||
class NetworkException(message: String, cause: Throwable) : Exception(message, cause)
|
||||
class ValidationException(message: String) : Exception(message)
|
||||
class DatabaseRepository @Inject constructor(
|
||||
@Named("Auth") private val molbioAuthApi: MolbioAuthApi,
|
||||
private val molbioResultApi: MolbioResultApi,
|
||||
@@ -51,6 +66,8 @@ class DatabaseRepository @Inject constructor(
|
||||
return try {
|
||||
val response = apiCall.invoke()
|
||||
Result.Success(response)
|
||||
}catch (e: HttpException) {
|
||||
Result.Error(ValidationException("Device Already Registered /"+e.message))
|
||||
} catch (e: SocketTimeoutException) {
|
||||
Result.Error(NetworkException("Network timeout", e))
|
||||
} catch (e: ConnectException) {
|
||||
@@ -76,8 +93,8 @@ class DatabaseRepository @Inject constructor(
|
||||
return safeApiCall { molbioResultApi.checkUpdate(checkUpdateRequest) }
|
||||
}
|
||||
|
||||
override suspend fun deviceUpdate(deviceUpdateRequest: DeviceUpdateRequest): Result<ResponseBody> {
|
||||
return safeApiCall { molbioResultApi.deviceUpdate(deviceUpdateRequest) }
|
||||
override suspend fun deviceUpdate(deviceUpdateRequest: DeviceUpdateRequest): retrofit2.Response<ResponseBody> {
|
||||
return molbioResultApi.deviceUpdate(deviceUpdateRequest)
|
||||
}
|
||||
|
||||
override suspend fun deviceDiagnostics(deviceDiagnosticsRequest: DeviceDiagnosticsRequest): Result<DeviceDiagnosticsResponse> {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.repository
|
||||
|
||||
import android.os.Environment
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.data.repository
|
||||
|
||||
import com.example.hpostesting.util.Result
|
||||
@@ -51,7 +64,7 @@ interface Repository {
|
||||
|
||||
suspend fun checkUpdate(checkUpdateRequest: CheckUpdateRequest): Result<CheckUpdateResponse>
|
||||
|
||||
suspend fun deviceUpdate(deviceUpdateRequest: DeviceUpdateRequest): Result<ResponseBody>
|
||||
suspend fun deviceUpdate(deviceUpdateRequest: DeviceUpdateRequest): retrofit2.Response<ResponseBody>
|
||||
suspend fun deviceDiagnostics(deviceDiagnosticsRequest: DeviceDiagnosticsRequest): Result<DeviceDiagnosticsResponse>
|
||||
suspend fun downloadClientCertificate(): Result<ResponseBody>
|
||||
suspend fun uploadLogs(logFile: MultipartBody.Part): Result<UploadLogsResponse>
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.di
|
||||
|
||||
import android.app.Application
|
||||
@@ -7,7 +20,7 @@ import android.content.res.AssetManager
|
||||
import androidx.room.Room
|
||||
import com.example.hpostesting.data.api.MolbioAuthApi
|
||||
import com.example.hpostesting.data.api.MolbioResultApi
|
||||
import com.example.hpostesting.util.PropertyProvider
|
||||
import com.example.hpostesting.data.constant.Constants
|
||||
import com.example.hpostesting.data.dao.HemoCubeBufferDao
|
||||
import com.example.hpostesting.data.dao.HemoCubeDao
|
||||
import com.example.hpostesting.data.dao.MyDatabase
|
||||
@@ -24,12 +37,15 @@ import com.example.hpostesting.domain.SaveRawData
|
||||
import com.example.hpostesting.domain.SaveRawDataTest
|
||||
import com.example.hpostesting.presentation.utils.UsbServiceListener
|
||||
import com.example.hpostesting.presentation.utils.UsbServiceListenerImpl
|
||||
import com.example.hpostesting.util.PropertyProvider
|
||||
import com.example.hpostesting.util.PropertyProviderImpl
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import net.sqlcipher.database.SQLiteDatabase
|
||||
import net.sqlcipher.database.SupportFactory
|
||||
import okhttp3.OkHttpClient
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
@@ -37,6 +53,7 @@ import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Named
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object AppModule {
|
||||
@@ -44,9 +61,12 @@ object AppModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideMyDatabase(@ApplicationContext context: Context): MyDatabase {
|
||||
val passphraseBytes: ByteArray = SQLiteDatabase.getBytes(Constants.passphrase.toCharArray())
|
||||
val factory = SupportFactory(passphraseBytes)
|
||||
|
||||
return Room.databaseBuilder(
|
||||
context, MyDatabase::class.java, "my_database"
|
||||
).fallbackToDestructiveMigration().build()
|
||||
).openHelperFactory(factory).fallbackToDestructiveMigration().build()
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import android.content.SharedPreferences
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import com.example.hpostesting.data.constant.Constants
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import android.util.Log
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import com.example.hpostesting.data.repository.LocalFileRepository
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import com.example.hpostesting.data.constant.Constants
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.domain
|
||||
|
||||
import com.example.hpostesting.data.model.test.TestRightCalculationData
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.encryption
|
||||
|
||||
import android.util.Base64
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation
|
||||
|
||||
import android.content.Context
|
||||
@@ -158,6 +171,12 @@ class KitScanActivity : AppCompatActivity(), IDcsSdkApiDelegate {
|
||||
binding.btnGo.setOnClickListener {
|
||||
val serialNumber = binding.nameEditText.text.toString().trim()
|
||||
if (serialNumber.isNotEmpty() && isSerialValid(serialNumber)) {
|
||||
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
R.string.kit_update,
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
if (DataHolder.selectedTest == null) {
|
||||
with(sharedPreference.edit()) {
|
||||
putString(
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation
|
||||
|
||||
import android.Manifest
|
||||
@@ -71,10 +84,10 @@ class MainActivity : AppCompatActivity() {
|
||||
locationCallback = object : LocationCallback() {
|
||||
override fun onLocationResult(locationResult: LocationResult) {
|
||||
locationResult.lastLocation?.let { location ->
|
||||
DataHolder.location =
|
||||
UserData.Location(location.latitude, location.longitude)
|
||||
DataHolder.selectedTest?.location =
|
||||
UserData.Location(location.latitude, location.longitude)
|
||||
// DataHolder.location =
|
||||
// UserData.Location(location.latitude, location.longitude)
|
||||
// DataHolder.selectedTest?.location =
|
||||
// UserData.Location(location.latitude, location.longitude)
|
||||
Log.i("Location", DataHolder.location.toString())
|
||||
}
|
||||
}
|
||||
@@ -301,14 +314,14 @@ class MainActivity : AppCompatActivity() {
|
||||
fusedLocationClient.lastLocation.addOnSuccessListener { location: Location? ->
|
||||
location?.let {
|
||||
if (DataHolder.selectedTest != null) {
|
||||
DataHolder.selectedTest!!.location =
|
||||
UserData.Location(location.latitude, location.longitude)
|
||||
// DataHolder.selectedTest!!.location =
|
||||
// UserData.Location(location.latitude, location.longitude)
|
||||
} else {
|
||||
startActivity(Intent(this, DashboardActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
DataHolder.location =
|
||||
UserData.Location(location.latitude, location.longitude)
|
||||
// DataHolder.location =
|
||||
// UserData.Location(location.latitude, location.longitude)
|
||||
} ?: run {
|
||||
requestLocationUpdates()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
@@ -20,6 +34,7 @@ import com.example.hpostesting.util.MyUtils
|
||||
import `in`.sminnovations.hpostesting.R
|
||||
import `in`.sminnovations.hpostesting.databinding.ActivitySplashBinding
|
||||
|
||||
@SuppressLint("CustomSplashScreen")
|
||||
class SplashActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var binding: ActivitySplashBinding
|
||||
@@ -51,6 +66,7 @@ class SplashActivity : AppCompatActivity() {
|
||||
requestPermissions()
|
||||
}
|
||||
|
||||
@SuppressLint("HardwareIds")
|
||||
private fun setupStaticConstants() {
|
||||
DataHolder.mobileUniqueId =
|
||||
Settings.Secure.getString(
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.res.Resources
|
||||
import android.os.BatteryManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -22,7 +38,7 @@ import java.util.Calendar
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
class OfflineUserListAdapter(private val view: View, private val batLevel: Int) :
|
||||
class OfflineUserListAdapter(private val view: View, private val batLevel: Int, private val fromWhere:String) :
|
||||
RecyclerView.Adapter<OfflineUserListAdapter.OfflineUserListViewHolder>() {
|
||||
|
||||
inner class OfflineUserListViewHolder(val binding: OfflineUserListViewBinding) :
|
||||
@@ -75,58 +91,63 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
|
||||
} else {
|
||||
teststatus.text = view.context.getString(R.string.test_pending)
|
||||
}
|
||||
|
||||
userCard.setOnClickListener {
|
||||
if (false) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.low_battery_warning),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (userList.testStatus != null) {
|
||||
if (userList.testStatus!!) {
|
||||
if(fromWhere == "Home"){
|
||||
userCard.setOnClickListener {
|
||||
var batLevel = 50F
|
||||
batLevel = getBatteryLevel()!!.toFloat()
|
||||
if (batLevel < Constants.MINIMUM_BATTERY_LEVEL) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.test_already_conducted),
|
||||
view.context.getString(R.string.low_battery_warning),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else {
|
||||
if (userList.incubationTime != "") {
|
||||
if (isBetween15And30Minutes(userList.incubationTime) < Constants.INCUBATION_TIME_MIN) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_not_completed),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else
|
||||
if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_crossed_30_minutes),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else {
|
||||
DataHolder.selectedTest = UserData(
|
||||
_id = userList._id,
|
||||
bloodGroup = userList.bloodGroup,
|
||||
incubationTime = userList.incubationTime
|
||||
)
|
||||
view.findNavController()
|
||||
.navigate(R.id.action_nav_home_to_mainActivity)
|
||||
}
|
||||
} else {
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (userList.testStatus != null) {
|
||||
if (userList.testStatus!!) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_not_started),
|
||||
view.context.getString(R.string.test_already_conducted),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else {
|
||||
if (userList.incubationTime != "") {
|
||||
if (isBetween15And30Minutes(userList.incubationTime) < Constants.INCUBATION_TIME_MIN) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_not_completed),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else
|
||||
if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_crossed_30_minutes),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
} else {
|
||||
DataHolder.selectedTest = UserData(
|
||||
sampleid = userList.sampleid,
|
||||
_id = userList._id,
|
||||
bloodGroup = userList.bloodGroup,
|
||||
incubationTime = userList.incubationTime
|
||||
)
|
||||
view.findNavController()
|
||||
.navigate(R.id.action_nav_home_to_mainActivity)
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
view.context.getString(R.string.incubation_not_started),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,4 +177,25 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
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
|
||||
}
|
||||
private val batteryStatus: Intent? =
|
||||
IntentFilter(Intent.ACTION_BATTERY_CHANGED).let { ifilter ->
|
||||
view.context.registerReceiver(null, ifilter)
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.assurance
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.assurance
|
||||
|
||||
import android.R
|
||||
@@ -13,6 +26,7 @@ import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.Spinner
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.example.hpostesting.data.constant.DataHolder
|
||||
import com.example.hpostesting.data.constant.Constants
|
||||
@@ -45,7 +59,7 @@ class AssuranceControlsFragment : Fragment() {
|
||||
private fun initViews() {
|
||||
// binding.btnSubmit.visibility = View.GONE
|
||||
val solutionSpinner: Spinner = binding.spinnerSolutions
|
||||
val solutionOptions = arrayOf("Select solution", "Tartrazine", "Acid Red")
|
||||
val solutionOptions = arrayOf("Select solution", "Tartrazine", "Acid Red","Sickle-Cert-Buffer", "1 Abs Holo Filter", "0.25 Abs Holo Filter", "Air Blank")
|
||||
val solutionAdapter =
|
||||
ArrayAdapter(requireContext(), R.layout.simple_spinner_item, solutionOptions)
|
||||
solutionAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
@@ -57,9 +71,27 @@ class AssuranceControlsFragment : Fragment() {
|
||||
position: Int,
|
||||
id: Long,
|
||||
) {
|
||||
val selectedValue: String = solutionOptions[position]
|
||||
if (!selectedValue.equals("Select solution")) {
|
||||
DataHolder.hemoCubeTestData!!.solution = selectedValue
|
||||
val selectedSolution: String = solutionOptions[position]
|
||||
if (selectedSolution != "Select solution") {
|
||||
DataHolder.hemoCubeTestData!!.solution = selectedSolution
|
||||
|
||||
// Update visibility and name based on selected solution
|
||||
if(selectedSolution == "Tartrazine" || selectedSolution == "Acid Red"){
|
||||
activity?.runOnUiThread {
|
||||
binding.spinnerConcentration.visibility = View.VISIBLE
|
||||
// Ensure the name is updated only after concentration is selected.
|
||||
// You might need to adjust this logic based on how and when you want to update the name.
|
||||
// For now, it simply shows that the visibility is being handled.
|
||||
}
|
||||
} else {
|
||||
activity?.runOnUiThread {
|
||||
binding.spinnerConcentration.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
} else {
|
||||
activity?.runOnUiThread {
|
||||
binding.spinnerConcentration.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,17 +203,26 @@ class AssuranceControlsFragment : Fragment() {
|
||||
val selectedadminOption = binding.spinnerAdmin.selectedItem.toString()
|
||||
|
||||
// Check if any of the selections are default values
|
||||
// if (selectedSolution == "Select solution") {
|
||||
// Toast.makeText(requireContext(), "Please select a solution", Toast.LENGTH_LONG).show()
|
||||
// return@setOnClickListener // Prevent further execution
|
||||
// }
|
||||
//
|
||||
// if (selectedConcentration == "Select concentration") {
|
||||
// Toast.makeText(requireContext(), "Please select a concentration", Toast.LENGTH_LONG).show()
|
||||
// return@setOnClickListener // Prevent further execution
|
||||
// }
|
||||
if (selectedSolution == "Select solution") {
|
||||
Toast.makeText(requireContext(), "Please select a solution", Toast.LENGTH_LONG).show()
|
||||
return@setOnClickListener // Prevent further execution
|
||||
}else{
|
||||
DataHolder.hemoCubeTestData!!.name = selectedSolution
|
||||
}
|
||||
|
||||
if (selectedadminOption == "Select options") {
|
||||
if (selectedConcentration == "Select concentration" && binding.spinnerConcentration.isVisible) {
|
||||
Toast.makeText(requireContext(), "Please select a concentration", Toast.LENGTH_LONG).show()
|
||||
return@setOnClickListener // Prevent further execution
|
||||
}else if(binding.spinnerConcentration.isVisible){
|
||||
DataHolder.hemoCubeTestData!!.name = "$selectedSolution $selectedConcentration"
|
||||
}else{
|
||||
DataHolder.hemoCubeTestData!!.name = selectedSolution
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (selectedadminOption == "Select options" && binding.spinnerAdmin.isVisible) {
|
||||
Toast.makeText(requireContext(), "Please select a option", Toast.LENGTH_LONG).show()
|
||||
return@setOnClickListener // Prevent further execution
|
||||
}
|
||||
@@ -195,11 +236,11 @@ class AssuranceControlsFragment : Fragment() {
|
||||
DataHolder.hemoCubeTestData!!.solution = binding.spinnerSolutions.selectedItem.toString()
|
||||
DataHolder.hemoCubeTestData!!.concentration = binding.spinnerConcentration.selectedItem.toString()
|
||||
DataHolder.hemoCubeTestData!!.filter = binding.spinnerAdmin.selectedItem.toString()
|
||||
if(binding.spinnerAdmin.selectedItem.toString().equals("Select options")){
|
||||
Toast.makeText(requireContext(), "Please select a option", Toast.LENGTH_LONG).show()
|
||||
}else {
|
||||
DataHolder.hemoCubeTestData!!.name = DataHolder.hemoCubeTestData!!.filter.toString()
|
||||
}
|
||||
// if(binding.spinnerAdmin.selectedItem.toString().equals("Select options") && binding.spinnerAdmin.isVisible){
|
||||
// Toast.makeText(requireContext(), "Please select a option", Toast.LENGTH_LONG).show()
|
||||
// }else {
|
||||
// DataHolder.hemoCubeTestData!!.name = DataHolder.hemoCubeTestData!!.filter.toString()
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.assurance
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.autodac
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.autodac
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.autodac
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.buffercheck
|
||||
|
||||
import android.content.Context
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/*
|
||||
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||
* // Notice: All information contained herein is, and remains
|
||||
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||
* // if any. The intellectual and technical concepts contained
|
||||
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
||||
* // patents in process, and are protected by trade secret or copyright law.
|
||||
* // Dissemination of this information or reproduction of this material
|
||||
* // is strictly forbidden unless prior written permission is obtained
|
||||
* // from ShanMukha Innovations Pvt. Ltd.
|
||||
*/
|
||||
|
||||
package com.example.hpostesting.presentation.buffercheck
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user