diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index f31c754e..6b85fa80 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -1,8 +1,131 @@ +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/card_with_bg_widget.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class MedicalReportPage extends StatelessWidget { @override Widget build(BuildContext context) { - return Container(); + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + bool isInpatient = routeArgs['isInpatient']; + ProjectViewModel projectViewModel = Provider.of(context); + //TODO Jammal + return AppScaffold( + appBar: PatientProfileHeaderNewDesignAppBar( + patient, + patient.patientType.toString() ?? '0', + patientType, + isInpatient: isInpatient, + ), + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Medical", + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + "Report", + bold: true, + fontSize: 22, + ), + ], + ), + ), + AddNewOrder( + onTap: () { + + }, + label: "Create New Medical Report", + ), + ...List.generate( + /*model.patientLabOrdersList.length,*/1, + (index) => CardWithBgWidget( + hasBorder: false, + bgColor: 0==0? Colors.red[700]:Colors.green[700], + widget: Column( + children: [ + Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText('On Hold',color: Colors.red,), + AppText( + "Jammal" ?? "", + fontSize: 15, + bold: true, + ), + ], + )), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + AppText( + '${DateUtils.getDayMonthYearDateFormatted(DateTime.now(), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + AppText( + '${DateUtils.getHour(DateTime.now())}', + fontWeight: FontWeight.w600, + color: Colors.grey[700], + fontSize: 14, + ), + ], + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + child: LargeAvatar( + name: "Jammal", + url: null, + ), + width: 55, + height: 55, + ), + Expanded(child: AppText("")), + Icon( + EvaIcons.eye, + ) + ], + ), + ], + ), + ), + ) + ], + ), + ), + ); } } diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart index 4828608a..b6d27af6 100644 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -50,160 +50,6 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { child: Container( child: Column( children: [ - // if (!prescriptions.isInOutPatient) - // ...List.generate( - // model.prescriptionReportList.length, - // (index) => Container( - // decoration: BoxDecoration( - // borderRadius: BorderRadius.circular(12), - // color: Colors.white, - // ), - // margin: EdgeInsets.all(12), - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Container( - // margin: - // EdgeInsets.only(left: 18, right: 18), - // child: AppText( - // model.prescriptionReportList[index] - // .itemDescription.isNotEmpty - // ? model - // .prescriptionReportList[index] - // .itemDescription - // : model - // .prescriptionReportList[index] - // .itemDescriptionN, - // bold: true, - // )), - // SizedBox( - // height: 12, - // ), - // Row( - // children: [ - // SizedBox( - // width: 18, - // ), - // Container( - // decoration: BoxDecoration( - // shape: BoxShape.circle, - // border: Border.all( - // width: 0.5, - // color: Colors.grey)), - // height: 55, - // width: 55, - // child: InkWell( - // onTap: () { - // showDialog( - // context: context, - // child: ShowImageDialog( - // imageUrl: model - // .prescriptionReportEnhList[ - // index] - // .imageSRCUrl, - // )); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // child: Image.network( - // model - // .prescriptionReportList[index] - // .imageSRCUrl, - // fit: BoxFit.cover, - // ), - // ), - // ), - // ), - // SizedBox( - // width: 10, - // ), - // Expanded( - // child: Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .route, - // color: Colors.grey, - // ), - // Expanded( - // child: AppText(" " + - // model - // .prescriptionReportList[ - // index] - // .routeN)), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .frequency, - // color: Colors.grey, - // ), - // AppText(" " + - // model - // .prescriptionReportList[ - // index] - // .frequencyN ?? - // ''), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .dailyDoses, - // color: Colors.grey, - // ), - // AppText(" " + - // model - // .prescriptionReportList[ - // index] - // .doseDailyQuantity ?? - // ''), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .duration, - // color: Colors.grey, - // ), - // AppText(" " + - // model - // .prescriptionReportList[ - // index] - // .days - // .toString() ?? - // ''), - // ], - // ), - // SizedBox( - // height: 12, - // ), - // AppText(model - // .prescriptionReportList[ - // index] - // .remarks ?? - // ''), - // ], - // ), - // ) - // ], - // ) - // ], - // ), - // ), - // )) - // else - Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), @@ -233,34 +79,6 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { SizedBox( width: 18, ), - // Container( - // decoration: BoxDecoration( - // shape: BoxShape.circle, - // border: Border.all( - // width: 0.5, color: Colors.grey)), - // height: 55, - // width: 55, - // child: InkWell( - // onTap: () { - // showDialog( - // context: context, - // // child: ShowImageDialog( - // // imageUrl: model - // // .inPatientPrescription[index] - // // .imageSRCUrl, - // // ), - // ); - // }, - // child: Padding( - // padding: const EdgeInsets.all(8.0), - // // child: Image.network( - // // model.prescriptionReportEnhList[index] - // // .imageSRCUrl, - // // fit: BoxFit.cover, - // // ), - // ), - // ), - // ), SizedBox( width: 10, ), diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 8051beae..a68f6f56 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_head 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/dialogs/ShowImageDialog.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -169,13 +170,21 @@ class PrescriptionItemsPage extends StatelessWidget { ) ); }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model.prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, - ), + ), + ), + Positioned( + top: 10, + right: 10, + child: Icon(EvaIcons.search,color: Colors.grey,size: 35,)) + ], ), ), ),