diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 411079fc..754ccb47 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -185,7 +185,7 @@ class _EndCallScreenState extends State { backgroundColor: Theme.of(context).scaffoldBackgroundColor, isShowAppBar: true, appBar: PatientProfileAppBar( - widget.patient, arrivalType ?? '7', '1', + widget.patient, isInpatient: isInpatient, height: (widget.patient.patientStatusType != null && widget.patient.patientStatusType == 43) diff --git a/lib/screens/medical-file/health_summary_page.dart b/lib/screens/medical-file/health_summary_page.dart index ee4726e2..6b4b066c 100644 --- a/lib/screens/medical-file/health_summary_page.dart +++ b/lib/screens/medical-file/health_summary_page.dart @@ -32,8 +32,6 @@ class _HealthSummaryPageState extends State { AppScaffold( appBar: PatientProfileAppBar( patient, - patientType.toString() ?? "0", - arrivalType, isInpatient: isInpatient, ), isShowAppBar: true, diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 64d76f06..b53284a9 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -104,8 +104,6 @@ class _MedicalFileDetailsState extends State { AppScaffold( appBar: PatientProfileAppBar( patient, - patient.patientType.toString() ?? "0", - patient.arrivedOn.toString() ?? 0, doctorName: doctorName, profileUrl: doctorImage, clinic: clinicName, diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index 97923959..ba4c108c 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -31,7 +31,7 @@ class ECGPage extends StatelessWidget { baseViewModel: model, isShowAppBar: true, backgroundColor: Color(0xffF8F8F8), - appBar: PatientProfileAppBar(patient,arrivalType??'0',patientType), + appBar: PatientProfileAppBar(patient), body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(8.0), diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 3d03589b..1ab0734b 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -46,8 +46,6 @@ class _InsuranceApprovalScreenNewState AppScaffold( appBar: PatientProfileAppBar( patient, - patientType.toString() ?? "0", - patientType, isInpatient: isInpatient, ), isShowAppBar: true, diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 57af55d8..0945df37 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -55,7 +55,7 @@ class _InsuranceApprovalsDetailsState extends State { isShowAppBar: true, baseViewModel: model, appBar: PatientProfileAppBar( - patient, patient.patientType.toString(), patient.arrivedOn), + patient), body: patient.admissionNo != null ? SingleChildScrollView( child: Container( diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index af61de0d..081f1a6e 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -48,7 +48,7 @@ class _UcafDetailScreenState extends State { baseViewModel: model, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).ucaf, body: Column( children: [ diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 7c163a79..3bbc6637 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -66,7 +66,7 @@ class _UCAFInputScreenState extends State { baseViewModel: model, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).ucaf, body: model.patientVitalSignsHistory.length > 0 && model.patientChiefComplaintList != null && diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index dd6d9d76..f0ccaece 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -62,7 +62,7 @@ class _AdmissionRequestThirdScreenState baseViewModel: model, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index 175f5669..563b4827 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -53,7 +53,7 @@ class _AdmissionRequestThirdScreenState baseViewModel: model, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index f7e03533..dc79b2be 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -75,7 +75,7 @@ class _AdmissionRequestSecondScreenState baseViewModel: model, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).admissionRequest, body: GestureDetector( onTap: () { 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 23b17830..d6b4d2bc 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -40,8 +40,7 @@ class _LaboratoryResultPageState extends State { isShowAppBar: true, appBar: PatientProfileAppBar( widget.patient, - widget.patientType ?? "0", - widget.arrivalType ?? "0", + isFromLabResult: true, appointmentDate: widget.patientLabOrders.orderDate, ), 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 96b64675..b2bfa2fd 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -54,8 +54,7 @@ class _LabsHomePageState extends State { isShowAppBar: true, appBar: PatientProfileAppBar( patient, - patient.patientType.toString() ?? '0', - patientType, + isInpatient: isInpatient, ), body: SingleChildScrollView( diff --git a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart index 7b787f44..ab24f8e0 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportDetailPage.dart @@ -33,8 +33,6 @@ class MedicalReportDetailPage extends StatelessWidget { backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: PatientProfileAppBar( patient, - patientType, - arrivalType, ), body: Container( child: SingleChildScrollView( diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index 5f6b3eea..aa9d0b58 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -45,8 +45,6 @@ class MedicalReportPage extends StatelessWidget { backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: PatientProfileAppBar( patient, - patientType, - arrivalType, ), body: SingleChildScrollView( physics: BouncingScrollPhysics(), diff --git a/lib/screens/patients/profile/note/progress_note_screen.dart b/lib/screens/patients/profile/note/progress_note_screen.dart index 087cab80..723ee75f 100644 --- a/lib/screens/patients/profile/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/note/progress_note_screen.dart @@ -90,8 +90,6 @@ class _ProgressNoteState extends State { // appBarTitle: TranslationBase.of(context).progressNote, appBar: PatientProfileAppBar( patient, - patient.patientType.toString() ?? '0', - arrivalType, isInpatient: true, ), body: model.patientProgressNoteList == null || diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index e0bea0b7..8a831c4d 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -103,8 +103,7 @@ class _PatientProfileScreenState extends State Column( children: [ PatientProfileAppBar( - patient, arrivalType ?? '0', patientType, - isInpatient: isInpatient, + patient, isFromLiveCare: isFromLiveCare, height: (patient.patientStatusType != null && patient.patientStatusType == 43) diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index cb0cd99a..48bef68a 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -37,8 +37,6 @@ class RadiologyDetailsPage extends StatelessWidget { builder: (_, model, widget) => AppScaffold( appBar: PatientProfileAppBar( patient, - patientType ?? "0", - arrivalType ?? "0", appointmentDate: finalRadiology.orderDate, doctorName: finalRadiology.doctorName, clinic: finalRadiology.clinicDescription, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 8d0946c5..3d8d527c 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -52,8 +52,6 @@ class _RadiologyHomePageState extends State { // appBarTitle: TranslationBase.of(context).radiology, appBar: PatientProfileAppBar( patient, - patient.patientType.toString() ?? '0', - arrivalType, isInpatient: isInpatient, ), baseViewModel: model, diff --git a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart index 11ace2f6..66fd22fd 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen-in-patient.dart @@ -138,8 +138,6 @@ class _PatientMakeInPatientReferralScreenState extends State { appBarTitle: TranslationBase.of(context).referPatient, isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), body: SingleChildScrollView( child: Container( child: Column( diff --git a/lib/screens/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart index ab5e02d0..60597b11 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -82,7 +82,7 @@ class _UpdateSoapIndexState extends State mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileAppBar(patient, '7', '7',isFromSOAP: true,), + PatientProfileAppBar(patient), Container( width: double.infinity, height: 1, diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index a67e213f..23266095 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -41,7 +41,7 @@ class VitalSignDetailsScreen extends StatelessWidget { isShowAppBar: true, backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient), appBarTitle: TranslationBase.of(context).vitalSign, body: mode.patientVitalSignsHistory.length > 0 ? Column( diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index 0c41386c..0ed9da56 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -191,7 +191,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget { backgroundColor: Color.fromRGBO(248, 248, 248, 1), isShowAppBar: true, appBar: PatientProfileAppBar( - patient, patientType, arrivalType), + patient,), body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart index 472f6dd8..7cf33935 100644 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -45,7 +45,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { backgroundColor: Colors.grey[100], baseViewModel: model, appBar: PatientProfileAppBar( - patient, patient.patientType.toString(), patient.arrivedOn), + patient), body: SingleChildScrollView( child: Container( child: Column( diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index e888dddd..b97343c4 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -30,8 +30,6 @@ class PrescriptionItemsPage extends StatelessWidget { baseViewModel: model, appBar: PatientProfileAppBar( patient, - patientType??"0", - arrivalType??"0", clinic: prescriptions.clinicDescription, branch: prescriptions.name, isPrescriptions: true, diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 17b36233..1a99299b 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -37,8 +37,6 @@ class PrescriptionsPage extends StatelessWidget { backgroundColor: Colors.grey[100], appBar: PatientProfileAppBar( patient, - patientType ?? '0', - arrivalType, isInpatient: isInpatient, ), body: patient.admissionNo == null diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index aa51fc18..79371459 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -46,8 +46,6 @@ class ProcedureScreen extends StatelessWidget { baseViewModel: model, appBar: PatientProfileAppBar( patient, - arrivalType ?? '0', - patientType, isInpatient: isInpatient, ), body: SingleChildScrollView( diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index d7759f9e..7b065321 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -36,8 +36,6 @@ class AddSickLeavScreen extends StatelessWidget { backgroundColor: Colors.grey[100], appBar: PatientProfileAppBar( patient, - routeArgs['patientType'] ?? "0", - routeArgs['arrivalType'] ?? "0", isInpatient: isInpatient, ), body: SingleChildScrollView( diff --git a/lib/screens/sick-leave/show-sickleave.dart b/lib/screens/sick-leave/show-sickleave.dart index 4ead8cd3..726524d8 100644 --- a/lib/screens/sick-leave/show-sickleave.dart +++ b/lib/screens/sick-leave/show-sickleave.dart @@ -27,8 +27,6 @@ class ShowSickLeaveScreen extends StatelessWidget { backgroundColor: Colors.grey[100], appBar: PatientProfileAppBar( patient, - routeArgs['patientType'] ?? "0", - routeArgs['arrivalType'] ?? "0", ), body: SingleChildScrollView( child: Column( diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index 5d676061..467d681b 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; @@ -8,7 +7,6 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -17,8 +15,6 @@ import 'large_avatar.dart'; class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget { final PatiantInformtion patient; - final String patientType; - final String arrivalType; final double height; final bool isInpatient; final bool isDischargedPatient; @@ -36,11 +32,10 @@ class PatientProfileAppBar extends StatelessWidget final String visitDate; final String clinic; final bool isAppointmentHeader; - final bool isFromSOAP; final bool isFromLabResult; PatientProfileAppBar( - this.patient, this.patientType, this.arrivalType, + this.patient, {this.height = 0.0, this.isInpatient = false, this.isDischargedPatient = false, @@ -57,7 +52,6 @@ class PatientProfileAppBar extends StatelessWidget this.episode, this.visitDate, this.isAppointmentHeader = false, - this.isFromSOAP = false, this.isFromLabResult = false}); @@ -86,7 +80,7 @@ class PatientProfileAppBar extends StatelessWidget ? 215 : isAppointmentHeader ? 325 - : 215 + : 200 : height, child: Container( padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), @@ -173,25 +167,24 @@ class PatientProfileAppBar extends StatelessWidget fontFamily: 'Poppins', fontSize: 12, ) - : AppText( - TranslationBase - .of(context) - .notArrived, - color: Colors.red[800], - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 12, - ), - patient.startTime != null - ? AppText( + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), patient.startTime != null - ? patient.startTime - : '', - fontFamily: 'Poppins', - fontWeight: FontWeight.w600, - ):SizedBox() - ], - )) + ? AppText( + patient.startTime != null + ? patient.startTime + : '', + fontWeight: FontWeight.w700, + fontSize: 12, + color: Color(0xFF2E303A)) + : SizedBox() + ], + )) : SizedBox(), Row( @@ -296,13 +289,10 @@ class PatientProfileAppBar extends StatelessWidget width: 3.5, ), AppText( - (isFromSOAP ? AppDateUtils + AppDateUtils .getDayMonthYearDateFormatted( AppDateUtils.convertStringToDate( - patient.appointmentDate)) : AppDateUtils - .convertStringToDateFormat( - patient.appointmentDate, - 'MM-dd-yyyy')) + patient.appointmentDate)) , fontWeight: FontWeight.w700, fontSize: 12, @@ -356,7 +346,12 @@ class PatientProfileAppBar extends StatelessWidget new TextSpan( text: patient.admissionDate == null ? "" - : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", + : "${AppDateUtils + .getDayMonthYearDateFormatted( + (AppDateUtils + .getDateTimeFromServerFormat( + patient.admissionDate + .toString())))}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 12, @@ -552,6 +547,6 @@ class PatientProfileAppBar extends StatelessWidget @override Size get preferredSize => Size(double.maxFinite, height == 0 - ? isInpatient ? 215 : isAppointmentHeader ? 325 : 215 + ? isInpatient ? 215 : isAppointmentHeader ? 325 : 200 : height); }