|
|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
|
|
|
|
|
@ -7,7 +6,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
|
|
|
|
|
@ -17,23 +15,17 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButton
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
@ -74,86 +66,25 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
padding: EdgeInsets.all(21),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
bool shouldEnable = (widget.appo.clinicID == 17 && appoButtonsList[index].caller == "openReschedule");
|
|
|
|
|
return InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
_handleButtonClicks(appoButtonsList[index]);
|
|
|
|
|
},
|
|
|
|
|
onTap: shouldEnable
|
|
|
|
|
? null
|
|
|
|
|
: () {
|
|
|
|
|
_handleButtonClicks(appoButtonsList[index]);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: appoButtonsList[index].title,
|
|
|
|
|
imagePath: appoButtonsList[index].icon,
|
|
|
|
|
subTitle: appoButtonsList[index].subtitle,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(5),
|
|
|
|
|
isEnable: !shouldEnable,
|
|
|
|
|
imgColor: Color(0xff28323A),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
itemCount: appoButtonsList.length,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(5.0),
|
|
|
|
|
child: CustomScrollView(
|
|
|
|
|
primary: false,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
slivers: <Widget>[
|
|
|
|
|
SliverPadding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
|
|
|
|
sliver: SliverGrid.count(
|
|
|
|
|
crossAxisCount: 2,
|
|
|
|
|
childAspectRatio: (itemWidth / itemHeight),
|
|
|
|
|
children: appoButtonsList
|
|
|
|
|
.map((e) => GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
_handleButtonClicks(e);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 4.0),
|
|
|
|
|
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
e.title,
|
|
|
|
|
color: Color(0xffB8382C),
|
|
|
|
|
variant: "overline",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
e.subtitle,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
variant: "overline",
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.6,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
|
|
|
|
|
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0) : EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
|
|
|
|
|
child: Image.asset(e.icon, width: 40.0, height: 40.0),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
.toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_handleButtonClicks(AppoDetailsButton) {
|
|
|
|
|
@ -164,28 +95,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
widget.enableFooterButton();
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
// case "onCancelAppointment":
|
|
|
|
|
// ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
// context: context,
|
|
|
|
|
// confirmMessage: TranslationBase.of(context).cancelAppoMsg,
|
|
|
|
|
// okText: TranslationBase.of(context).confirm,
|
|
|
|
|
// cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
// okFunction: () => {cancelAppointment()},
|
|
|
|
|
// cancelFunction: () => {});
|
|
|
|
|
// dialog.showAlertDialog(context);
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
|
|
// case "confirmAppointment":
|
|
|
|
|
// confirmAppointment();
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
|
|
case "navigateToProject":
|
|
|
|
|
openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "addReminder":
|
|
|
|
|
// showReminderDialog(widget.appo);
|
|
|
|
|
showReminderDialog(
|
|
|
|
|
context,
|
|
|
|
|
DateUtil.convertStringToDate(widget.appo.appointmentDate),
|
|
|
|
|
@ -198,31 +111,24 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "goToTodoList":
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "askDoc":
|
|
|
|
|
askYourDoc();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "radiology":
|
|
|
|
|
openAppointmentRadiology();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "labResult":
|
|
|
|
|
openAppointmentLabResults();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "prescriptions":
|
|
|
|
|
openPrescriptionReport();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "Survey":
|
|
|
|
|
rateAppointment();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "Insurance":
|
|
|
|
|
navigateToInsuranceApprovals(widget.appo.appointmentNo);
|
|
|
|
|
break;
|
|
|
|
|
@ -438,7 +344,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
|
|
|
|
|
patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
|
|
|
|
|
patientLabOrders.clinicID = widget.appo.clinicID;
|
|
|
|
|
patientLabOrders.clinicDescription = widget.appo.clinicName;
|
|
|
|
|
patientLabOrders.projectID = widget.appo.projectID.toString();
|
|
|
|
|
patientLabOrders.doctorName = widget.appo.doctorNameObj;
|
|
|
|
|
patientLabOrders.doctorImageURL = widget.appo.doctorImageURL;
|
|
|
|
|
patientLabOrders.speciality = widget.appo.doctorSpeciality;
|
|
|
|
|
patientLabOrders.projectName = widget.appo.projectName;
|
|
|
|
|
patientLabOrders.orderDate = DateUtil.convertStringToDate(widget.appo.appointmentDate);
|
|
|
|
|
patientLabOrders.doctorRate = widget.appo.doctorRate;
|
|
|
|
|
patientLabOrders.actualDoctorRate = widget.appo.actualDoctorRate;
|
|
|
|
|
patientLabOrders.noOfPatientsRate = widget.appo.noOfPatientsRate;
|
|
|
|
|
|
|
|
|
|
print(patientLabOrders.invoiceNo);
|
|
|
|
|
print(patientLabOrders.orderNo);
|
|
|
|
|
navigateToLabResults(patientLabOrders);
|
|
|
|
|
@ -516,36 +432,6 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// showReminderDialog(AppoitmentAllHistoryResultList appo) {
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// //old reminder dialog having location
|
|
|
|
|
// showGeneralDialog(
|
|
|
|
|
// barrierColor: Colors.black.withOpacity(0.5),
|
|
|
|
|
// transitionBuilder: (context, a1, a2, widget) {
|
|
|
|
|
// final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
|
|
|
|
|
// return Transform(
|
|
|
|
|
// transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
|
|
|
|
|
// child: Opacity(
|
|
|
|
|
// opacity: a1.value,
|
|
|
|
|
// child: ReminderDialog(
|
|
|
|
|
// eventId: appo.appointmentNo.toString(),
|
|
|
|
|
// title: "Doctor Appointment",
|
|
|
|
|
// description: "You have an appointment with " + appo.doctorTitle + " " + appo.doctorNameObj,
|
|
|
|
|
// startDate: appo.appointmentDate,
|
|
|
|
|
// endDate: appo.appointmentDate,
|
|
|
|
|
// location: appo.projectName,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// transitionDuration: Duration(milliseconds: 500),
|
|
|
|
|
// barrierDismissible: true,
|
|
|
|
|
// barrierLabel: '',
|
|
|
|
|
// context: context,
|
|
|
|
|
// pageBuilder: (context, animation1, animation2) {});
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
askYourDoc() {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
|