|
|
|
|
@ -10,6 +10,8 @@ class LabResult {
|
|
|
|
|
String projectID;
|
|
|
|
|
String referanceRange;
|
|
|
|
|
String resultValue;
|
|
|
|
|
String maxValue;
|
|
|
|
|
String minValue;
|
|
|
|
|
String sampleCollectedOn;
|
|
|
|
|
String sampleReceivedOn;
|
|
|
|
|
String setupID;
|
|
|
|
|
@ -21,24 +23,26 @@ class LabResult {
|
|
|
|
|
|
|
|
|
|
LabResult(
|
|
|
|
|
{this.description,
|
|
|
|
|
this.femaleInterpretativeData,
|
|
|
|
|
this.gender,
|
|
|
|
|
this.lineItemNo,
|
|
|
|
|
this.maleInterpretativeData,
|
|
|
|
|
this.notes,
|
|
|
|
|
this.packageID,
|
|
|
|
|
this.patientID,
|
|
|
|
|
this.projectID,
|
|
|
|
|
this.referanceRange,
|
|
|
|
|
this.resultValue,
|
|
|
|
|
this.sampleCollectedOn,
|
|
|
|
|
this.sampleReceivedOn,
|
|
|
|
|
this.setupID,
|
|
|
|
|
this.superVerifiedOn,
|
|
|
|
|
this.testCode,
|
|
|
|
|
this.uOM,
|
|
|
|
|
this.verifiedOn,
|
|
|
|
|
this.verifiedOnDateTime});
|
|
|
|
|
this.femaleInterpretativeData,
|
|
|
|
|
this.gender,
|
|
|
|
|
this.lineItemNo,
|
|
|
|
|
this.maleInterpretativeData,
|
|
|
|
|
this.notes,
|
|
|
|
|
this.packageID,
|
|
|
|
|
this.patientID,
|
|
|
|
|
this.projectID,
|
|
|
|
|
this.referanceRange,
|
|
|
|
|
this.resultValue,
|
|
|
|
|
this.maxValue,
|
|
|
|
|
this.minValue,
|
|
|
|
|
this.sampleCollectedOn,
|
|
|
|
|
this.sampleReceivedOn,
|
|
|
|
|
this.setupID,
|
|
|
|
|
this.superVerifiedOn,
|
|
|
|
|
this.testCode,
|
|
|
|
|
this.uOM,
|
|
|
|
|
this.verifiedOn,
|
|
|
|
|
this.verifiedOnDateTime});
|
|
|
|
|
|
|
|
|
|
LabResult.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
description = json['Description'];
|
|
|
|
|
@ -52,6 +56,8 @@ class LabResult {
|
|
|
|
|
projectID = json['ProjectID'].toString();
|
|
|
|
|
referanceRange = json['ReferenceRange'] ?? json['ReferanceRange'];
|
|
|
|
|
resultValue = json['ResultValue'];
|
|
|
|
|
maxValue = json['MaxValue'];
|
|
|
|
|
minValue = json['MinValue'];
|
|
|
|
|
sampleCollectedOn = json['SampleCollectedOn'];
|
|
|
|
|
sampleReceivedOn = json['SampleReceivedOn'];
|
|
|
|
|
setupID = json['SetupID'];
|
|
|
|
|
@ -75,6 +81,8 @@ class LabResult {
|
|
|
|
|
data['ProjectID'] = this.projectID;
|
|
|
|
|
data['ReferanceRange'] = this.referanceRange;
|
|
|
|
|
data['ResultValue'] = this.resultValue;
|
|
|
|
|
data['MaxValue'] = this.maxValue;
|
|
|
|
|
data['MinValue'] = this.minValue;
|
|
|
|
|
data['SampleCollectedOn'] = this.sampleCollectedOn;
|
|
|
|
|
data['SampleReceivedOn'] = this.sampleReceivedOn;
|
|
|
|
|
data['SetupID'] = this.setupID;
|
|
|
|
|
@ -85,8 +93,29 @@ class LabResult {
|
|
|
|
|
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int checkResultStatus() {
|
|
|
|
|
try {
|
|
|
|
|
var max = double.tryParse(maxValue) ?? null;
|
|
|
|
|
var min = double.tryParse(minValue) ?? null;
|
|
|
|
|
var result = double.tryParse(resultValue) ?? null;
|
|
|
|
|
if (max != null && min != null && result != null) {
|
|
|
|
|
if (result > max) {
|
|
|
|
|
return 1;
|
|
|
|
|
} else if (result < min) {
|
|
|
|
|
return -1;
|
|
|
|
|
} else {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}catch (e){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class LabResultList {
|
|
|
|
|
String filterName = "";
|
|
|
|
|
|