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_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
//const BASE_URL = 'https://qline.hmg.com'; // LIVE
// const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
const BASE_URL = 'https://qline.hmg.com'; // LIVE
const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/';

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

Loading…
Cancel
Save