fixed issues while merging
This commit is contained in:
@@ -65,12 +65,14 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.example.hpostesting.presentation.assurance.AssuranceControlsActivity"
|
android:name="com.example.hpostesting.presentation.assurance.AssuranceControlsActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Theme.HPOS.NoActionBar"/>
|
android:theme="@style/Theme.HPOS.NoActionBar"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.example.hpostesting.presentation.hemocube.HemocubeActivity"
|
android:name="com.example.hpostesting.presentation.hemocube.HemocubeActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:noHistory="true"
|
android:noHistory="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:parentActivityName="com.example.hpostesting.presentation.MainActivity"
|
android:parentActivityName="com.example.hpostesting.presentation.MainActivity"
|
||||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
@@ -148,6 +150,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.example.hpostesting.presentation.MainActivity"
|
android:name="com.example.hpostesting.presentation.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import android.widget.Toast
|
|||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.example.hpostesting.data.Result
|
import com.example.hpostesting.util.Result
|
||||||
import com.example.hpostesting.data.constant.Constants
|
import com.example.hpostesting.data.constant.Constants
|
||||||
import com.example.hpostesting.data.constant.HemoCubeCommands
|
import com.example.hpostesting.data.constant.HemoCubeCommands
|
||||||
import com.example.hpostesting.data.model.deviceprovision.DeviceProvisionRequest
|
import com.example.hpostesting.data.model.deviceprovision.DeviceProvisionRequest
|
||||||
import com.example.hpostesting.data.model.patient.DeviceData
|
import com.example.hpostesting.data.model.patient.DeviceData
|
||||||
import com.example.hpostesting.encryption.Encryption
|
import com.example.hpostesting.encryption.Encryption
|
||||||
import com.example.hpostesting.presentation.UsbServiceListener
|
import com.example.hpostesting.presentation.utils.UsbServiceListener
|
||||||
import com.example.hpostesting.presentation.dashboard.DashboardActivity
|
import com.example.hpostesting.presentation.dashboard.DashboardActivity
|
||||||
import com.google.android.gms.ads.identifier.AdvertisingIdClient
|
import com.google.android.gms.ads.identifier.AdvertisingIdClient
|
||||||
import com.google.firebase.crashlytics.ktx.crashlytics
|
import com.google.firebase.crashlytics.ktx.crashlytics
|
||||||
|
|||||||
@@ -160,31 +160,32 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
val resultList = MolbioV2ResultRequest(mutableListOf())
|
val resultList = MolbioV2ResultRequest(mutableListOf())
|
||||||
val pendingData = hemoCubeDao.getMolbioPending()
|
val pendingData = hemoCubeDao.getMolbioPending()
|
||||||
Log.d("molbio","pending size"+pendingData.size)
|
Log.d("molbio","pending size"+pendingData.size)
|
||||||
pendingData.forEach{
|
pendingData.forEach { userData ->
|
||||||
userData ->
|
if (userData.testStatus == true) {
|
||||||
val currentTimeFormatted = SimpleDateFormat(
|
val currentTimeFormatted = SimpleDateFormat(
|
||||||
"yyyy-MM-dd'T'HH:mm:ssZZZZZ",
|
"yyyy-MM-dd'T'HH:mm:ssZZZZZ",
|
||||||
Locale.getDefault()
|
Locale.getDefault()
|
||||||
).format(Calendar.getInstance().time)
|
).format(Calendar.getInstance().time)
|
||||||
val bufferIntensityThreshold =
|
val bufferIntensityThreshold =
|
||||||
Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId]?.toString()
|
Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId]?.toString()
|
||||||
?: "defaultThreshold" // Handle possible nulls safely
|
?: "defaultThreshold" // Handle possible nulls safely
|
||||||
resultList.results?.add(
|
resultList.results?.add(
|
||||||
MolbioV2Result(
|
MolbioV2Result(
|
||||||
rawData = userData,
|
rawData = userData,
|
||||||
analysisId = userData._id,
|
analysisId = userData._id,
|
||||||
analysisDate = currentTimeFormatted,
|
analysisDate = currentTimeFormatted,
|
||||||
analysisStatus = userData.classificationResult
|
analysisStatus = userData.classificationResult
|
||||||
?: "defaultStatus", // Handle possible nulls
|
?: "defaultStatus", // Handle possible nulls
|
||||||
thresholds = bufferIntensityThreshold,
|
thresholds = bufferIntensityThreshold,
|
||||||
interpretation = userData.classificationResult
|
interpretation = userData.classificationResult
|
||||||
?: "defaultInterpretation", // Handle possible nulls
|
?: "defaultInterpretation", // Handle possible nulls
|
||||||
testId = userData._id,
|
testId = userData._id,
|
||||||
testTime = currentTimeFormatted,
|
testTime = currentTimeFormatted,
|
||||||
collectionTime = currentTimeFormatted,
|
collectionTime = currentTimeFormatted,
|
||||||
expiryTime = currentTimeFormatted
|
expiryTime = currentTimeFormatted
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resultList.results?.forEach { result ->
|
resultList.results?.forEach { result ->
|
||||||
@@ -226,7 +227,7 @@ class HemoCubeViewModel @Inject constructor(
|
|||||||
pendingData.forEach{
|
pendingData.forEach{
|
||||||
userData ->
|
userData ->
|
||||||
if (userData != null) {
|
if (userData != null) {
|
||||||
if (!userData.localFlag) {
|
if (!userData.localFlag && userData.testStatus == true) {
|
||||||
bulkAddResultTestToDb(userData)
|
bulkAddResultTestToDb(userData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user