diff --git a/lib/config/config.dart b/lib/config/config.dart index 72585642..efeed011 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -9,9 +9,9 @@ const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'http://10.20.200.111:1010/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; diff --git a/lib/core/service/authentication_service.dart b/lib/core/service/authentication_service.dart index 2c0ab0d9..dcde0fff 100644 --- a/lib/core/service/authentication_service.dart +++ b/lib/core/service/authentication_service.dart @@ -40,13 +40,13 @@ class AuthenticationService extends BaseService { try { await baseAppClient.post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { _imeiDetails = []; - response['List_DoctorDeviceDetails'].forEach((v) { + response['List_DoctorDeviceDetails']?.forEach((v) { _imeiDetails.add(GetIMEIDetailsModel.fromJson(v)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: {"IMEI": imei, "TokenID": "@dm!n"}); + }, body: {"IMEI": imei, }); } catch (error) { hasError = true; super.error = error.toString(); diff --git a/lib/core/service/patient/ReferralService.dart b/lib/core/service/patient/ReferralService.dart index 25469dc2..dd066d03 100644 --- a/lib/core/service/patient/ReferralService.dart +++ b/lib/core/service/patient/ReferralService.dart @@ -1,4 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/core/model/referral/ReferralRequest.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; @@ -14,8 +16,10 @@ class ReferralService extends BaseService { int? frequency, String? referringDoctorRemarks, String? extension}) async { - await getDoctorProfile(); + // await getDoctorProfile(); ReferralRequest referralRequest = ReferralRequest(); + Map? profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile!); referralRequest.admissionNo = admissionNo; referralRequest.roomID = roomID; referralRequest.referralClinic = referralClinic.toString(); diff --git a/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart b/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart index 05c8542f..79a5bb3a 100644 --- a/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart +++ b/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart @@ -74,7 +74,7 @@ class PharmacyInterventionService extends BaseService { var success = false; await baseAppClient.post(IS_INFECTIOUS_DISEASE_CONSULTANT, onSuccess: (dynamic response, int statusCode) { - success = response['IsInfectiousDiseases']; + success = response['IsInfectiousDiseases']; }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error);