diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 651d3752..a0d8e470 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; 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/screens/base/base_view.dart'; diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart index a3a78ef1..42b91de4 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dart @@ -42,7 +42,7 @@ class ProfileGridForInPatient extends StatelessWidget { TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, 'Special Rsult', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', + TranslationBase.of(context).lab, 'Special Result', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).result, RADIOLOGY_PATIENT, 'patient/health_summary.png', diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart index c01757c5..f85bf864 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_other.dart @@ -33,112 +33,60 @@ class ProfileGridForOther extends StatelessWidget { @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel( - TranslationBase.of(context).vital, - TranslationBase.of(context).signs, - VITAL_SIGN_DETAILS, + PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, 'patient/vital_signs.png', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, - TranslationBase.of(context).result, - LAB_RESULT, - 'patient/lab_results.png', + TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).radiology, - TranslationBase.of(context).service, - RADIOLOGY_PATIENT, - 'patient/health_summary.png', + TranslationBase.of(context).lab, 'Special Result', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).orders, - TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, - 'patient/order_prescription.png', + PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, + RADIOLOGY_PATIENT, 'patient/health_summary.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).health, - TranslationBase.of(context).summary, - HEALTH_SUMMARY, + PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', + isInPatient: isInpatient), + PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, 'patient/health_summary.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).patient, - "ECG", - PATIENT_ECG, - 'patient/patient_sick_leave.png', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).orders, - TranslationBase.of(context).procedures, - ORDER_PROCEDURE, - 'patient/Order_Procedures.png', + PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, + ORDER_PROCEDURE, 'patient/Order_Procedures.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase - .of(context) - .insurance, - TranslationBase - .of(context) - .service, - PATIENT_INSURANCE_APPROVALS_NEW, - 'patient/vital_signs.png', + PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase - .of(context) - .patientSick, - TranslationBase - .of(context) - .leave, - ADD_SICKLEAVE, + PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, 'patient/patient_sick_leave.png', isInPatient: isInpatient), - if (isFromLiveCare || - (patient.appointmentNo != null && patient.appointmentNo != 0)) - PatientProfileCardModel( - TranslationBase - .of(context) - .patient, - TranslationBase - .of(context) - .ucaf, - PATIENT_UCAF_REQUEST, - 'patient/ucaf.png', + if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) + PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, 'patient/ucaf.png', isInPatient: isInpatient, - isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || - patient.appointmentNo == null ), - if (isFromLiveCare || - (patient.appointmentNo != null && patient.appointmentNo != 0)) + isDisable: isFromLiveCare + ? patient.appointmentNo == null + : patient.patientStatusType != 43 || patient.appointmentNo == null), + if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) PatientProfileCardModel( - TranslationBase - .of(context) - .referral, - TranslationBase - .of(context) - .patient, - REFER_PATIENT_TO_DOCTOR, - 'patient/refer_patient.png', - isInPatient: isInpatient, - isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || - patient.appointmentNo == null , + TranslationBase.of(context).referral, + TranslationBase.of(context).patient, + REFER_PATIENT_TO_DOCTOR, + 'patient/refer_patient.png', + isInPatient: isInpatient, + isDisable: isFromLiveCare + ? patient.appointmentNo == null + : patient.patientStatusType != 43 || patient.appointmentNo == null, ), - if (isFromLiveCare || - (patient.appointmentNo != null && patient.appointmentNo != 0)) - PatientProfileCardModel( - TranslationBase - .of(context) - .admission, - TranslationBase - .of(context) - .request, - PATIENT_ADMISSION_REQUEST, - 'patient/admission_req.png', + if (isFromLiveCare || (patient.appointmentNo != null && patient.appointmentNo != 0)) + PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', isInPatient: isInpatient, - isDisable: isFromLiveCare?patient.appointmentNo == null:patient.patientStatusType != 43 || - patient.appointmentNo == null - ), + isDisable: isFromLiveCare + ? patient.appointmentNo == null + : patient.patientStatusType != 43 || patient.appointmentNo == null), ]; return Column( @@ -168,9 +116,7 @@ class ProfileGridForOther extends StatelessWidget { isDisable: cardsList[index].isDisable, onTap: cardsList[index].onTap, isLoading: cardsList[index].isLoading, - isFromLiveCare: isFromLiveCare - - ), + isFromLiveCare: isFromLiveCare), ), ), ], diff --git a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart index 9c9f7d36..ea8ea98f 100644 --- a/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart +++ b/lib/screens/patients/profile/profile_screen/profile_gird_for_search.dart @@ -16,96 +16,54 @@ class ProfileGridForSearch extends StatelessWidget { String from; String to; - ProfileGridForSearch( - {Key key, - this.patient, - this.patientType, - this.arrivalType, - this.height, - this.isInpatient, this.from,this.to}) + ProfileGridForSearch( + {Key key, this.patient, this.patientType, this.arrivalType, this.height, this.isInpatient, this.from, this.to}) : super(key: key); @override Widget build(BuildContext context) { final List cardsList = [ - PatientProfileCardModel( - TranslationBase.of(context).vital, - TranslationBase.of(context).signs, - VITAL_SIGN_DETAILS, + PatientProfileCardModel(TranslationBase.of(context).vital, TranslationBase.of(context).signs, VITAL_SIGN_DETAILS, 'patient/vital_signs.png', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).lab, - TranslationBase.of(context).result, - LAB_RESULT, - 'patient/lab_results.png', + TranslationBase.of(context).lab, TranslationBase.of(context).result, LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), PatientProfileCardModel( - TranslationBase.of(context).radiology, - TranslationBase.of(context).service, - RADIOLOGY_PATIENT, - 'patient/health_summary.png', + TranslationBase.of(context).lab, 'Special Result', ALL_SPECIAL_LAB_RESULT, 'patient/lab_results.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).orders, - TranslationBase.of(context).prescription, - ORDER_PRESCRIPTION_NEW, - 'patient/order_prescription.png', + PatientProfileCardModel(TranslationBase.of(context).radiology, TranslationBase.of(context).service, + RADIOLOGY_PATIENT, 'patient/health_summary.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).health, - TranslationBase.of(context).summary, - HEALTH_SUMMARY, + PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).prescription, + ORDER_PRESCRIPTION_NEW, 'patient/order_prescription.png', + isInPatient: isInpatient), + PatientProfileCardModel(TranslationBase.of(context).health, TranslationBase.of(context).summary, HEALTH_SUMMARY, 'patient/health_summary.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).patient, - "ECG", - PATIENT_ECG, - 'patient/patient_sick_leave.png', + PatientProfileCardModel(TranslationBase.of(context).patient, "ECG", PATIENT_ECG, 'patient/patient_sick_leave.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).orders, - TranslationBase.of(context).procedures, - ORDER_PROCEDURE, - 'patient/Order_Procedures.png', + PatientProfileCardModel(TranslationBase.of(context).orders, TranslationBase.of(context).procedures, + ORDER_PROCEDURE, 'patient/Order_Procedures.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).insurance, - TranslationBase.of(context).service, - PATIENT_INSURANCE_APPROVALS_NEW, - 'patient/vital_signs.png', + PatientProfileCardModel(TranslationBase.of(context).insurance, TranslationBase.of(context).service, + PATIENT_INSURANCE_APPROVALS_NEW, 'patient/vital_signs.png', isInPatient: isInpatient), - PatientProfileCardModel( - TranslationBase.of(context).patientSick, - TranslationBase.of(context).leave, - ADD_SICKLEAVE, + PatientProfileCardModel(TranslationBase.of(context).patientSick, TranslationBase.of(context).leave, ADD_SICKLEAVE, 'patient/patient_sick_leave.png', isInPatient: isInpatient), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel( - TranslationBase.of(context).patient, - TranslationBase.of(context).ucaf, - PATIENT_UCAF_REQUEST, - 'patient/ucaf.png', - isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel(TranslationBase.of(context).patient, TranslationBase.of(context).ucaf, + PATIENT_UCAF_REQUEST, 'patient/ucaf.png', + isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel( - TranslationBase.of(context).referral, - TranslationBase.of(context).patient, - REFER_PATIENT_TO_DOCTOR, - 'patient/refer_patient.png', - isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel(TranslationBase.of(context).referral, TranslationBase.of(context).patient, + REFER_PATIENT_TO_DOCTOR, 'patient/refer_patient.png', + isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), if (patient.appointmentNo != null && patient.appointmentNo != 0) - PatientProfileCardModel( - TranslationBase.of(context).admission, - TranslationBase.of(context).request, - PATIENT_ADMISSION_REQUEST, - 'patient/admission_req.png', - isInPatient: isInpatient, - isDisable: patient.patientStatusType != 43 ? true : false), + PatientProfileCardModel(TranslationBase.of(context).admission, TranslationBase.of(context).request, + PATIENT_ADMISSION_REQUEST, 'patient/admission_req.png', + isInPatient: isInpatient, isDisable: patient.patientStatusType != 43 ? true : false), ]; return Column( diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index c5417d85..14469581 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -16,12 +16,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { final bool isInpatient; ProfileMedicalInfoWidget( - {Key key, - this.patient, - this.patientType, - this.arrivalType, - this.from, - this.to, this.isInpatient}); + {Key key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -35,27 +30,27 @@ class ProfileMedicalInfoWidget extends StatelessWidget { childAspectRatio: 1 / 1.0, crossAxisCount: 3, children: [ - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: VITAL_SIGN_DETAILS, - icon: 'patient/vital_signs.png'), - // if (selectedPatientType != 7) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: HEALTH_SUMMARY, - nameLine1: "Health" ,//TranslationBase.of(context).medicalReport, - nameLine2: "Summary",//TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + icon: 'patient/vital_signs.png'), + // if (selectedPatientType != 7) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: HEALTH_SUMMARY, + nameLine1: "Health", //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, @@ -65,17 +60,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, icon: 'patient/lab_results.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ALL_SPECIAL_LAB_RESULT, + nameLine1: TranslationBase.of(context).lab, + nameLine2: 'Special Result', + icon: 'patient/lab_results.png'), // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isInPatient:isInpatient, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/health_summary.png'), + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/health_summary.png'), PatientProfileButton( key: key, patient: patient, @@ -94,37 +98,37 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: 'patient/order_prescription.png'), - // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PROCEDURE, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).service, - icon: 'patient/vital_signs.png'), - // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ADD_SICKLEAVE, - nameLine1: TranslationBase.of(context).patientSick, - nameLine2: TranslationBase.of(context).leave, - icon: 'patient/patient_sick_leave.png'), - if (patient.appointmentNo!=null && patient.appointmentNo!=0) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'patient/vital_signs.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'patient/patient_sick_leave.png'), + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, @@ -135,7 +139,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).ucaf, icon: 'patient/ucaf.png'), - if (patient.appointmentNo!=null && patient.appointmentNo!=0) + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, @@ -146,7 +150,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'), - if (patient.appointmentNo!=null && patient.appointmentNo!=0) + if (patient.appointmentNo != null && patient.appointmentNo != 0) PatientProfileButton( key: key, patient: patient, @@ -174,7 +178,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: ORDER_NOTE, - nameLine1:"Order", //"Text", + nameLine1: "Order", //"Text", nameLine2: "Sheet", icon: 'patient/Progress_notes.png'), ],