Changed to Production

master
faizatflutter 2 years ago
parent 07b337ba70
commit ffd9c8c990

@ -5,8 +5,8 @@ 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_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT // const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
//const BASE_URL = 'https://qline.hmg.com'; // LIVE const BASE_URL = 'https://qline.hmg.com'; // LIVE
const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST'; // const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';

@ -163,7 +163,8 @@ class AppProvider extends ChangeNotifier {
RssFeedModel currentRssFeedModel = RssFeedModel(); RssFeedModel currentRssFeedModel = RssFeedModel();
Future<void> getRssFeedDetailsFromServer() async { Future<void> getRssFeedDetailsFromServer() async {
RssFeedModel? rssFeedModel = await API.getRssFeedDetailsFromServer(languageId: 0, onFailure: (error) => log("Api call failed with this error: ${error.toString()}")); RssFeedModel? rssFeedModel =
await API.getRssFeedDetailsFromServer(languageId: 0, onFailure: (error) => log("Api call failed with this error: ${error.toString()}"));
if (rssFeedModel != null) { if (rssFeedModel != null) {
currentRssFeedModel = rssFeedModel; currentRssFeedModel = rssFeedModel;
@ -359,7 +360,6 @@ class AppProvider extends ChangeNotifier {
} else { } else {
isCallingInProgress = false; isCallingInProgress = false;
log("Setting isCallingInProgress : $isCallingInProgress"); log("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) { if (isApiCallNeeded) {
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async { Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI(); await callPatientsAPI();
@ -421,25 +421,27 @@ class AppProvider extends ChangeNotifier {
if (isQueuePatients.isNotEmpty) { if (isQueuePatients.isNotEmpty) {
// final length = isQueuePatients.length; // final length = isQueuePatients.length;
// for (int i = 0; i < length; i++) { // for (int i = 0; i < length; i++) {
await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(() async { await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(
PatientTicketModel temp = PatientTicketModel(); () async {
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) { PatientTicketModel temp = PatientTicketModel();
temp = patientTickets.elementAt(0); if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
patientTickets.removeAt(0); temp = patientTickets.elementAt(0);
} patientTickets.removeAt(0);
notifyListeners(); }
if (isQueuePatients.isNotEmpty) { notifyListeners();
isQueuePatients.removeAt(0); if (isQueuePatients.isNotEmpty) {
} isQueuePatients.removeAt(0);
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) { }
patientTickets.add(temp); if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
} patientTickets.add(temp);
notifyListeners(); }
if (isQueuePatients.isNotEmpty) { notifyListeners();
await voiceCallPatientTicket(patientTickets.first, "setCompletionHandler"); if (isQueuePatients.isNotEmpty) {
updatePatientTicket(patientTickets.first); await voiceCallPatientTicket(patientTickets.first, "setCompletionHandler");
} updatePatientTicket(patientTickets.first);
}); }
},
);
// } // }
} }
@ -471,7 +473,7 @@ class AppProvider extends ChangeNotifier {
updatePatientTicket(PatientTicketModel patientTicket) { updatePatientTicket(PatientTicketModel patientTicket) {
if (!patientTicket.isQueue) { if (!patientTicket.isQueue) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) { API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
log("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated"); log("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");
}, onFailure: (e) { }, onFailure: (e) {
log(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}"); log(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}");
@ -485,7 +487,8 @@ class AppProvider extends ChangeNotifier {
onDisconnect(exception) { onDisconnect(exception) {
log("SignalR: onDisconnect"); log("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect); signalRHelper.startSignalRConnection(currentDeviceIp,
onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
} }
onConnecting() { onConnecting() {

Loading…
Cancel
Save