working on lab result new service
parent
68e1a2b399
commit
ac4a68600c
@ -0,0 +1,108 @@
|
|||||||
|
class LabResultHistory {
|
||||||
|
String description;
|
||||||
|
String femaleInterpretativeData;
|
||||||
|
int gender;
|
||||||
|
bool isCertificateAllowed;
|
||||||
|
int lineItemNo;
|
||||||
|
String maleInterpretativeData;
|
||||||
|
String notes;
|
||||||
|
int orderLineItemNo;
|
||||||
|
int orderNo;
|
||||||
|
String packageID;
|
||||||
|
int patientID;
|
||||||
|
String projectID;
|
||||||
|
String referanceRange;
|
||||||
|
String resultValue;
|
||||||
|
int resultValueBasedLineItemNo;
|
||||||
|
String resultValueFlag;
|
||||||
|
String sampleCollectedOn;
|
||||||
|
String sampleReceivedOn;
|
||||||
|
String setupID;
|
||||||
|
String superVerifiedOn;
|
||||||
|
String testCode;
|
||||||
|
String uOM;
|
||||||
|
String verifiedOn;
|
||||||
|
String verifiedOnDateTime;
|
||||||
|
|
||||||
|
LabResultHistory(
|
||||||
|
{this.description,
|
||||||
|
this.femaleInterpretativeData,
|
||||||
|
this.gender,
|
||||||
|
this.isCertificateAllowed,
|
||||||
|
this.lineItemNo,
|
||||||
|
this.maleInterpretativeData,
|
||||||
|
this.notes,
|
||||||
|
this.orderLineItemNo,
|
||||||
|
this.orderNo,
|
||||||
|
this.packageID,
|
||||||
|
this.patientID,
|
||||||
|
this.projectID,
|
||||||
|
this.referanceRange,
|
||||||
|
this.resultValue,
|
||||||
|
this.resultValueBasedLineItemNo,
|
||||||
|
this.resultValueFlag,
|
||||||
|
this.sampleCollectedOn,
|
||||||
|
this.sampleReceivedOn,
|
||||||
|
this.setupID,
|
||||||
|
this.superVerifiedOn,
|
||||||
|
this.testCode,
|
||||||
|
this.uOM,
|
||||||
|
this.verifiedOn,
|
||||||
|
this.verifiedOnDateTime});
|
||||||
|
|
||||||
|
LabResultHistory.fromJson(Map<String, dynamic> json) {
|
||||||
|
description = json['Description'];
|
||||||
|
femaleInterpretativeData = json['FemaleInterpretativeData'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
isCertificateAllowed = json['IsCertificateAllowed'];
|
||||||
|
lineItemNo = json['LineItemNo'];
|
||||||
|
maleInterpretativeData = json['MaleInterpretativeData'];
|
||||||
|
notes = json['Notes'];
|
||||||
|
orderLineItemNo = json['OrderLineItemNo'];
|
||||||
|
orderNo = json['OrderNo'];
|
||||||
|
packageID = json['PackageID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
referanceRange = json['ReferanceRange'];
|
||||||
|
resultValue = json['ResultValue'];
|
||||||
|
resultValueBasedLineItemNo = json['ResultValueBasedLineItemNo'];
|
||||||
|
resultValueFlag = json['ResultValueFlag'];
|
||||||
|
sampleCollectedOn = json['SampleCollectedOn'];
|
||||||
|
sampleReceivedOn = json['SampleReceivedOn'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
superVerifiedOn = json['SuperVerifiedOn'];
|
||||||
|
testCode = json['TestCode'];
|
||||||
|
uOM = json['UOM'];
|
||||||
|
verifiedOn = json['VerifiedOn'];
|
||||||
|
verifiedOnDateTime = json['VerifiedOnDateTime'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Description'] = this.description;
|
||||||
|
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['IsCertificateAllowed'] = this.isCertificateAllowed;
|
||||||
|
data['LineItemNo'] = this.lineItemNo;
|
||||||
|
data['MaleInterpretativeData'] = this.maleInterpretativeData;
|
||||||
|
data['Notes'] = this.notes;
|
||||||
|
data['OrderLineItemNo'] = this.orderLineItemNo;
|
||||||
|
data['OrderNo'] = this.orderNo;
|
||||||
|
data['PackageID'] = this.packageID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['ReferanceRange'] = this.referanceRange;
|
||||||
|
data['ResultValue'] = this.resultValue;
|
||||||
|
data['ResultValueBasedLineItemNo'] = this.resultValueBasedLineItemNo;
|
||||||
|
data['ResultValueFlag'] = this.resultValueFlag;
|
||||||
|
data['SampleCollectedOn'] = this.sampleCollectedOn;
|
||||||
|
data['SampleReceivedOn'] = this.sampleReceivedOn;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['SuperVerifiedOn'] = this.superVerifiedOn;
|
||||||
|
data['TestCode'] = this.testCode;
|
||||||
|
data['UOM'] = this.uOM;
|
||||||
|
data['VerifiedOn'] = this.verifiedOn;
|
||||||
|
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class LabResultHistoryPage extends StatelessWidget {
|
||||||
|
final PatientLabOrders patientLabOrder;
|
||||||
|
final String filterName;
|
||||||
|
final PatiantInformtion patient;
|
||||||
|
|
||||||
|
LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<LabsViewModel>(
|
||||||
|
onModelReady: (model) => model.getPatientLabResultHistoryByDescription(
|
||||||
|
patientLabOrder: patientLabOrder,
|
||||||
|
procedureDescription: filterName,
|
||||||
|
patient: patient),
|
||||||
|
builder: (context, model, w) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: filterName,
|
||||||
|
baseViewModel: model,
|
||||||
|
body: model.labOrdersResultHistoryList.length > 0
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
...List.generate(model.labOrdersResultHistoryList.length,
|
||||||
|
(index) {
|
||||||
|
return Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(context).description,
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model.labOrdersResultHistoryList[index].description,
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Reference Range",
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model.labOrdersResultHistoryList[index].referanceRange,
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Result Value",
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model.labOrdersResultHistoryList[index].resultValue,
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
"Verified On",
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
|
||||||
|
color: Color(0xFF575757),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model.labOrdersResultHistoryList[index].verifiedOn,
|
||||||
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3.5,
|
||||||
|
color: Color(0xFF2E303A),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: ErrorMessage(
|
||||||
|
error: "No data",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue