|
|
|
|
@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
|
|
|
|
|
@ -209,19 +210,28 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
|
_selectedClinic == null ||
|
|
|
|
|
_selectedDoctor == null ||
|
|
|
|
|
_remarksController.text == null) return;
|
|
|
|
|
model
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model
|
|
|
|
|
.makeReferral(
|
|
|
|
|
patient,
|
|
|
|
|
appointmentDate.toIso8601String(),
|
|
|
|
|
_selectedBranch['facilityId'],
|
|
|
|
|
_selectedClinic['ClinicID'],
|
|
|
|
|
_selectedDoctor['DoctorID'],
|
|
|
|
|
_remarksController.text)
|
|
|
|
|
.then((_) {
|
|
|
|
|
_remarksController.text);
|
|
|
|
|
if(model.state == ViewState.ErrorLocal) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
TranslationBase.of(context).referralSuccessMsg);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
|