we fix some issues in pharmacies_items_request_model, refer-patient-screen and refer-patient-screen-in-patient

merge-requests/939/head
RoaaGhali98 4 years ago
parent f02a6f3f30
commit d9d2e40927

@ -59,6 +59,8 @@ class PharmaciesItemsRequestModel {
data['SessionID'] = this.sessionID; data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID; data['DeviceTypeID'] = this.deviceTypeID;
//TODO Elham* fix it later
data['VersionID'] = 40;
return data; return data;
} }
} }

@ -261,8 +261,7 @@ class _PatientMakeInPatientReferralScreenState
attributeName: 'facilityName', attributeName: 'facilityName',
attributeValueId: 'facilityId', attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) async {
setState(() async {
_selectedBranch = selectedValue; _selectedBranch = selectedValue;
_selectedClinic = null; _selectedClinic = null;
_selectedDoctor = null; _selectedDoctor = null;
@ -278,7 +277,6 @@ class _PatientMakeInPatientReferralScreenState
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
model.error); model.error);
} }
});
}, },
); );
showDialog( showDialog(
@ -316,8 +314,8 @@ class _PatientMakeInPatientReferralScreenState
TranslationBase.of(context) TranslationBase.of(context)
.clinicSearch, .clinicSearch,
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) async {
setState(() async {
_selectedDoctor = null; _selectedDoctor = null;
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
@ -334,7 +332,7 @@ class _PatientMakeInPatientReferralScreenState
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
model.error); model.error);
} }
});
}, },
); );
showDialog( showDialog(

@ -174,7 +174,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: HexColor("#359846"), color: HexColor("#359846"),
onPressed: () async { onPressed: () async {
setState(() async {
await locator<AnalyticsService>().logEvent( await locator<AnalyticsService>().logEvent(
eventCategory: "Refer Patient", eventCategory: "Refer Patient",
eventAction: "Submit Refer", eventAction: "Submit Refer",
@ -203,7 +203,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
} else { } else {
doctorError = null; doctorError = null;
} }
});
if (appointmentDate == null || if (appointmentDate == null ||
_selectedBranch == null || _selectedBranch == null ||
_selectedClinic == null || _selectedClinic == null ||
@ -309,8 +309,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
attributeName: 'facilityName', attributeName: 'facilityName',
attributeValueId: 'facilityId', attributeValueId: 'facilityId',
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) async {
setState(() async {
_selectedBranch = selectedValue; _selectedBranch = selectedValue;
_selectedClinic = null; _selectedClinic = null;
_selectedDoctor = null; _selectedDoctor = null;
@ -322,7 +322,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} }
});
}, },
); );
showDialog( showDialog(
@ -358,8 +358,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
usingSearch: true, usingSearch: true,
hintSearchText: TranslationBase.of(context).clinicSearch, hintSearchText: TranslationBase.of(context).clinicSearch,
okText: TranslationBase.of(context).ok, okText: TranslationBase.of(context).ok,
okFunction: (selectedValue) { okFunction: (selectedValue) async {
setState(() async {
_selectedDoctor = null; _selectedDoctor = null;
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
@ -373,7 +373,6 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} }
});
}, },
); );
showDialog( showDialog(

Loading…
Cancel
Save