diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index c5a2fcb1..6d7a7845 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -81,328 +81,469 @@ class _PatientProfileScreenState extends Statewith SingleT appBarTitle: TranslationBase.of(context).patientProfile, isShowAppBar: false,//TODO fix button location // appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType,isInpatient: isInpatient,), - body: Container( - child: Column( - children: [ - Stack( - children: [ - Column( - children: [ - PatientProfileHeaderNewDesignAppBar( - patient, - arrivalType ?? '0', - patientType, - isInpatient: isInpatient, - height: (patient.patientStatusType != null && - patient.patientStatusType == 43) - ? 210 - : 0, - ), - SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height *0.65, - child: ListView( - children: [ - Container( - child: isFromSearch - ? Column( - children: [ - tabsBar(context, screenSize), - SizedBox( - height: 10, - ), - if (_activeTab == 0) - Padding( - padding: - const EdgeInsets.symmetric( - vertical: 15.0, - horizontal: 15), - child: GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, - crossAxisCount: 3, - children: [ - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - from: from, - to: to, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - route: VITAL_SIGN_DETAILS, - isInPatient: true, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: LAB_RESULT, - isInPatient: true, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), - PatientProfileButton( + body: Column( + children: [ + Stack( + children: [ + Column( + children: [ + PatientProfileHeaderNewDesignAppBar( + patient, + arrivalType ?? '0', + patientType, + isInpatient: isInpatient, + height: (patient.patientStatusType != null && + patient.patientStatusType == 43) + ? 210 + : 0, + ), + Container( + height: MediaQuery.of(context).size.height *0.69, + + child: ListView( + children: [ + Container( + child: isFromSearch + ? Column( + children: [ + tabsBar(context, screenSize), + SizedBox( + height: 10, + ), + if (_activeTab == 0) + Padding( + padding: + const EdgeInsets.symmetric( + vertical: 15.0, + horizontal: 15), + child: GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + isInPatient: true, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + isInPatient: true, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isInPatient: isInpatient, - route: RADIOLOGY_PATIENT, - nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/health_summary.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, - isSelectInpatient: _activeTab==0, - isInPatient: isInpatient, - nameLine1: TranslationBase.of(context).patient, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, - isDischargedPatient: isDischargedPatient, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_NOTE, - isDischargedPatient: isDischargedPatient, - nameLine1: "Order", //"Text", - nameLine2: - "Sheet", //TranslationBase.of(context).orders, - icon: 'patient/Progress_notes.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PROCEDURE, - isInPatient: isInpatient, - nameLine1: TranslationBase.of(context).orders, - nameLine2: TranslationBase.of(context).procedures, - icon: 'patient/Order_Procedures.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: "Health", - isInPatient: isInpatient, - nameLine2: "Summary", - //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isDisable: true, - route: MEDICAL_FILE, - nameLine1: "Medical", //Health - isInPatient: isInpatient, - nameLine2: "Report", //Report - //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_IN_PATIENT_TO_DOCTOR, - isInPatient: true, - isDisable: isDischargedPatient|| isFromSearch, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, - nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).approvals, - icon: 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isDisable: true, - route: null, - nameLine1: "Discharge", - nameLine2: "Summery", - icon: 'patient/patient_sick_leave.png'), - PatientProfileButton( - isInPatient: isInpatient, - 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(_activeTab==1) - Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), - child: GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, - crossAxisCount: 3, - children: [ - PatientProfileButton( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: - "Health", //TranslationBase.of(context).medicalReport, - nameLine2: - "Summary", //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: LAB_RESULT, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), - // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + isSelectInpatient: _activeTab==0, + isInPatient: isInpatient, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).prescription, + icon: 'patient/order_prescription.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: "Order", //"Text", + nameLine2: + "Sheet", //TranslationBase.of(context).orders, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + isInPatient: isInpatient, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: "Health", + isInPatient: isInpatient, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: MEDICAL_FILE, + nameLine1: "Medical", //Health + isInPatient: isInpatient, + nameLine2: "Report", //Report + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_IN_PATIENT_TO_DOCTOR, + isInPatient: true, + isDisable: isDischargedPatient|| isFromSearch, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).approvals, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: null, + nameLine1: "Discharge", + nameLine2: "Summery", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + isInPatient: isInpatient, + 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(_activeTab==1) + Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), + child: GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + isInPatient: isInpatient, + 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( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: + "Health", //TranslationBase.of(context).medicalReport, + nameLine2: + "Summary", //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + PatientProfileButton( - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, - 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( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_UCAF_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).patient, - nameLine2: TranslationBase.of(context).ucaf, - icon: 'patient/ucaf.png'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ADMISSION_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), + 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( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ECG, + nameLine1: TranslationBase.of(context).patient, + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + 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( + isInPatient: isInpatient, + 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( + isInPatient: isInpatient, + 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( + isInPatient: isInpatient, + 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( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_UCAF_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).ucaf, + icon: 'patient/ucaf.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_PATIENT_TO_DOCTOR, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ADMISSION_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'patient/admission_req.png'), - ], - ), - ), - ], - ):isInpatient? - Padding( + ], + ), + ), + ], + ):isInpatient? + Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), + child: GridView.count( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + childAspectRatio: 1 / 1.0, + crossAxisCount: 3, + children: [ + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + isInPatient: true, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: LAB_RESULT, + isInPatient: true, + nameLine1: TranslationBase.of(context).lab, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/lab_results.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isInPatient: isInpatient, + route: RADIOLOGY_PATIENT, + nameLine1: TranslationBase.of(context).radiology, + nameLine2: TranslationBase.of(context).result, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + isInPatient: isInpatient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PRESCRIPTION_NEW, + isSelectInpatient :true, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).prescription, + icon: 'patient/order_prescription.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PROGRESS_NOTE, + isInPatient: isInpatient, + isDischargedPatient: isDischargedPatient, + nameLine1: TranslationBase.of(context).progress, + nameLine2: TranslationBase.of(context).note, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + isInPatient: isInpatient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_NOTE, + isDischargedPatient: isDischargedPatient, + nameLine1: "Order", //"Text", + nameLine2: + "Sheet", //TranslationBase.of(context).orders, + icon: 'patient/Progress_notes.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: ORDER_PROCEDURE, + isInPatient: isInpatient, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).procedures, + icon: 'patient/Order_Procedures.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: "Health", + isInPatient: isInpatient, + nameLine2: "Summary", + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: MEDICAL_FILE, + nameLine1: "Medical", //Health + isInPatient: isInpatient, + nameLine2: "Report", //Report + //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_IN_PATIENT_TO_DOCTOR, + isInPatient: true, + isDisable: isDischargedPatient|| isFromSearch, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + PatientProfileButton( + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_INSURANCE_APPROVALS_NEW, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).approvals, + icon: 'patient/vital_signs.png'), + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + isDisable: true, + route: null, + nameLine1: "Discharge", + nameLine2: "Summery", + icon: 'patient/patient_sick_leave.png'), + PatientProfileButton( + isInPatient: isInpatient, + 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'), + ], + ), + ): + Column( + children: [ + Padding( padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), child: GridView.count( shrinkWrap: true, @@ -413,6 +554,7 @@ class _PatientProfileScreenState extends Statewith SingleT crossAxisCount: 3, children: [ PatientProfileButton( + isInPatient: isInpatient, patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -421,57 +563,59 @@ class _PatientProfileScreenState extends Statewith SingleT nameLine1: TranslationBase.of(context).vital, nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, - isInPatient: true, icon: 'patient/vital_signs.png'), + // if (selectedPatientType != 7) PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: MEDICAL_FILE, + nameLine1: + "Health", //TranslationBase.of(context).medicalReport, + nameLine2: + "Summary", //TranslationBase.of(context).summaryReport, + icon: 'patient/health_summary.png'), + PatientProfileButton( + isInPatient: isInpatient, patient: patient, patientType: patientType, arrivalType: arrivalType, route: LAB_RESULT, - isInPatient: true, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, icon: 'patient/lab_results.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( + patient: patient, patientType: patientType, arrivalType: arrivalType, isInPatient: isInpatient, route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, - nameLine2: TranslationBase.of(context).result, + nameLine2: TranslationBase.of(context).service, icon: 'patient/health_summary.png'), PatientProfileButton( - patient: patient, isInPatient: isInpatient, + patient: patient, patientType: patientType, arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, - isSelectInpatient :true, + route: PATIENT_ECG, nameLine1: TranslationBase.of(context).patient, - nameLine2: TranslationBase.of(context).prescription, - icon: 'patient/order_prescription.png'), + nameLine2: "ECG", + icon: 'patient/patient_sick_leave.png'), PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PROGRESS_NOTE, isInPatient: isInpatient, - isDischargedPatient: isDischargedPatient, - nameLine1: TranslationBase.of(context).progress, - nameLine2: TranslationBase.of(context).note, - icon: 'patient/Progress_notes.png'), - PatientProfileButton( patient: patient, - isInPatient: isInpatient, patientType: patientType, arrivalType: arrivalType, - route: ORDER_NOTE, - isDischargedPatient: isDischargedPatient, - nameLine1: "Order", //"Text", - nameLine2: - "Sheet", //TranslationBase.of(context).orders, - icon: 'patient/Progress_notes.png'), + route: ORDER_PRESCRIPTION_NEW, + isSelectInpatient: false, + 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( patient: patient, patientType: patientType, @@ -481,55 +625,17 @@ class _PatientProfileScreenState extends Statewith SingleT 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( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: "Health", - isInPatient: isInpatient, - nameLine2: "Summary", - //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isDisable: true, - route: MEDICAL_FILE, - nameLine1: "Medical", //Health isInPatient: isInpatient, - nameLine2: "Report", //Report - //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_IN_PATIENT_TO_DOCTOR, - isInPatient: true, - isDisable: isDischargedPatient|| isFromSearch, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - PatientProfileButton( patient: patient, patientType: patientType, arrivalType: arrivalType, route: PATIENT_INSURANCE_APPROVALS_NEW, nameLine1: TranslationBase.of(context).insurance, - nameLine2: TranslationBase.of(context).approvals, + nameLine2: TranslationBase.of(context).service, icon: 'patient/vital_signs.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - isDisable: true, - route: null, - nameLine1: "Discharge", - nameLine2: "Summery", - icon: 'patient/patient_sick_leave.png'), + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( isInPatient: isInpatient, patient: patient, @@ -539,181 +645,115 @@ class _PatientProfileScreenState extends Statewith SingleT nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_UCAF_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).patient, + nameLine2: TranslationBase.of(context).ucaf, + icon: 'patient/ucaf.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_PATIENT_TO_DOCTOR, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), + if (patient.appointmentNo != null && + patient.appointmentNo != 0) + PatientProfileButton( + isInPatient: isInpatient, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: PATIENT_ADMISSION_REQUEST, + isDisable: + patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'patient/admission_req.png'), + ], ), - ): - Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15), - child: GridView.count( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - crossAxisSpacing: 10, - mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, - crossAxisCount: 3, - children: [ - PatientProfileButton( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: MEDICAL_FILE, - nameLine1: - "Health", //TranslationBase.of(context).medicalReport, - nameLine2: - "Summary", //TranslationBase.of(context).summaryReport, - icon: 'patient/health_summary.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: LAB_RESULT, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'patient/lab_results.png'), - // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) - PatientProfileButton( - - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ECG, - nameLine1: TranslationBase.of(context).patient, - nameLine2: "ECG", - icon: 'patient/patient_sick_leave.png'), - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PRESCRIPTION_NEW, - isSelectInpatient: false, - 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( - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: ORDER_PROCEDURE, - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - 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( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_UCAF_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).patient, - nameLine2: TranslationBase.of(context).ucaf, - icon: 'patient/ucaf.png'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - if (patient.appointmentNo != null && - patient.appointmentNo != 0) - PatientProfileButton( - isInPatient: isInpatient, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: PATIENT_ADMISSION_REQUEST, - isDisable: - patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).admission, - nameLine2: TranslationBase.of(context).request, - icon: 'patient/admission_req.png'), - - ], - ), - ), - ], - ), + ), + ], ), - ], - ), - ), + ), + ], ), - ], - ), + ), + ], + ), - if (patient.patientStatusType != null && - patient.patientStatusType == 43) - BaseView( - onModelReady: (model) async {}, - builder: (_, model, w) => Positioned( - top: 180, - left: 20, - right: 20, - child: Row( - children: [ - Expanded(child: Container()), - if (patient.episodeNo == 0) - AppButton( + if (patient.patientStatusType != null && + patient.patientStatusType == 43) + BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => Positioned( + top: 180, + left: 20, + right: 20, + child: Row( + children: [ + Expanded(child: Container()), + if (patient.episodeNo == 0) + AppButton( + title: + "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", + color: patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + fontColor: Colors.white, + vPadding: 8, + radius: 30, + hPadding: 20, + fontWeight: FontWeight.normal, + fontSize: 1.6, + icon: Image.asset( + "assets/images/create-episod.png", + color: Colors.white, + height: 30, + ), + onPressed: () async { + if (patient.patientStatusType == 43) { + PostEpisodeReqModel + postEpisodeReqModel = + PostEpisodeReqModel( + appointmentNo: + patient.appointmentNo, + patientMRN: + patient.patientMRN); + GifLoaderDialogUtils.showMyDialog( + context); + await model.postEpisode( + postEpisodeReqModel); + GifLoaderDialogUtils.hideDialog( + context); + patient.episodeNo = model.episodeID; + Navigator.of(context).pushNamed( + CREATE_EPISODE, + arguments: { + 'patient': patient + }); + } + }, + ), + if (patient.episodeNo != 0) + AppButton( title: - "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", + "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", color: patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700, @@ -724,71 +764,28 @@ class _PatientProfileScreenState extends Statewith SingleT fontWeight: FontWeight.normal, fontSize: 1.6, icon: Image.asset( - "assets/images/create-episod.png", + "assets/images/modilfy-episode.png", color: Colors.white, height: 30, ), - onPressed: () async { - if (patient.patientStatusType == 43) { - PostEpisodeReqModel - postEpisodeReqModel = - PostEpisodeReqModel( - appointmentNo: - patient.appointmentNo, - patientMRN: - patient.patientMRN); - GifLoaderDialogUtils.showMyDialog( - context); - await model.postEpisode( - postEpisodeReqModel); - GifLoaderDialogUtils.hideDialog( - context); - patient.episodeNo = model.episodeID; + onPressed: () { + if (patient.patientStatusType == + 43) { Navigator.of(context).pushNamed( - CREATE_EPISODE, + UPDATE_EPISODE, arguments: { 'patient': patient }); } - }, - ), - if (patient.episodeNo != 0) - AppButton( - title: - "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - color: patient.patientStatusType == 43 - ? Colors.red.shade700 - : Colors.grey.shade700, - fontColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 1.6, - icon: Image.asset( - "assets/images/modilfy-episode.png", - color: Colors.white, - height: 30, - ), - onPressed: () { - if (patient.patientStatusType == - 43) { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: { - 'patient': patient - }); - } - }), - ], - ), - )), + }), + ], + ), + )), - ], - ), + ], + ), - ], - ), + ], ), )); }