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() {