From 2c50890b0de64fcdb330f5a0d6e2d65cf6356c5c Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Tue, 17 Oct 2023 08:39:25 +0530 Subject: [PATCH] add testtime --- .../hpostesting/data/model/patient/BufferCheckData.kt | 3 ++- .../buffercheck/HemoCubeBufferCheckFragment.kt | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/hpostesting/data/model/patient/BufferCheckData.kt b/app/src/main/java/com/example/hpostesting/data/model/patient/BufferCheckData.kt index 874f54b..3a8a37f 100644 --- a/app/src/main/java/com/example/hpostesting/data/model/patient/BufferCheckData.kt +++ b/app/src/main/java/com/example/hpostesting/data/model/patient/BufferCheckData.kt @@ -15,5 +15,6 @@ data class BufferCheckData( var led2Average: Double? = null, var deviceRatio: Double? = null, var calculatedRatio: Double? = null, - var classificationResult: String = "" + var classificationResult: String = "", + var testTime: String = "" ) \ No newline at end of file diff --git a/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt b/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt index fee2c2a..9627664 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt @@ -29,6 +29,9 @@ import com.google.firebase.ktx.Firebase import `in`.sminnovations.hpostesting.R import `in`.sminnovations.hpostesting.databinding.FragmentHemoCubeReferenceBinding import kotlin.math.log10 +import java.text.SimpleDateFormat +import java.util.Calendar +import java.util.Locale class HemoCubeBufferCheckFragment : Fragment() { @@ -234,7 +237,10 @@ class HemoCubeBufferCheckFragment : Fragment() { deviceRatio = deviceRatio, calculatedRatio = calculatedRatio, classificationResult = classificationResult, - deviceSerialNumber = deviceSerialNo + deviceSerialNumber = deviceSerialNo, + testTime = SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss", Locale.getDefault() + ).format(Calendar.getInstance().time) ) hemoCubeViewModel.uploadHemoCubeResultToDatabaseforbuffercheckN(bufferData) }