Wd: Result type id 5 is toggle the visibility of the graph of the lab result screen.

dev_v3.13.6_CR_7211_Lab_report_changes
Syed Taha Alam 5 months ago
parent dbfe9663a5
commit e79c521ea9

@ -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<String, dynamic> toJson() {

Loading…
Cancel
Save