Merge pull request 'haroon_dev' (#180) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/180
master
Haroon6138 24 hours ago
commit a6344d6a81

@ -618,7 +618,7 @@
"general": "General",
"profile": "ملفي",
"notifications": "إشعارات",
"notificationDetails": "تفاصيل الاشعار",
"notificationDetails": "Notification Details",
"notificationDetailsa": "تفاصيل الاشعار",
"infoMyDoctorPoints": "",
"infoMyDoctor": "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:",

@ -83,6 +83,7 @@ var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport';
var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail';
var SEND_PRESCRIPTION_EMAIL_NEW = 'Services/Notifications.svc/REST/SendPrescriptionEmail_New';
var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
///Lab Order

@ -7,7 +7,7 @@ class PenguinMethodChannel {
return await rootBundle.load("assets/images/progress-loading-red-crop-1.gif").then((data) => data.buffer.asUint8List());
}
Future<void> launch(String storyboardName, String languageCode, String username, {NavigationClinicDetails? details}) async {
Future<void> launch(String storyboardName, String languageCode, String username, bool isClinicNavigation, {NavigationClinicDetails? details}) async {
// Uint8List image = await loadGif();
try {
await _channel.invokeMethod('launchPenguin', {
@ -31,7 +31,7 @@ class PenguinMethodChannel {
"isEnableReportIssue": true,
"languageCode": languageCode,
"mapBoxKey": "pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ",
"clinicID": details?.clinicId ?? "",
"clinicID": isClinicNavigation ? "${details?.projectId}-${details?.clinicId}" : details?.clinicId ?? "",
// "clinicID": "108", // 46 ,49, 133
"patientID": details?.patientId ?? "",
"projectID": int.parse(details?.projectId ?? "-1"),

@ -978,4 +978,13 @@ class Utils {
return checkDate == today;
}
static bool isClinicAllowedForRebook(int clinicID) {
bool isAllowed = true;
if (clinicID == 23 || clinicID == 47 || clinicID == 265 || clinicID == 253 || clinicID == 134) {
isAllowed = false;
}
return isAllowed;
}
}

@ -581,7 +581,8 @@ class AuthenticationViewModel extends ChangeNotifier {
if (!_appState.getIsChildLoggedIn) {
await medicalVm.getFamilyFiles(status: 0);
// await medicalVm.getAllPendingRecordsByResponseId();
_navigationService.replaceAllRoutesAndNavigateToLanding();
// _navigationService.replaceAllRoutesAndNavigateToLanding();
_navigationService.popUntilNamed(AppRoutes.landingScreen);
}
} else {
if (activation.list != null && activation.list!.isNotEmpty) {

@ -97,10 +97,11 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier {
initPenguinSDK(hospital.iD, clinicID: clinicID);
}
initPenguinSDK(int projectID, {String clinicID = ""}) async {
initPenguinSDK(int projectID, {String clinicID = "1"}) async {
NavigationClinicDetails data = NavigationClinicDetails();
data.projectId = projectID.toString();
data.clinicId = clinicID;
// data.clinicId = "1";
final bool permited = await AppPermission.askPenguinPermissions();
if (!permited) {
Map<Permission, PermissionStatus> statuses = await [
@ -110,7 +111,7 @@ class HospitalSelectionBottomSheetViewModel extends ChangeNotifier {
Permission.bluetoothScan,
Permission.activityRecognition,
].request().whenComplete(() {
PenguinMethodChannel().launch("penguin", appState.isArabic() ? "ar" : "en", appState.getAuthenticatedUser()?.patientId?.toString()??"", details: data);
PenguinMethodChannel().launch("penguin", appState.isArabic() ? "ar" : "en", appState.getAuthenticatedUser()?.patientId?.toString() ?? "", false, details: data);
});
}
}

@ -5,14 +5,14 @@ class PatientAppointmentShareResponseModel {
int? appointmentNo;
dynamic cardNumber;
dynamic cardType;
int? cashPrice;
int? cashPriceTax;
int? cashPriceWithTax;
num? cashPrice;
num? cashPriceTax;
num? cashPriceWithTax;
int? clinicID;
String? clinicName;
int? companyId;
String? companyName;
int? companyShareWithTax;
num? companyShareWithTax;
int? doctorID;
String? doctorImageURL;
String? doctorNameObj;
@ -39,7 +39,7 @@ class PatientAppointmentShareResponseModel {
int? patientStatusType;
num? patientTaxAmount;
String? patientType;
int? paymentAmount;
num? paymentAmount;
String? paymentDate;
dynamic paymentMethodName;
dynamic paymentReferenceNumber;
@ -57,7 +57,7 @@ class PatientAppointmentShareResponseModel {
int? statusCode;
dynamic statusDesc;
String? subPolicyNo;
int? tax;
num? tax;
int? userID;
PatientAppointmentShareResponseModel({

@ -220,9 +220,23 @@ class MyAppointmentsViewModel extends ChangeNotifier {
}
Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
isPatientHasQueueAppointment = false;
if (patientArrivedAppointmentsHistoryList.isNotEmpty) {
isPatientHasQueueAppointment = false;
notifyListeners();
if (Utils.isDateToday(DateUtil.convertStringToDate(patientArrivedAppointmentsHistoryList.first.appointmentDate))) {
// getPatientAppointmentQueueDetails(appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID);
getPatientAppointmentQueueDetails();
}
}
if (!isAppointmentDataToBeLoaded) return;
debugPrint('getPatientAppointments CALLED!!!');
patientAppointmentsByClinic.clear();
patientAppointmentsByHospital.clear();
patientAppointmentsViewList.clear();
patientTimelineAppointmentsList.clear();
filteredAppointmentList.clear();
patientAppointmentsHistoryList.clear();
patientUpcomingAppointmentsHistoryList.clear();
@ -276,6 +290,8 @@ class MyAppointmentsViewModel extends ChangeNotifier {
_groupAppointmentsByClinicAndHospital();
if (patientArrivedAppointmentsHistoryList.isNotEmpty) {
isPatientHasQueueAppointment = false;
notifyListeners();
if (Utils.isDateToday(DateUtil.convertStringToDate(patientArrivedAppointmentsHistoryList.first.appointmentDate))) {
// getPatientAppointmentQueueDetails(appointmentNo: patientArrivedAppointmentsHistoryList.first.appointmentNo, patientID: patientArrivedAppointmentsHistoryList.first.patientID);
getPatientAppointmentQueueDetails();

@ -167,29 +167,44 @@ class PrescriptionsRepoImp implements PrescriptionsRepo {
@override
Future<Either<Failure, GenericApiModel>> getPrescriptionPDF(
{required PatientPrescriptionsResponseModel prescriptionsResponseModel, required List<PrescriptionDetailResponseModel> prescriptionDetailsList}) async {
// Map<String, dynamic> mapDevice = {
// "AppointmentDate": prescriptionsResponseModel.appointmentDate,
// "ClinicName": prescriptionsResponseModel.clinicDescription,
// "DoctorName": prescriptionsResponseModel.doctorName,
// "ProjectID": prescriptionsResponseModel.projectID,
// "DoctorID": prescriptionsResponseModel.doctorID,
// "ClinicID": prescriptionsResponseModel.clinicID,
// "DateofBirth": Utils.appState.getAuthenticatedUser()!.dateofBirth,
// "ListPrescriptions": prescriptionDetailsList,
// "PatientIditificationNum": Utils.appState.getAuthenticatedUser()!.patientIdentificationNo,
// "PatientMobileNumber": Utils.appState.getAuthenticatedUser()!.mobileNumber,
// "PatientName": "${Utils.appState.getAuthenticatedUser()!.firstName!} ${Utils.appState.getAuthenticatedUser()!.lastName!}",
// "To": Utils.appState.getAuthenticatedUser()!.emailAddress,
// "SetupID": prescriptionsResponseModel.setupID,
// "IsDownload": true,
// "isDentalAllowedBackend": false,
// };
Map<String, dynamic> mapDevice = {
"AppointmentDate": prescriptionsResponseModel.appointmentDate,
"ClinicName": prescriptionsResponseModel.clinicDescription,
"DoctorName": prescriptionsResponseModel.doctorName,
"ProjectID": prescriptionsResponseModel.projectID,
"DoctorID": prescriptionsResponseModel.doctorID,
"ClinicID": prescriptionsResponseModel.clinicID,
"DateofBirth": Utils.appState.getAuthenticatedUser()!.dateofBirth,
"ListPrescriptions": prescriptionDetailsList,
"PatientIditificationNum": Utils.appState.getAuthenticatedUser()!.patientIdentificationNo,
"PatientMobileNumber": Utils.appState.getAuthenticatedUser()!.mobileNumber,
"PatientName": "${Utils.appState.getAuthenticatedUser()!.firstName!} ${Utils.appState.getAuthenticatedUser()!.lastName!}",
"To": Utils.appState.getAuthenticatedUser()!.emailAddress,
"AppointmentNo": prescriptionsResponseModel.appointmentNo,
"SetupID": prescriptionsResponseModel.setupID,
"EpisodeID": prescriptionsResponseModel.episodeID,
"ClinicID": prescriptionsResponseModel.clinicID,
"ProjectID": prescriptionsResponseModel.projectID,
"DischargeNo": prescriptionsResponseModel.dischargeNo,
"IsDownload": true,
"isDentalAllowedBackend": false,
// "To": Utils.appState.getAuthenticatedUser()!.emailAddress,
"To": "amjad.haroon@cloudsolutions.com.sa",
"ClinicName": prescriptionsResponseModel.clinicDescription,
"DoctorName": prescriptionsResponseModel.doctorName,
};
try {
GenericApiModel<dynamic>? apiResponse;
Failure? failure;
await apiClient.post(
SEND_PRESCRIPTION_EMAIL,
// SEND_PRESCRIPTION_EMAIL,
SEND_PRESCRIPTION_EMAIL_NEW,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;

@ -107,6 +107,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppointmentDoctorCard(
renderWidgetForERDisplay: ((widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
(widget.patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
!Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID)),
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onAskDoctorTap: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
@ -755,12 +758,15 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
],
).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h),
AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
? !widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment!
?
(widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment! ||
widget.patientAppointmentHistoryResponseModel.isExecludeDoctor! ||
Utils.isClinicAllowedForRebook(widget.patientAppointmentHistoryResponseModel.clinicID))
? CustomButton(
text: LocaleKeys.rebookAppointment.tr(context: context),
onPressed: () {
openDoctorScheduleCalendar();
},
openDoctorScheduleCalendar();
},
backgroundColor: AppColors.successColor,
borderColor: AppColors.successColor,
textColor: AppColors.whiteColor,
@ -777,7 +783,6 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
: CustomButton(
text: AppointmentType.getNextActionText(widget.patientAppointmentHistoryResponseModel.nextAction),
onPressed: () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
handleAppointmentNextAction(widget.patientAppointmentHistoryResponseModel.nextAction);
},
backgroundColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction),
@ -855,6 +860,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr(context: context)), callBackFunc: (str) {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
Navigator.of(context).pop();
},
title: "",

@ -403,6 +403,9 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,
@ -421,6 +424,9 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,
@ -485,6 +491,8 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,
@ -503,6 +511,8 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
isFollowUp: myAppointmentsViewModel.patientAppointmentShareResponseModel!.isFollowup!,
onSuccess: (apiResponse) {
Future.delayed(Duration(milliseconds: 500), () {
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
Navigator.pushAndRemoveUntil(
context,

@ -184,9 +184,9 @@ class AppointmentCard extends StatelessWidget {
AppCustomChipWidget(
labelText: isLoading
? 'Olaya'
: patientAppointmentHistoryResponseModel.projectName!.length > 15
? '${patientAppointmentHistoryResponseModel.projectName!.substring(0, 15)}...'
: patientAppointmentHistoryResponseModel.projectName!)
: (patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital").length > 15
? '${(patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital").substring(0, 15)}...'
: patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital")
.toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
@ -226,7 +226,10 @@ class AppointmentCard extends StatelessWidget {
}
Widget _buildActionArea(BuildContext context, AppState appState) {
if ((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) && AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
if ((((patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false) ||
(patientAppointmentHistoryResponseModel.isExecludeDoctor ?? false) ||
!Utils.isClinicAllowedForRebook(patientAppointmentHistoryResponseModel.clinicID ?? 0))) &&
AppointmentType.isArrived(patientAppointmentHistoryResponseModel)) {
return CustomButton(
text: isFromMedicalReport ? LocaleKeys.selectAppointment.tr(context: context) : LocaleKeys.viewDetails.tr(context: context),
onPressed: () {
@ -425,8 +428,8 @@ class AppointmentCard extends StatelessWidget {
),
)
.then((_) {
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
// myAppointmentsViewModel.initAppointmentsViewModel();
// myAppointmentsViewModel.getPatientAppointments(true, false);
});
}
}

@ -58,17 +58,17 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
projectDetailListModel = Utils.getProjectDetailObj(appState, patientAppointmentHistoryResponseModel.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
// if (dist <= projectDetailListModel.geofenceRadius!) {
sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context);
} else {
showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.error.tr(context: context),
child: Utils.getErrorWidget(
loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context),
), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
}
// } else {
// showCommonBottomSheetWithoutHeight(context,
// title: LocaleKeys.error.tr(context: context),
// child: Utils.getErrorWidget(
// loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context),
// ), callBackFunc: () {
// Navigator.of(context).pop();
// }, isFullScreen: false);
// }
});
}),
SizedBox(height: 16.h),
@ -150,6 +150,9 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
scannedCode: scannedCode,
checkInType: checkInType,
onSuccess: (apiResponse) {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async {
await myAppointmentsViewModel.getPatientAppointmentQueueDetails();

@ -95,11 +95,11 @@ class AppointmentDoctorCard extends StatelessWidget {
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
),
AppCustomChipWidget(
labelText: patientAppointmentHistoryResponseModel.projectName!,
labelText: patientAppointmentHistoryResponseModel.projectName ?? "Habib Hospital",
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
),
AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w),
icon: AppAssets.doctor_calendar_icon,
labelText: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang(
DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate),
@ -107,7 +107,7 @@ class AppointmentDoctorCard extends StatelessWidget {
)}",
),
AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w),
icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? AppAssets.walkin_appointment_icon
: AppAssets.small_livecare_icon,

@ -178,7 +178,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
bookAppointmentsViewModel.selectedDoctor.projectName!.toText16(isBold: true),
(bookAppointmentsViewModel.selectedDoctor.projectName ?? "Habib Hospital").toText16(isBold: true),
SizedBox(height: 8.h),
bookAppointmentsViewModel.appointmentNearestGateResponseModel != null
? Wrap(

@ -20,26 +20,18 @@ class NotificationDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Debug logging
print('=== Notification Details ===');
print('Message: ${notification.message}');
print('MessageType: ${notification.messageType}');
print('MessageTypeData: ${notification.messageTypeData}');
print('VideoURL: ${notification.videoURL}');
print('========================');
return CollapsingListView(
title: LocaleKeys.notificationDetails.tr(),
trailing: IconButton(
icon: Icon(
Icons.share_outlined,
size: 24.h,
color: AppColors.textColor,
),
onPressed: () {
_shareNotification();
},
),
// trailing: IconButton(
// icon: Icon(
// Icons.share_outlined,
// size: 24.h,
// color: AppColors.textColor,
// ),
// onPressed: () {
// _shareNotification();
// },
// ),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -230,21 +222,21 @@ class NotificationDetailsPage extends StatelessWidget {
),
// Additional notification info
if (notification.notificationType != null && notification.notificationType!.isNotEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.typeNotification.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
notification.notificationType!.toText16(
weight: FontWeight.w400,
color: AppColors.textColor,
),
],
),
// if (notification.notificationType != null && notification.notificationType!.isNotEmpty)
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// LocaleKeys.typeNotification.tr().toText14(
// weight: FontWeight.w600,
// color: AppColors.greyTextColor,
// ),
// SizedBox(height: 8.h),
// notification.notificationType!.toText16(
// weight: FontWeight.w400,
// color: AppColors.textColor,
// ),
// ],
// ),
],
),
);

@ -23,7 +23,7 @@ class NotificationsListPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: LocaleKeys.notifications.tr(context: context),
title: LocaleKeys.notification.tr(context: context),
child: SingleChildScrollView(
child: Consumer<NotificationsViewModel>(builder: (context, notificationsVM, child) {
return Container(

@ -139,7 +139,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
labelText: LocaleKeys.ratingValue.tr(namedArgs: {'rating': widget.prescriptionsResponseModel.decimalDoctorRate.toString()}, context: context),
),
AppCustomChipWidget(
labelText: widget.prescriptionsResponseModel.name!,
labelText: widget.prescriptionsResponseModel.name ?? "",
),
],
),

@ -165,7 +165,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
],
),
SizedBox(height: 8.h),
model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true)
(model.patientPrescriptionOrdersViewList[index].filterName ?? "").toText16(isBold: true)
],
),
),
@ -217,7 +217,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false),
),
AppCustomChipWidget(
labelText: model.isSortByClinic ? prescription.name! : prescription.clinicDescription!,
labelText: model.isSortByClinic ? prescription.name ?? "" : prescription.clinicDescription!,
),
],
),

Loading…
Cancel
Save