fix live care

merge-requests/697/head
Mohammad Aljammal 3 years ago
parent 1391799101
commit 281a807ec8

@ -21,8 +21,12 @@ class BaseAppClient {
{Map<String, dynamic> body, {Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure, Function(String error, int statusCode) onFailure,
bool isAllowAny = false}) async { bool isAllowAny = false,bool isLiveCare = false}) async {
String url = BASE_URL + endPoint; String url;
if(isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint;
else
url = BASE_URL + endPoint;
bool callLog = true; bool callLog = true;
try { try {

@ -4,6 +4,7 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; 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 = const GET_LIVECARE_PENDINGLIST =
'Services/DoctorApplication.svc/REST/GetPendingPatientER'; '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 = const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL =
"Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";

@ -53,18 +53,18 @@ class LiveCarePatientServices extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: endCallReq.toJson()); }, body: endCallReq.toJson(),isLiveCare: true);
} }
Future startCall(StartCallReq startCallReq) async { Future startCall(StartCallReq startCallReq) async {
hasError = false; hasError = false;
await baseAppClient.post(START_LIVECARE_CALL, await baseAppClient.post(START_LIVE_CARE_CALL,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
_startCallRes = StartCallRes.fromJson(response); _startCallRes = StartCallRes.fromJson(response);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: startCallReq.toJson()); }, body: startCallReq.toJson(),isLiveCare: true);
} }
Future endCallWithCharge(int vcID) async{ Future endCallWithCharge(int vcID) async{
hasError = false; hasError = false;
@ -79,7 +79,7 @@ class LiveCarePatientServices extends BaseService {
}, },
body: { body: {
"VC_ID": vcID,"generalid":"Cs2020@2016\$2958", "VC_ID": vcID,"generalid":"Cs2020@2016\$2958",
}, },isLiveCare: true
); );
} }
@ -98,7 +98,7 @@ class LiveCarePatientServices extends BaseService {
"VC_ID": vcID, "VC_ID": vcID,
"IsOutKsa": false, "IsOutKsa": false,
"Notes": notes, "Notes": notes,
}, },isLiveCare: true
); );
} }
} }

@ -66,7 +66,7 @@ class LiveCareViewModel with ChangeNotifier {
newRequest.docSpec = profile["DoctorTitleForProfile"]; newRequest.docSpec = profile["DoctorTitleForProfile"];
newRequest.generalid = 'Cs2020@2016\$2958'; newRequest.generalid = 'Cs2020@2016\$2958';
isFinished = false; isFinished = false;
await baseAppClient.post(START_LIVECARE_CALL, await baseAppClient.post(START_LIVE_CARE_CALL,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
isFinished = true; isFinished = true;
inCallResponse = StartCallRes.fromJson(response); inCallResponse = StartCallRes.fromJson(response);

@ -5,8 +5,8 @@ class PatiantInformtion {
int genderInt; int genderInt;
dynamic age; dynamic age;
String appointmentDate; String appointmentDate;
int appointmentNo; dynamic appointmentNo;
String appointmentType; dynamic appointmentType;
int appointmentTypeId; int appointmentTypeId;
String arrivedOn; String arrivedOn;
int clinicGroupId; int clinicGroupId;
@ -23,7 +23,7 @@ class PatiantInformtion {
String nationality; String nationality;
int projectId; int projectId;
int clinicId; int clinicId;
int patientId; dynamic patientId;
String doctorName; String doctorName;
String doctorNameN; String doctorNameN;
String firstName; String firstName;

@ -20,7 +20,7 @@ class VideoChannel{
"kSessionId": kSessionId, "kSessionId": kSessionId,
"kToken": kToken, "kToken": kToken,
"appLang": "en", "appLang": "en",
"baseUrl": BASE_URL, "baseUrl": BASE_URL_LIVE_CARE,//TODO change it to live
"VC_ID": vcId, "VC_ID": vcId,
"TokenID": tokenID, "TokenID": tokenID,
"generalId": generalId, "generalId": generalId,

Loading…
Cancel
Save