diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 7a8baa56..824b8189 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -21,8 +21,12 @@ class BaseAppClient { {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, - bool isAllowAny = false}) async { - String url = BASE_URL + endPoint; + bool isAllowAny = false,bool isLiveCare = false}) async { + String url; + if(isLiveCare) + url = BASE_URL_LIVE_CARE + endPoint; + else + url = BASE_URL + endPoint; bool callLog = true; try { diff --git a/lib/config/config.dart b/lib/config/config.dart index 638ff134..86c42f8d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,6 +4,7 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; +const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; @@ -47,7 +48,7 @@ const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; const GET_LIVECARE_PENDINGLIST = 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; -const START_LIVECARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; +const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 64a353fd..0bb783d9 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -774,7 +774,7 @@ const Map> localizedValues = { 'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"}, 'arrived_p': {'en': "Arrived", 'ar': "وصل"}, 'details': {'en': 'Details', 'ar': 'التفاصيل'}, - "liveCare": {"en": "Live Care", "ar": "لايف كير"}, + "liveCare": {"en": "LiveCare", "ar": "لايف كير"}, "out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"}, "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, "labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"}, diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index 27dd666f..4fc25094 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -53,18 +53,18 @@ class LiveCarePatientServices extends BaseService { hasError = true; super.error = error; - }, body: endCallReq.toJson()); + }, body: endCallReq.toJson(),isLiveCare: true); } Future startCall(StartCallReq startCallReq) async { hasError = false; - await baseAppClient.post(START_LIVECARE_CALL, + await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async { _startCallRes = StartCallRes.fromJson(response); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: startCallReq.toJson()); + }, body: startCallReq.toJson(),isLiveCare: true); } Future endCallWithCharge(int vcID) async{ hasError = false; @@ -79,7 +79,7 @@ class LiveCarePatientServices extends BaseService { }, body: { "VC_ID": vcID,"generalid":"Cs2020@2016\$2958", - }, + },isLiveCare: true ); } @@ -98,7 +98,7 @@ class LiveCarePatientServices extends BaseService { "VC_ID": vcID, "IsOutKsa": false, "Notes": notes, - }, + },isLiveCare: true ); } } \ No newline at end of file diff --git a/lib/core/viewModel/livecare_view_model.dart b/lib/core/viewModel/livecare_view_model.dart index f6ef42e7..de586e1e 100644 --- a/lib/core/viewModel/livecare_view_model.dart +++ b/lib/core/viewModel/livecare_view_model.dart @@ -66,7 +66,7 @@ class LiveCareViewModel with ChangeNotifier { newRequest.docSpec = profile["DoctorTitleForProfile"]; newRequest.generalid = 'Cs2020@2016\$2958'; isFinished = false; - await baseAppClient.post(START_LIVECARE_CALL, + await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async { isFinished = true; inCallResponse = StartCallRes.fromJson(response); diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index fc77af66..1fcce8eb 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -5,8 +5,8 @@ class PatiantInformtion { int genderInt; dynamic age; String appointmentDate; - int appointmentNo; - String appointmentType; + dynamic appointmentNo; + dynamic appointmentType; int appointmentTypeId; String arrivedOn; int clinicGroupId; @@ -23,7 +23,7 @@ class PatiantInformtion { String nationality; int projectId; int clinicId; - int patientId; + dynamic patientId; String doctorName; String doctorNameN; String firstName; diff --git a/lib/util/VideoChannel.dart b/lib/util/VideoChannel.dart index bf255b54..a0962010 100644 --- a/lib/util/VideoChannel.dart +++ b/lib/util/VideoChannel.dart @@ -20,7 +20,7 @@ class VideoChannel{ "kSessionId": kSessionId, "kToken": kToken, "appLang": "en", - "baseUrl": BASE_URL, + "baseUrl": BASE_URL_LIVE_CARE,//TODO change it to live "VC_ID": vcId, "TokenID": tokenID, "generalId": generalId,