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