|
|
|
|
@ -134,11 +134,12 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: HexColor("#359846"),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
setState(() async {
|
|
|
|
|
await locator<AnalyticsService>().logEvent(
|
|
|
|
|
eventCategory: "Refer Patient",
|
|
|
|
|
eventAction: "Submit Refer",
|
|
|
|
|
);
|
|
|
|
|
await locator<AnalyticsService>().logEvent(
|
|
|
|
|
eventCategory: "Refer Patient",
|
|
|
|
|
eventAction: "Submit Refer",
|
|
|
|
|
);
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
if (_referTo == null) {
|
|
|
|
|
branchError = TranslationBase.of(context).fieldRequired!;
|
|
|
|
|
} else {
|
|
|
|
|
@ -298,18 +299,16 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
|
|
|
|
|
usingSearch: true,
|
|
|
|
|
hintSearchText: TranslationBase.of(context).clinicSearch,
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
|
setState(() async {
|
|
|
|
|
_selectedDoctor = null;
|
|
|
|
|
_selectedClinic = selectedValue;
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model
|
|
|
|
|
.getClinicDoctors(patient, _selectedClinic['ClinicID'], _selectedBranch['facilityId'])
|
|
|
|
|
.then((_) => GifLoaderDialogUtils.hideDialog(context));
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
okFunction: (selectedValue) async {
|
|
|
|
|
_selectedDoctor = null;
|
|
|
|
|
_selectedClinic = selectedValue;
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model
|
|
|
|
|
.getClinicDoctors(patient, _selectedClinic['ClinicID'], _selectedBranch['facilityId'])
|
|
|
|
|
.then((_) => GifLoaderDialogUtils.hideDialog(context));
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
|