From 1bce2ad9792db0ba8943d93f0872d10239a17a46 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 15 Apr 2021 17:21:54 +0300 Subject: [PATCH 1/2] hot Fixes --- .../medical-file/medical_file_details.dart | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 765275b0..9f12e8b7 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -1095,7 +1095,24 @@ class _MedicalFileDetailsState extends State { ), ), ) - : Text("There's no medical file for this patient") + : Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts('No Data For This Visit '), + ), + SizedBox( + height: 100, + ), + ], + ), + ) ], ), ), From 369a5789a3cf4afb8df8bacec1da2a5585562d1d Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 15 Apr 2021 17:25:28 +0300 Subject: [PATCH 2/2] hot Fixe --- .../medical-file/medical_file_page.dart | 97 ++++++++++--------- ..._header_with_appointment_card_app_bar.dart | 41 ++++---- 2 files changed, 74 insertions(+), 64 deletions(-) diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 811bf32d..25b76fed 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -104,51 +104,58 @@ class _MedicalFilePageState extends State { context, MaterialPageRoute( builder: (context) => MedicalFileDetails( - age: patient.age is String ? patient.age ?? "" : "${patient.age}", - firstName: patient.firstName, - lastName: patient.lastName, - gender: patient.genderDescription, - encounterNumber: index, - pp: patient.patientId, - patient: patient, - doctorName: model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorName, - clinicName: model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .clinicName, - doctorImage: model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorImage, - episode: - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .timeLineEvents[0] - .consulations.isNotEmpty? - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .timeLineEvents[0] - .consulations[0] - .episodeID - .toString():"", - vistDate: model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .date - .toString() - .toString(), - )), + age: patient.age is String + ? patient.age ?? "" + : "${patient.age}", + firstName: patient.firstName, + lastName: patient.lastName, + gender: patient.genderDescription, + encounterNumber: index, + pp: patient.patientId, + patient: patient, + doctorName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName + : "", + clinicName: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .clinicName + : "", + doctorImage: model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .timeLineEvents[0] + .consulations + .isNotEmpty + ? model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorImage + : "", + episode: model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations.isNotEmpty + ? model.medicalFileList[0].entityList[0].timelines[index].timeLineEvents[0].consulations[0].episodeID.toString() + : "", + vistDate: model.medicalFileList[0].entityList[0].timelines[index].date.toString())), ); }, child: DoctorCard( 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 2375b644..1accfa35 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 @@ -182,7 +182,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget color: HexColor("#20A169"), ), child: AppText( - patient.startTime??"", + patient.startTime ?? "", color: Colors.white, fontSize: 1.5 * SizeConfig.textMultiplier, textAlign: TextAlign.center, @@ -235,7 +235,9 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget Row( children: [ AppText( - patient.nationalityName ?? patient.nationality??"", + patient.nationalityName ?? + patient.nationality ?? + "", fontWeight: FontWeight.bold, fontSize: 12, ), @@ -307,7 +309,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget children: [ Container( child: LargeAvatar( - name: doctorName??"", + name: doctorName ?? "", url: profileUrl, ), width: 25, @@ -382,23 +384,24 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget Texts(vistDate ?? '', fontSize: 12) ], ), - Row( - children: [ - Expanded( - child: Texts( - !isPrescriptions - ? 'Result Date: ' - : 'Prescriptions Date ', - color: Colors.grey[800], - fontSize: 12, + if (!isMedicalFile) + Row( + children: [ + Expanded( + child: Texts( + !isPrescriptions + ? 'Result Date: ' + : 'Prescriptions Date ', + color: Colors.grey[800], + fontSize: 12, + ), ), - ), - Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', - fontSize: 14, - ) - ], - ) + Texts( + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + fontSize: 14, + ) + ], + ) ]), ), ),