From e79c521ea9c2c78cc54a3fe1b138931aea8446ba Mon Sep 17 00:00:00 2001 From: Syed Taha Alam Date: Wed, 9 Jul 2025 11:03:18 +0300 Subject: [PATCH] Wd: Result type id 5 is toggle the visibility of the graph of the lab result screen. --- lib/core/model/labs/lab_result.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index 15d92107..1690ab1d 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/newUI/labWidgets.dart'; - class LabResultList { String? filterName = ""; String? description = ""; @@ -24,7 +23,11 @@ enum ResultFlag { const ResultFlag(this.value); - static ResultFlag? fromJson(String key) { + static ResultFlag? fromJson(String key, num? resultValueFlag) { + ///these lines are added cause the result flag is coupled with two values + ///if resultvalueflag is empty or line carriage then it has to be interpretive + if(resultValueFlag == null) return ResultFlag.IRR; + if(resultValueFlag == 5) return ResultFlag.IRR; switch (key) { case 'N': return ResultFlag.N; @@ -120,6 +123,8 @@ class LabResult { dynamic verifiedOnDateTime; num? percentage; num? width; + num? resultTypeID; + LabResult( {this.description, @@ -174,8 +179,9 @@ class LabResult { verifiedOnDateTime = json['VerifiedOnDateTime']; packageShortDescription = json['PackageShortDescription']; testShortDescription = json['TestShortDescription']; + resultTypeID = json['ResultTypeID']; calculatedResultFlag = - ResultFlag.fromJson(flag ?? json['CalculatedResultFlag']); + ResultFlag.fromJson(flag ?? json['CalculatedResultFlag'],resultTypeID); } Map toJson() {