|
|
|
@ -3,13 +3,17 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart
|
|
|
|
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/header_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_inp.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_inp.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
@ -22,215 +26,327 @@ class PrescriptionItemsPage extends StatelessWidget {
|
|
|
|
final Prescriptions prescriptions;
|
|
|
|
final Prescriptions prescriptions;
|
|
|
|
|
|
|
|
|
|
|
|
PrescriptionItemsPage({Key key, this.prescriptions});
|
|
|
|
PrescriptionItemsPage({Key key, this.prescriptions});
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
return BaseView<PrescriptionsViewModel>(
|
|
|
|
return BaseView<PrescriptionsViewModel>(
|
|
|
|
onModelReady: (model) =>
|
|
|
|
onModelReady: (model) => model.getPrescriptionReport(prescriptions: prescriptions),
|
|
|
|
model.getPrescriptionReport(prescriptions: prescriptions),
|
|
|
|
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
isShowAppBar: true,
|
|
|
|
isShowAppBar: true,
|
|
|
|
appBarTitle: TranslationBase.of(context).prescriptions,
|
|
|
|
appBarTitle: prescriptions.doctorName,
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
body: Container(
|
|
|
|
showNewAppBar: true,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.8,
|
|
|
|
backgroundColor: Color(0xffF8F8F8),
|
|
|
|
child: Column(
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
children: [
|
|
|
|
body: Column(
|
|
|
|
if (!prescriptions.isInOutPatient)
|
|
|
|
children: [
|
|
|
|
...List.generate(
|
|
|
|
Expanded(
|
|
|
|
model.prescriptionReportListINP.length,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
(index) => InkWell(
|
|
|
|
child: Column(
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
children: [
|
|
|
|
context,
|
|
|
|
DoctorHeader(
|
|
|
|
FadePage(
|
|
|
|
headerModel: HeaderModel(
|
|
|
|
page: PrescriptionDetailsPageINP(
|
|
|
|
prescriptions.doctorName,
|
|
|
|
prescriptionReport:
|
|
|
|
prescriptions.doctorImageURL,
|
|
|
|
model.prescriptionReportListINP[index],
|
|
|
|
prescriptions.speciality,
|
|
|
|
),
|
|
|
|
"",
|
|
|
|
),
|
|
|
|
prescriptions.name,
|
|
|
|
),
|
|
|
|
DateUtil.convertStringToDate(prescriptions.appointmentDate),
|
|
|
|
child: Container(
|
|
|
|
prescriptions.nationalityFlagURL,
|
|
|
|
width: double.infinity,
|
|
|
|
prescriptions.doctorRate,
|
|
|
|
margin:
|
|
|
|
prescriptions.actualDoctorRate,
|
|
|
|
EdgeInsets.only(top: 10, left: 10, right: 10),
|
|
|
|
model.user.emailAddress,
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
isNeedToShowButton: projectViewModel.havePrivilege(13),
|
|
|
|
color: Colors.white,
|
|
|
|
onTap: () {
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
showConfirmMessage(context, model);
|
|
|
|
Radius.circular(10.0),
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (!prescriptions.isInOutPatient)
|
|
|
|
|
|
|
|
ListView.separated(
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return InkWell(
|
|
|
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
FadePage(
|
|
|
|
|
|
|
|
page: PrescriptionDetailsPageINP(
|
|
|
|
|
|
|
|
prescriptionReport: model.prescriptionReportListINP[index],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
border: Border.all(
|
|
|
|
child: Container(
|
|
|
|
color: Colors.grey[200], width: 0.5),
|
|
|
|
width: double.infinity,
|
|
|
|
),
|
|
|
|
child: Card(
|
|
|
|
child: Row(
|
|
|
|
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
|
|
|
|
children: <Widget>[
|
|
|
|
shape: cardRadius(12),
|
|
|
|
ClipRRect(
|
|
|
|
child: Padding(
|
|
|
|
borderRadius:
|
|
|
|
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
|
|
|
|
BorderRadius.all(Radius.circular(5)),
|
|
|
|
child: Column(
|
|
|
|
child: Image.network(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
model.prescriptionReportListINP[index]
|
|
|
|
children: [
|
|
|
|
.imageSRCUrl,
|
|
|
|
Text(
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
model.prescriptionReportListINP[index].itemDescription.isNotEmpty
|
|
|
|
width: 60,
|
|
|
|
? model.prescriptionReportListINP[index].itemDescription
|
|
|
|
height: 70,
|
|
|
|
: model.prescriptionReportListINP[index].itemDescriptionN ?? '',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mHeight(10),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
child: Card(
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
model.prescriptionReportListINP[index].imageSRCUrl,
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
width: 60,
|
|
|
|
|
|
|
|
height: 60,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
|
|
|
shape: cardRadius(2000),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mWidth(12),
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context).route + ": ",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportListINP[index].route,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context).dailyDoses + ": ",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportListINP[index].doseDailyQuantity.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mHeight(12),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportListINP[index].remarks,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
),
|
|
|
|
width: 10,
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
|
|
|
return mHeight(8);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
itemCount: model.prescriptionReportListINP.length)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ListView.separated(
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
PrescriptionReport prescriptionReport = PrescriptionReport(
|
|
|
|
|
|
|
|
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
|
|
|
|
|
|
|
|
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
|
|
|
|
|
|
|
|
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
|
|
|
|
|
|
|
|
routeN: model.prescriptionReportEnhList[index].route,
|
|
|
|
|
|
|
|
frequency: model.prescriptionReportEnhList[index].frequency,
|
|
|
|
|
|
|
|
frequencyN: model.prescriptionReportEnhList[index].frequency,
|
|
|
|
|
|
|
|
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
|
|
|
|
|
|
|
|
days: model.prescriptionReportEnhList[index].days,
|
|
|
|
|
|
|
|
itemID: model.prescriptionReportEnhList[index].itemID,
|
|
|
|
|
|
|
|
remarks: model.prescriptionReportEnhList[index].remarks);
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
FadePage(
|
|
|
|
|
|
|
|
page: PrescriptionDetailsPage(
|
|
|
|
|
|
|
|
prescriptionReport: prescriptionReport,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Card(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
|
|
|
|
|
|
|
|
shape: cardRadius(12),
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
|
|
|
|
|
|
|
|
? model.prescriptionReportEnhList[index].itemDescription
|
|
|
|
|
|
|
|
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
letterSpacing: -0.64,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mHeight(10),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
child: Card(
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].imageSRCUrl,
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
width: 60,
|
|
|
|
|
|
|
|
height: 60,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
|
|
|
shape: cardRadius(2000),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mWidth(12),
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context).route + ": ",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].route,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
TranslationBase.of(context).dailyDoses + ": ",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
mHeight(12),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].remarks,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Texts(model
|
|
|
|
|
|
|
|
.prescriptionReportListINP[index]
|
|
|
|
|
|
|
|
.itemDescription
|
|
|
|
|
|
|
|
.isNotEmpty
|
|
|
|
|
|
|
|
? model
|
|
|
|
|
|
|
|
.prescriptionReportListINP[index]
|
|
|
|
|
|
|
|
.itemDescription
|
|
|
|
|
|
|
|
: model
|
|
|
|
|
|
|
|
.prescriptionReportListINP[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.itemDescriptionN ??
|
|
|
|
|
|
|
|
'')),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
Icon(
|
|
|
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
|
|
|
size: 18,
|
|
|
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
...List.generate(
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList.length,
|
|
|
|
|
|
|
|
(index) => InkWell(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
PrescriptionReport prescriptionReport =
|
|
|
|
|
|
|
|
PrescriptionReport(
|
|
|
|
|
|
|
|
imageSRCUrl: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index].imageSRCUrl,
|
|
|
|
|
|
|
|
itemDescription: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.itemDescription,
|
|
|
|
|
|
|
|
itemDescriptionN: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.itemDescription,
|
|
|
|
|
|
|
|
routeN:
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].route,
|
|
|
|
|
|
|
|
frequency: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index].frequency,
|
|
|
|
|
|
|
|
frequencyN: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index].frequency,
|
|
|
|
|
|
|
|
doseDailyQuantity: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.doseDailyQuantity,
|
|
|
|
|
|
|
|
days: model.prescriptionReportEnhList[index].days,
|
|
|
|
|
|
|
|
itemID:
|
|
|
|
|
|
|
|
model.prescriptionReportEnhList[index].itemID,
|
|
|
|
|
|
|
|
remarks: model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index].remarks);
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
FadePage(
|
|
|
|
|
|
|
|
page: PrescriptionDetailsPage(
|
|
|
|
|
|
|
|
prescriptionReport: prescriptionReport,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
ClipRRect(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
|
|
|
|
model
|
|
|
|
|
|
|
|
.prescriptionReportEnhList[index].imageSRCUrl,
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
width: 60,
|
|
|
|
|
|
|
|
height: 70,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Texts(model.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.itemDescription.isNotEmpty
|
|
|
|
|
|
|
|
? model.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.itemDescription
|
|
|
|
|
|
|
|
: model.prescriptionReportEnhList[index]
|
|
|
|
|
|
|
|
.itemDescriptionN ??
|
|
|
|
|
|
|
|
''),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
},
|
|
|
|
Icon(
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
return mHeight(8);
|
|
|
|
size: 18,
|
|
|
|
},
|
|
|
|
color: Colors.grey[500],
|
|
|
|
shrinkWrap: true,
|
|
|
|
)
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
],
|
|
|
|
itemCount: model.prescriptionReportEnhList.length),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.25,
|
|
|
|
|
|
|
|
color: Colors.grey[100],
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Divider(),
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(13))
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
|
|
|
child: Button(
|
|
|
|
|
|
|
|
label: TranslationBase.of(context).sendCopy,
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
showConfirmMessage(context, model);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
),
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
),
|
|
|
|
child: Button(
|
|
|
|
Container(
|
|
|
|
label: TranslationBase.of(context).resendOrder,
|
|
|
|
width: double.infinity,
|
|
|
|
backgroundColor: Colors.green[800],
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 2),
|
|
|
|
onTap: () {
|
|
|
|
child: Container(
|
|
|
|
Navigator.push(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
context,
|
|
|
|
child: Button(
|
|
|
|
FadePage(
|
|
|
|
label: TranslationBase.of(context).resendOrder,
|
|
|
|
page: PrescriptionDeliveryAddressPage(
|
|
|
|
backgroundColor: Colors.green[800],
|
|
|
|
prescriptions: prescriptions,
|
|
|
|
onTap: () {
|
|
|
|
prescriptionReportList:
|
|
|
|
Navigator.push(
|
|
|
|
model.prescriptionReportList,
|
|
|
|
context,
|
|
|
|
prescriptionReportEnhList:
|
|
|
|
FadePage(
|
|
|
|
model.prescriptionReportEnhList,
|
|
|
|
page: PrescriptionDeliveryAddressPage(
|
|
|
|
),
|
|
|
|
prescriptions: prescriptions,
|
|
|
|
|
|
|
|
prescriptionReportList: model.prescriptionReportList,
|
|
|
|
|
|
|
|
prescriptionReportEnhList: model.prescriptionReportEnhList,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
},
|
|
|
|
);
|
|
|
|
))
|
|
|
|
},
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|