diff --git a/assets/images/no-data.png b/assets/images/no-data.png new file mode 100644 index 00000000..4fd47e0f Binary files /dev/null and b/assets/images/no-data.png differ diff --git a/lib/core/viewModel/medical_file_view_model.dart b/lib/core/viewModel/medical_file_view_model.dart index 67760908..afebad74 100644 --- a/lib/core/viewModel/medical_file_view_model.dart +++ b/lib/core/viewModel/medical_file_view_model.dart @@ -19,7 +19,7 @@ class MedicalFileViewModel extends BaseViewModel { await _medicalFileService.getMedicalFile(mrn: mrn); if (_medicalFileService.hasError) { error = _medicalFileService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else setState(ViewState.Idle); } diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 46ec0ac3..e9203b9c 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -131,181 +131,6 @@ class _MedicalFilePageState extends State { ), ); - // return Padding( - // padding: EdgeInsets.symmetric( - // horizontal: 12.0, vertical: 8.0), - // child: InkWell( - // child: Container( - // width: double.infinity, - // margin: EdgeInsets.only( - // top: 10, left: 10, right: 10), - // padding: EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.all( - // Radius.circular(10.0), - // ), - // border: Border.all( - // color: Colors.grey[200], width: 0.5), - // ), - // child: Column( - // children: [ - // Row( - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Row( - // children: [ - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .doctorName, - // fontWeight: FontWeight.w700, - // fontSize: 17.0, - // fontFamily: 'Poppins', - // ) - // ], - // ), - // Row( - // children: [ - // AppText( - // Helpers.convertStringToDate(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .day - // .toString() + - // "/", - // ), - // AppText( - // Helpers.convertStringToDate(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .month - // .toString() + - // "/", - // ), - // AppText( - // Helpers.convertStringToDate( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .year - // .toString(), - // ), - // ], - // ) - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // children: [ - // ClipRRect( - // borderRadius: - // BorderRadius.all( - // Radius.circular(30)), - // child: Image.network( - // 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', - // fit: BoxFit.cover, - // width: 60, - // height: 70, - // ), - // ), - // ], - // ), - // ), - // Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .clinic + - // ": ", - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .clinicName, - // fontWeight: FontWeight.w600, - // ), - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment - // .spaceBetween, - // children: [ - // AppText( - // TranslationBase.of(context) - // .branch + - // ": ", - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .projectName, - // fontWeight: FontWeight.w600, - // ), - // ], - // ), - // ], - // ), - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment.end, - // children: [ - // Column( - // children: [ - // Icon( - // Icons.remove_red_eye, - // size: 30.0, - // ) - // ], - // ) - // ], - // ), - // ], - // ), - // ), - // onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // MedicalFileDetails( - // age: patient.age, - // firstName: patient.firstName, - // lastName: patient.lastName, - // gender: patient.genderDescription, - // encounterNumber: index, - // pp: patient.patientId, - // patient: patient, - // )), - // ); - // }, - // ), - // ); }) : Column( children: [ diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart index a61477e7..0d8b1749 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -43,6 +43,8 @@ class _LaboratoryResultPageState extends State { orderNo: widget.patientLabOrders.orderNo, appointmentDate:widget.patientLabOrders.orderDate, doctorName: widget.patientLabOrders.doctorName, + branch: widget.patientLabOrders.projectName, + clinic: widget.patientLabOrders.clinicDescription, profileUrl: widget.patientLabOrders.doctorImageURL, invoiceNO: widget.patientLabOrders.invoiceNo, ), diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 23f40f06..b1516ba8 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -136,6 +136,7 @@ class LabsHomePage extends StatelessWidget { invoiceNO: ' ${labOrder.invoiceNo}', profileUrl: labOrder.doctorImageURL, branch: labOrder.projectName, + clinic: labOrder.clinicDescription, appointmentDate: labOrder.orderDate, orderNo: labOrder.orderNo, ); diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index c5921438..235aacf6 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -43,6 +43,8 @@ class RadiologyDetailsPage extends StatelessWidget { arrivalType: arrivalType ?? "0", appointmentDate: finalRadiology.orderDate, doctorName: finalRadiology.doctorName, + clinic: finalRadiology.clinicDescription, + branch: finalRadiology.projectName, profileUrl: finalRadiology.doctorImageURL, invoiceNO: finalRadiology.invoiceNo.toString(), ), @@ -54,6 +56,7 @@ class RadiologyDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( + width: double.maxFinite, margin: EdgeInsets.all(8), decoration: BoxDecoration( color: Colors.white, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 5cb14b8a..d688710f 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -123,6 +123,7 @@ class RadiologyHomePage extends StatelessWidget { profileUrl: model.radiologyList[index].doctorImageURL, invoiceNO: '${model.radiologyList[index].invoiceNo}', branch: '${model.radiologyList[index].projectName}', + clinic: model.radiologyList[index].clinicDescription, appointmentDate: model.radiologyList[index].orderDate, ), )), diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index f2bbe274..a92f5365 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -36,6 +36,7 @@ class PrescriptionItemsPage extends StatelessWidget { patientType: patientType??"0", arrivalType: arrivalType??"0", clinic: prescriptions.clinicDescription, + branch: prescriptions.name, isPrescriptions: true, appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), doctorName: prescriptions.doctorName, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 9e44df17..646665b7 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -29,121 +29,119 @@ class ProcedureScreen extends StatelessWidget { builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( isShowAppBar: true, + baseViewModel: model, appBar: PatientProfileHeaderNewDesignAppBar( patient, arrivalType ?? '0', patientType), - body: NetworkBaseView( - baseViewModel: model, - child: SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 12, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - 'Order Test or', - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - Texts( - 'Procedure', - bold: true, - fontSize: 22, - ), - ], - ), + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + 'Order Test or', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + Texts( + 'Procedure', + bold: true, + fontSize: 22, + ), + ], ), - if (patientType != null && patientType == '7' && patient.patientStatusType == 43) - InkWell( - onTap: () { - addSelectedProcedure(context, model, patient); - }, - child: Container( - width: double.maxFinite, - height: 140, - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Container( - height: 90, - child: Column( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Icon( - Icons.add, - color: Colors.white, - ), - ), + ), + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) + InkWell( + onTap: () { + addSelectedProcedure(context, model, patient); + }, + child: Container( + width: double.maxFinite, + height: 140, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.grey[300], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Container( + height: 90, + child: Column( + children: [ + Container( + height: 40, + width: 40, + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: BorderRadius.circular(10), ), - SizedBox( - height: 10, + child: Center( + child: Icon( + Icons.add, + color: Colors.white, + ), ), - Texts( - 'Add More Procedure', - color: Colors.grey[600], - fontWeight: FontWeight.w600, - ) - ], - ), + ), + SizedBox( + height: 10, + ), + Texts( + 'Add More Procedure', + color: Colors.grey[600], + fontWeight: FontWeight.w600, + ) + ], ), ), ), ), - if (model.procedureList.isNotEmpty) - ...List.generate( - model.procedureList[0].rowcount, - (index) => ProcedureCard( - categoryID: - model.procedureList[0].entityList[index].categoryID, - entityList: model.procedureList[0].entityList[index], - onTap: () { - if (model.procedureList[0].entityList[index].categoryID == - 2 || - model.procedureList[0].entityList[index].categoryID == 4) - updateProcedureForm(context, - model: model, - patient: patient, - remarks: model - .procedureList[0].entityList[index].remarks, - orderType: model.procedureList[0] - .entityList[index].orderType - .toString(), - orderNo: model - .procedureList[0].entityList[index].orderNo, - procedureName: model.procedureList[0] - .entityList[index].procedureName, - categoreId: model.procedureList[0] - .entityList[index].categoryID - .toString(), - procedureId: model.procedureList[0] - .entityList[index].procedureId, - limetNo: model.procedureList[0] - .entityList[index].lineItemNo); - // } else - // helpers.showErrorToast( - // 'You Cant Update This Procedure'); - }, - ), + ), + if (model.procedureList.isNotEmpty) + ...List.generate( + model.procedureList[0].rowcount, + (index) => ProcedureCard( + categoryID: + model.procedureList[0].entityList[index].categoryID, + entityList: model.procedureList[0].entityList[index], + onTap: () { + if (model.procedureList[0].entityList[index].categoryID == + 2 || + model.procedureList[0].entityList[index].categoryID == 4) + updateProcedureForm(context, + model: model, + patient: patient, + remarks: model + .procedureList[0].entityList[index].remarks, + orderType: model.procedureList[0] + .entityList[index].orderType + .toString(), + orderNo: model + .procedureList[0].entityList[index].orderNo, + procedureName: model.procedureList[0] + .entityList[index].procedureName, + categoreId: model.procedureList[0] + .entityList[index].categoryID + .toString(), + procedureId: model.procedureList[0] + .entityList[index].procedureId, + limetNo: model.procedureList[0] + .entityList[index].lineItemNo); + // } else + // helpers.showErrorToast( + // 'You Cant Update This Procedure'); + }, ), - ], - ), + ), + ], ), ), ), diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index bfe8fcad..0b80c788 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -171,7 +171,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget Container( child: AppText( convertDateFormat2( - patient.appointmentDate.toString() ?? ''), + patient.appointmentDate ?? ''), fontSize: 1.5 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), @@ -281,7 +281,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget date.day.toString().padLeft(2, '0'); } - return newDate.toString(); + return newDate??''; } isToday(date) { diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index ddb52e84..3031b0d1 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -380,7 +380,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre fontWeight: FontWeight.w600, fontSize: 12, ), - if (orderNo != null && !isPrescriptions) + if (orderNo != null ) Row( children: [ Texts( @@ -393,7 +393,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if (invoiceNO != null && !isPrescriptions) + if (invoiceNO != null ) Row( children: [ Texts( @@ -407,7 +407,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if(isPrescriptions && branch!=null) + if( branch!=null) Row( children: [ Texts( @@ -421,7 +421,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if(isPrescriptions) + if(clinic!=null) Row( children: [ Texts( diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 9ba055fc..df5cbe33 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -82,7 +82,7 @@ class DoctorCard extends StatelessWidget { ], ), Row( - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( child: LargeAvatar( @@ -93,74 +93,81 @@ class DoctorCard extends StatelessWidget { height: 55, ), Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (orderNo != null && !isPrescriptions) - Row( - children: [ - Texts( - 'order No:', - color: Colors.grey[500], - fontSize: 14, - ), - Texts( - orderNo ?? '', - fontSize: 14, - ) - ], - ), - if (invoiceNO != null && !isPrescriptions) - Row( + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( - 'Invoice:', - fontSize: 14, - color: Colors.grey[500], + if (orderNo != null && !isPrescriptions) + Row( + children: [ + Texts( + 'order No:', + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + orderNo ?? '', + fontSize: 14, + ) + ], + ), + if (invoiceNO != null && !isPrescriptions) + Row( + children: [ + Texts( + 'Invoice:', + fontSize: 14, + color: Colors.grey[500], + ), + Texts( + invoiceNO, + fontSize: 14, + ) + ], + ), + if(clinic!=null) + Row( + children: [ + Texts( + 'Clinic: ', + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + clinic, + fontSize: 14, + ) + ], ), - Texts( - invoiceNO, - fontSize: 14, + if(branch!=null) + Row( + children: [ + Texts( + 'Branch: ', + fontSize: 14, + color: Colors.grey[500], + ), + Texts( + branch, + fontSize: 14, + ) + ], ) - ], - ), - if(isPrescriptions) - Row( - children: [ - Texts( - 'Clinic: ', - color: Colors.grey[500], - fontSize: 14, - ), - Texts( - clinic, - fontSize: 14, - ) - ], - ), - if(branch!=null) - Row( - children: [ - Texts( - 'Branch: ', - fontSize: 14, - color: Colors.grey[500], - ), - Texts( - branch, - fontSize: 14, - ) - ], - ) - ]), + ]), + ), + ), + Icon( + EvaIcons.eye, + ) + ], ), ), - Icon( - EvaIcons.eye, - ) + ], ), ], diff --git a/lib/widgets/shared/network_base_view.dart b/lib/widgets/shared/network_base_view.dart index 139b85e8..adba46cd 100644 --- a/lib/widgets/shared/network_base_view.dart +++ b/lib/widgets/shared/network_base_view.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -32,8 +33,13 @@ class NetworkBaseView extends StatelessWidget { break; case ViewState.Error: return Center( - child: DrAppEmbeddedError( - error: baseViewModel.error, + child: Column( + children: [ + SizedBox(height: 100,), + Image.asset('assets/images/no-data.png',height: 250), + Texts(baseViewModel.error??'') + + ], ), ); break;