removed logs

data_accuracy_faiz
FaizHashmiCS22 4 months ago
parent 58afcf184a
commit 0bf0ff2ddc

@ -55,6 +55,8 @@ class API {
isQueuePatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp));
callPatients.removeWhere((element) => element.isQueue == false);
callPatients.addAll(isQueuePatients);
log("IP: $deviceIp");
log("callPatients: ${callPatients.reversed.toList().toString()}");
log("isQueuePatients: ${isQueuePatients.reversed.toList().toString()}");
onSuccess(callPatients.reversed.toList(), isQueuePatients.reversed.toList(), callConfig);

@ -11,14 +11,9 @@ const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/';
/// Timer Info
const TIMER_MIN = 10;
const currentBuildVersion = 4;
const currentBuildVersion = 5;
class AppGlobal {
static var CONTEX;
// static Color appRedColor = const Color(0xFFD02127);
// static Color appGreenColor = const Color(0xFF359846);
static Color appTextColor = const Color(0xFF2B353E);

@ -171,8 +171,7 @@ class AppProvider extends ChangeNotifier {
void getNextPrayerToShow() {
final current = DateTime.now();
logger.i("Checking Namaz time Locally at ${current.toString()} and ${current.timeZoneName} ");
log("Checking Namaz time Locally at ${current.toString()} and ${current.timeZoneName} ");
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.fajr!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.fajr!));
nextPrayerToShowWithTime = "${patientCallConfigurations.fajrText} at $namazTime";
@ -318,9 +317,9 @@ class AppProvider extends ChangeNotifier {
Future<void> callPatientsAPI() async {
logger.i("calling callPatientsAPI");
patientTickets.clear();
API.getCallRequestInfoByClinicInfo(currentDeviceIp,
await API.getCallRequestInfoByClinicInfo(currentDeviceIp,
onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) async {
patientTickets.clear();
patientCallConfigurations = callConfigs;
if (waitingCalls.length > patientCallConfigurations.screenMaxDisplayPatients) {
patientTickets = waitingCalls.sublist(0, patientCallConfigurations.screenMaxDisplayPatients);
@ -346,8 +345,9 @@ class AppProvider extends ChangeNotifier {
logger.i("A new Ping Received when isQueuePatients: ${isQueuePatients.length}");
logger.i("isCallingInProgress from onPingReceived: $isCallingInProgress");
logger.i("isApiCallNeeded: $isApiCallNeeded");
logger.i("isQueuePatients: ${isQueuePatients.length}");
if (patientTickets.isNotEmpty) {
if (isCallingInProgress) {
if (isCallingInProgress && isQueuePatients.isNotEmpty) {
isApiCallNeeded = true;
} else {
await callPatientsAPI();
@ -378,16 +378,17 @@ class AppProvider extends ChangeNotifier {
CallByVoice? voiceCaller;
PatientTicketModel currentPatient = PatientTicketModel();
// testCalling() async {
// voiceCaller = CallByVoice(
// preVoice: "رقم التذكرة",
// ticketNo: "AMG A-78",
// postVoice: "دعوة للتطعيم",
// lang: "ar",
// flutterTts: flutterTts,
// );
// await voiceCaller!.startCalling(true);
// }
testCalling() async {
voiceCaller = CallByVoice(
preVoice: "رقم التذكرة",
ticketNo: "AMG A-78",
postVoice: "دعوة للتطعيم",
lang: "ar",
flutterTts: flutterTts,
isMute: false,
);
await voiceCaller!.startCalling(true);
}
voiceCallPatientTicket(PatientTicketModel patientTicket, String calledFrom) async {
logger.i("voiceCallPatientTicket calledFrom : $calledFrom");
@ -396,10 +397,10 @@ class AppProvider extends ChangeNotifier {
isCallingInProgress = true;
logger.i("Setting isCallingInProgress : $isCallingInProgress");
logger.i("isVoiceReq: ${patientTicket.isVoiceReq}");
logger.i("voiceCaller: ${voiceCaller == null}");
logger.i("isQueue: ${patientTicket.isQueue}");
logger.i("isToneReq: ${patientTicket.isToneReq}");
log("isVoiceReq: ${patientTicket.isVoiceReq}");
log("voiceCaller: ${voiceCaller == null}");
log("isQueue: ${patientTicket.isQueue}");
log("isToneReq: ${patientTicket.isToneReq}");
//TODO: DATA ACCURACY
// if (patientTicket.isToneReq && !patientTicket.isQueue) {
if (!patientTicket.isQueue) {

@ -161,9 +161,6 @@ class MyHomePage extends StatelessWidget {
}
Widget dataContent({required AppProvider appProvider, required BuildContext context}) {
log("isCallingInProgress from HomeScreen: ${appProvider.isCallingInProgress}");
// appProvider.voiceCallPatientTicket(appProvider.patientTickets.first);
// appProvider.testCalling();
if (appProvider.patientTickets.isEmpty) {
// No Patient in Queue
return noPatientInQueue(screenOrientationEnum: appProvider.currentScreenRotation);

@ -40,8 +40,6 @@ class PriorityTickets extends StatelessWidget {
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: otherTickets.map((ticket) {
log("queueNoFaiz: ${ticket.callNoStr} != ${ticket.queueNo} ");
return Padding(
padding: EdgeInsets.only(top: SizeConfig.getHeightMultiplier() * 2),
child: TicketItem(
@ -82,7 +80,6 @@ class TicketItem extends StatelessWidget {
}) : super(key: key);
String getFormattedTicket(String ticketNo, bool isClinicAdded) {
log("ticketNo: $ticketNo");
if (isClinicAdded) {
var formattedString = ticketNo.split(" ");
if (formattedString.length > 1) {

@ -25,12 +25,6 @@ class CallByVoice {
double rate = 0.2;
Future<void> startCalling(bool isClinicNameAdded) async {
log("lang: $lang");
log("preVoice: $preVoice");
log("postVoice: $postVoice");
log("ticketNo: $ticketNo");
log("isClinicNameAdded: $isClinicNameAdded");
// log("getEngines: ${await flutterTts.getEngines}");
// log("getDefaultEngine: ${await flutterTts.getDefaultEngine}");
// log("getVoices: ${await flutterTts.getVoices}");

Loading…
Cancel
Save