|
|
|
|
@ -11,15 +11,23 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LabResultWidget extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
final String filterName;
|
|
|
|
|
final List<LabResult> patientLabResultList;
|
|
|
|
|
final PatientLabOrders patientLabOrder;
|
|
|
|
|
final PatiantInformtion patient;
|
|
|
|
|
LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key);
|
|
|
|
|
final bool isInpatient;
|
|
|
|
|
|
|
|
|
|
LabResultWidget(
|
|
|
|
|
{Key key,
|
|
|
|
|
this.filterName,
|
|
|
|
|
this.patientLabResultList,
|
|
|
|
|
this.patientLabOrder,
|
|
|
|
|
this.patient,
|
|
|
|
|
this.isInpatient})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
@ -29,31 +37,32 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(filterName),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: FlowChartPage(
|
|
|
|
|
filterName: filterName,
|
|
|
|
|
patientLabOrder: patientLabOrder,
|
|
|
|
|
patient: patient,
|
|
|
|
|
if (!isInpatient)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(filterName),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: FlowChartPage(
|
|
|
|
|
filterName: filterName,
|
|
|
|
|
patientLabOrder: patientLabOrder,
|
|
|
|
|
patient: patient,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).showMoreBtn,
|
|
|
|
|
textDecoration: TextDecoration.underline,
|
|
|
|
|
color: Colors.blue,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).showMoreBtn,
|
|
|
|
|
textDecoration: TextDecoration.underline,
|
|
|
|
|
color: Colors.blue,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
@ -61,7 +70,8 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
|
color: Colors.black,bold: true,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -69,68 +79,87 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).value,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).range,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 7,),
|
|
|
|
|
Divider(color: Colors.black,thickness: 1,),
|
|
|
|
|
SizedBox(height: 12,),
|
|
|
|
|
...List.generate(patientLabResultList.length, (index) => Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${patientLabResultList[index].testCode}\n'+
|
|
|
|
|
patientLabResultList[index].description,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
patientLabResultList[index].resultValue+" "+patientLabResultList[index].uOM,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
patientLabResultList[index].referanceRange,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 7,
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
thickness: 1,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
),
|
|
|
|
|
...List.generate(
|
|
|
|
|
patientLabResultList.length,
|
|
|
|
|
(index) => Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${patientLabResultList[index].testCode}\n' +
|
|
|
|
|
patientLabResultList[index].description,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
patientLabResultList[index].resultValue +
|
|
|
|
|
" " +
|
|
|
|
|
"${patientLabResultList[index].uOM ?? ""}",
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
patientLabResultList[index].referanceRange,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(),
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
Divider(),
|
|
|
|
|
],
|
|
|
|
|
))
|
|
|
|
|
// Table(
|
|
|
|
|
// border: TableBorder.symmetric(
|
|
|
|
|
// inside: BorderSide(width: 2.0, color: Colors.grey[300],style: BorderStyle.solid),
|
|
|
|
|
@ -141,7 +170,8 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
List<TableRow> fullData(List<LabResult> labResultList,context) {
|
|
|
|
|
|
|
|
|
|
List<TableRow> fullData(List<LabResult> labResultList, context) {
|
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
|
tableRow.add(
|
|
|
|
|
TableRow(
|
|
|
|
|
@ -150,18 +180,27 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
|
color: Colors.black,bold: true,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).value,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).range,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -189,7 +228,7 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
lab.resultValue+" "+lab.uOM,
|
|
|
|
|
lab.resultValue + " " + lab.uOM,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -213,7 +252,4 @@ class LabResultWidget extends StatelessWidget {
|
|
|
|
|
});
|
|
|
|
|
return tableRow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|