|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
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';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
@ -16,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.d
|
|
|
|
|
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';
|
|
|
|
@ -62,8 +64,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
var size = MediaQuery.of(context).size;
|
|
|
|
|
final double itemHeight = projectViewModel.isArabic
|
|
|
|
|
? ((size.height - kToolbarHeight - 24) * 0.47) / 2
|
|
|
|
|
: ((size.height - kToolbarHeight - 24) * 0.4) / 2;
|
|
|
|
|
? ((size.height - kToolbarHeight - 24) * 0.5) / 2
|
|
|
|
|
: ((size.height - kToolbarHeight - 24) * 0.45) / 2;
|
|
|
|
|
final double itemWidth = size.width / 2;
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
@ -83,7 +85,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
_handleButtonClicks(e);
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
// height: 100.0,
|
|
|
|
@ -100,7 +102,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
@ -196,6 +198,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
openAppointmentRadiology();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "labResult":
|
|
|
|
|
openAppointmentLabResults();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "prescriptions":
|
|
|
|
|
openPrescriptionReport();
|
|
|
|
|
break;
|
|
|
|
@ -403,6 +409,36 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openAppointmentLabResults() {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
PatientLabOrders patientLabOrders = new PatientLabOrders();
|
|
|
|
|
service
|
|
|
|
|
.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
|
|
|
|
|
widget.appo.projectID, widget.appo.clinicID, context)
|
|
|
|
|
.then((res) {
|
|
|
|
|
print(res['ListLabResultsByAppNo']);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res['ListLabResultsByAppNo'] != null) {
|
|
|
|
|
patientLabOrders.orderNo =
|
|
|
|
|
res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
|
|
|
|
|
patientLabOrders.invoiceNo =
|
|
|
|
|
res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
|
|
|
|
|
patientLabOrders.clinicID = widget.appo.clinicID;
|
|
|
|
|
patientLabOrders.projectID = widget.appo.projectID.toString();
|
|
|
|
|
print(patientLabOrders.invoiceNo);
|
|
|
|
|
print(patientLabOrders.orderNo);
|
|
|
|
|
navigateToLabResults(patientLabOrders);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openAppointmentRadiology() {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
@ -438,10 +474,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
|
|
|
|
|
});
|
|
|
|
|
print(prescriptionReportEnhList.length);
|
|
|
|
|
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
});
|
|
|
|
@ -459,6 +497,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
|
|
|
|
|
appo: widget.appo)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
LaboratoryResultPage(patientLabOrders: patientLabOrders)))
|
|
|
|
|
.then((value) {});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|