|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:logger/logger.dart';
|
|
|
|
|
import 'package:hmg_qline/models/ticket_model.dart';
|
|
|
|
|
import 'package:hmg_qline/utilities/enums.dart';
|
|
|
|
|
|
|
|
|
|
bool useTestIP = false;
|
|
|
|
|
|
|
|
|
|
@ -106,7 +107,7 @@ class AppConstants {
|
|
|
|
|
static String testIP = '12.4.5.1'; // projectID.QlineType.ScreenType.AnyNumber (1 to 10)
|
|
|
|
|
static int thresholdForListUI = 3;
|
|
|
|
|
|
|
|
|
|
static double currentBuildVersion = 8.6;
|
|
|
|
|
static double currentBuildVersion = 8.7;
|
|
|
|
|
static double clearLogsHoursThreshold = 48;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -171,327 +172,55 @@ class CacheConstants {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
class MockJsonRepo {
|
|
|
|
|
static Map<String, Object> globalConfigurationMockResponse = {
|
|
|
|
|
"id": 1,
|
|
|
|
|
"configType": 2,
|
|
|
|
|
"description": "Main Kiosk Config",
|
|
|
|
|
"counterStart": 1,
|
|
|
|
|
"counterEnd": 10,
|
|
|
|
|
"concurrentCallDelaySec": 5,
|
|
|
|
|
"voiceType": 1,
|
|
|
|
|
"voiceTypeText": "Standard Voice",
|
|
|
|
|
"screenLanguage": 1,
|
|
|
|
|
"screenLanguageText": "English",
|
|
|
|
|
"textDirection": 1,
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"screenMaxDisplayPatients": 8,
|
|
|
|
|
"isNotiReq": true,
|
|
|
|
|
"prioritySMS": 1,
|
|
|
|
|
"priorityWhatsApp": 2,
|
|
|
|
|
"priorityEmail": 3,
|
|
|
|
|
"ticketNoText": "Ticket Number",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"counterText": "Counter",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"roomNo": 101,
|
|
|
|
|
"isRoomNoRequired": true,
|
|
|
|
|
"queueNoText": "Queue Number",
|
|
|
|
|
"callForText": "Call For",
|
|
|
|
|
"currentServeText": "Current Serve",
|
|
|
|
|
"maxText": "Max Temp",
|
|
|
|
|
"minText": "Min Temp",
|
|
|
|
|
"nextPrayerText": "Next Prayer",
|
|
|
|
|
"weatherText": "Weather",
|
|
|
|
|
"fajarText": "Fajar",
|
|
|
|
|
"dhuhrText": "Dhuhr",
|
|
|
|
|
"asarText": "Asar",
|
|
|
|
|
"maghribText": "Maghrib",
|
|
|
|
|
"ishaText": "Isha",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 101,
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"editedBy": 102,
|
|
|
|
|
"editedOn": "2025-07-15T10:00:00Z",
|
|
|
|
|
"isToneReq": false,
|
|
|
|
|
"isVoiceReq": false,
|
|
|
|
|
"orientationType": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"waitingAreaType": 1,
|
|
|
|
|
"gender": 1,
|
|
|
|
|
"isWeatherReq": true,
|
|
|
|
|
"isPrayerTimeReq": true,
|
|
|
|
|
"isRssFeedReq": true,
|
|
|
|
|
"qType": 1,
|
|
|
|
|
"screenType": 1,
|
|
|
|
|
"projectID": 123,
|
|
|
|
|
"projectLatitude": 24.722136,
|
|
|
|
|
"projectLongitude": 46.774303,
|
|
|
|
|
"cityKey": 999,
|
|
|
|
|
"kioskQueue": [
|
|
|
|
|
{"id": 1, "name": "General Queue", "code": "GQ", "isActive": true},
|
|
|
|
|
{"id": 2, "name": "VIP Queue", "code": "VIP", "isActive": true}
|
|
|
|
|
],
|
|
|
|
|
"kioskConfig": [
|
|
|
|
|
{"id": 1, "languageCode": "en", "languageName": "English", "isDefault": true},
|
|
|
|
|
{"id": 2, "languageCode": "ar", "languageName": "Arabic", "isDefault": false}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static List<Map<String, Object>> mockPatientTicketResponse = [
|
|
|
|
|
{
|
|
|
|
|
"qType": 1,
|
|
|
|
|
"screenType": 2,
|
|
|
|
|
"connectionID": "abc-123-connection",
|
|
|
|
|
"data": [
|
|
|
|
|
{
|
|
|
|
|
"id": 101,
|
|
|
|
|
"patientID": 202,
|
|
|
|
|
"laB_QGroupID": 303,
|
|
|
|
|
"queueNo": "A13",
|
|
|
|
|
"counterBatchNo": 1,
|
|
|
|
|
"calledBy": 404,
|
|
|
|
|
"calledOn": "2025-07-15T08:30:00Z",
|
|
|
|
|
"servedOn": "2025-07-15T08:45:00Z",
|
|
|
|
|
"patientName": "John Doe",
|
|
|
|
|
"mobileNo": "+966500000000",
|
|
|
|
|
"patientEmail": "john@example.com",
|
|
|
|
|
"preferredLang": 1,
|
|
|
|
|
"ticketNoText": "Ticket No",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"patientGender": 1,
|
|
|
|
|
"roomNo": "R2",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 999,
|
|
|
|
|
"editedBy": 1000,
|
|
|
|
|
"editedOn": "2025-07-15T08:10:00Z",
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"doctorNameN": "Dr. Smith",
|
|
|
|
|
"callType": 2,
|
|
|
|
|
"queueNoM": "B45",
|
|
|
|
|
"callNoStr": "Call #1001",
|
|
|
|
|
"isQueue": true,
|
|
|
|
|
"isToneReq": true,
|
|
|
|
|
"isVoiceReq": true,
|
|
|
|
|
"orientationType ": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"concurrentCallDelaySec": 3,
|
|
|
|
|
"crTypeAckIP": "192.168.1.100",
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"vitalSignText": "Vital Sign",
|
|
|
|
|
"doctorText": "Doctor",
|
|
|
|
|
"procedureText": "Procedure",
|
|
|
|
|
"vaccinationText": "Vaccination",
|
|
|
|
|
"nebulizationText": "Nebulization",
|
|
|
|
|
"callForVitalSignText": "Calling for Vital Sign",
|
|
|
|
|
"callForDoctorText": "Calling for Doctor",
|
|
|
|
|
"callForProcedureText": "Calling for Procedure",
|
|
|
|
|
"callForVaccinationText": "Calling for Vaccination",
|
|
|
|
|
"callForNebulizationText": "Calling for Nebulization",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"queueNoText": "Queue No",
|
|
|
|
|
"callForText": "Call For"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": 101,
|
|
|
|
|
"patientID": 202,
|
|
|
|
|
"laB_QGroupID": 303,
|
|
|
|
|
"queueNo": "B21",
|
|
|
|
|
"counterBatchNo": 1,
|
|
|
|
|
"calledBy": 404,
|
|
|
|
|
"calledOn": "2025-07-15T08:30:00Z",
|
|
|
|
|
"servedOn": "2025-07-15T08:45:00Z",
|
|
|
|
|
"patientName": "John Doe",
|
|
|
|
|
"mobileNo": "+966500000000",
|
|
|
|
|
"patientEmail": "john@example.com",
|
|
|
|
|
"preferredLang": 1,
|
|
|
|
|
"ticketNoText": "Ticket No",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"patientGender": 1,
|
|
|
|
|
"roomNo": "R3",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 999,
|
|
|
|
|
"editedBy": 1000,
|
|
|
|
|
"editedOn": "2025-07-15T08:10:00Z",
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"doctorNameN": "Dr. Smith",
|
|
|
|
|
"callType": 3,
|
|
|
|
|
"queueNoM": "B45",
|
|
|
|
|
"callNoStr": "Call #1001",
|
|
|
|
|
"isQueue": true,
|
|
|
|
|
"isToneReq": true,
|
|
|
|
|
"isVoiceReq": true,
|
|
|
|
|
"orientationType": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"concurrentCallDelaySec": 3,
|
|
|
|
|
"crTypeAckIP": "192.168.1.100",
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"vitalSignText": "Vital Sign",
|
|
|
|
|
"doctorText": "Doctor",
|
|
|
|
|
"procedureText": "Procedure",
|
|
|
|
|
"vaccinationText": "Vaccination",
|
|
|
|
|
"nebulizationText": "Nebulization",
|
|
|
|
|
"callForVitalSignText": "Calling for Vital Sign",
|
|
|
|
|
"callForDoctorText": "Calling for Doctor",
|
|
|
|
|
"callForProcedureText": "Calling for Procedure",
|
|
|
|
|
"callForVaccinationText": "Calling for Vaccination",
|
|
|
|
|
"callForNebulizationText": "Calling for Nebulization",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"queueNoText": "Queue No",
|
|
|
|
|
"callForText": "Call For"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": 101,
|
|
|
|
|
"patientID": 202,
|
|
|
|
|
"laB_QGroupID": 303,
|
|
|
|
|
"queueNo": "C07",
|
|
|
|
|
"counterBatchNo": 1,
|
|
|
|
|
"calledBy": 404,
|
|
|
|
|
"calledOn": "2025-07-15T08:30:00Z",
|
|
|
|
|
"servedOn": "2025-07-15T08:45:00Z",
|
|
|
|
|
"patientName": "John Doe",
|
|
|
|
|
"mobileNo": "+966500000000",
|
|
|
|
|
"patientEmail": "john@example.com",
|
|
|
|
|
"preferredLang": 1,
|
|
|
|
|
"ticketNoText": "Ticket No",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"patientGender": 1,
|
|
|
|
|
"roomNo": "R4",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 999,
|
|
|
|
|
"editedBy": 1000,
|
|
|
|
|
"editedOn": "2025-07-15T08:10:00Z",
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"doctorNameN": "Dr. Smith",
|
|
|
|
|
"callType": 4,
|
|
|
|
|
"queueNoM": "B45",
|
|
|
|
|
"callNoStr": "Call #1001",
|
|
|
|
|
"isQueue": true,
|
|
|
|
|
"isToneReq": true,
|
|
|
|
|
"isVoiceReq": true,
|
|
|
|
|
"orientationType": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"concurrentCallDelaySec": 3,
|
|
|
|
|
"crTypeAckIP": "192.168.1.100",
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"vitalSignText": "Vital Sign",
|
|
|
|
|
"doctorText": "Doctor",
|
|
|
|
|
"procedureText": "Procedure",
|
|
|
|
|
"vaccinationText": "Vaccination",
|
|
|
|
|
"nebulizationText": "Nebulization",
|
|
|
|
|
"callForVitalSignText": "Calling for Vital Sign",
|
|
|
|
|
"callForDoctorText": "Calling for Doctor",
|
|
|
|
|
"callForProcedureText": "Calling for Procedure",
|
|
|
|
|
"callForVaccinationText": "Calling for Vaccination",
|
|
|
|
|
"callForNebulizationText": "Calling for Nebulization",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"queueNoText": "Queue No",
|
|
|
|
|
"callForText": "Call For"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": 101,
|
|
|
|
|
"patientID": 202,
|
|
|
|
|
"laB_QGroupID": 303,
|
|
|
|
|
"queueNo": "D11",
|
|
|
|
|
"counterBatchNo": 1,
|
|
|
|
|
"calledBy": 404,
|
|
|
|
|
"calledOn": "2025-07-15T08:30:00Z",
|
|
|
|
|
"servedOn": "2025-07-15T08:45:00Z",
|
|
|
|
|
"patientName": "John Doe",
|
|
|
|
|
"mobileNo": "+966500000000",
|
|
|
|
|
"patientEmail": "john@example.com",
|
|
|
|
|
"preferredLang": 1,
|
|
|
|
|
"ticketNoText": "Ticket No",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"patientGender": 1,
|
|
|
|
|
"roomNo": "R5",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 999,
|
|
|
|
|
"editedBy": 1000,
|
|
|
|
|
"editedOn": "2025-07-15T08:10:00Z",
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"doctorNameN": "Dr. Smith",
|
|
|
|
|
"callType": 5,
|
|
|
|
|
"queueNoM": "B45",
|
|
|
|
|
"callNoStr": "Call #1001",
|
|
|
|
|
"isQueue": true,
|
|
|
|
|
"isToneReq": true,
|
|
|
|
|
"isVoiceReq": true,
|
|
|
|
|
"orientationType": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"concurrentCallDelaySec": 3,
|
|
|
|
|
"crTypeAckIP": "192.168.1.100",
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"vitalSignText": "Vital Sign",
|
|
|
|
|
"doctorText": "Doctor",
|
|
|
|
|
"procedureText": "Procedure",
|
|
|
|
|
"vaccinationText": "Vaccination",
|
|
|
|
|
"nebulizationText": "Nebulization",
|
|
|
|
|
"callForVitalSignText": "Calling for Vital Sign",
|
|
|
|
|
"callForDoctorText": "Calling for Doctor",
|
|
|
|
|
"callForProcedureText": "Calling for Procedure",
|
|
|
|
|
"callForVaccinationText": "Calling for Vaccination",
|
|
|
|
|
"callForNebulizationText": "Calling for Nebulization",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"queueNoText": "Queue No",
|
|
|
|
|
"callForText": "Call For"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"id": 101,
|
|
|
|
|
"patientID": 202,
|
|
|
|
|
"laB_QGroupID": 303,
|
|
|
|
|
"queueNo": "E20",
|
|
|
|
|
"counterBatchNo": 1,
|
|
|
|
|
"calledBy": 404,
|
|
|
|
|
"calledOn": "2025-07-15T08:30:00Z",
|
|
|
|
|
"servedOn": "2025-07-15T08:45:00Z",
|
|
|
|
|
"patientName": "John Doe",
|
|
|
|
|
"mobileNo": "+966500000000",
|
|
|
|
|
"patientEmail": "john@example.com",
|
|
|
|
|
"preferredLang": 1,
|
|
|
|
|
"ticketNoText": "Ticket No",
|
|
|
|
|
"pleaseVisitCounterText": "Please Visit Counter",
|
|
|
|
|
"patientGender": 1,
|
|
|
|
|
"roomNo": "R6",
|
|
|
|
|
"isActive": true,
|
|
|
|
|
"createdBy": 999,
|
|
|
|
|
"editedBy": 1000,
|
|
|
|
|
"editedOn": "2025-07-15T08:10:00Z",
|
|
|
|
|
"createdOn": "2025-07-15T08:00:00Z",
|
|
|
|
|
"doctorNameN": "Dr. Smith",
|
|
|
|
|
"callType": 6,
|
|
|
|
|
"queueNoM": "B45",
|
|
|
|
|
"callNoStr": "Call #1001",
|
|
|
|
|
"isQueue": true,
|
|
|
|
|
"isToneReq": true,
|
|
|
|
|
"isVoiceReq": true,
|
|
|
|
|
"orientationType": 1,
|
|
|
|
|
"isTurnOn": true,
|
|
|
|
|
"concurrentCallDelaySec": 3,
|
|
|
|
|
"crTypeAckIP": "192.168.1.100",
|
|
|
|
|
"voiceLanguage": 1,
|
|
|
|
|
"voiceLanguageText": "English",
|
|
|
|
|
"vitalSignText": "Vital Sign",
|
|
|
|
|
"doctorText": "Doctor",
|
|
|
|
|
"procedureText": "Procedure",
|
|
|
|
|
"vaccinationText": "Vaccination",
|
|
|
|
|
"nebulizationText": "Nebulization",
|
|
|
|
|
"callForVitalSignText": "Calling for Vital Sign",
|
|
|
|
|
"callForDoctorText": "Calling for Doctor",
|
|
|
|
|
"callForProcedureText": "Calling for Procedure",
|
|
|
|
|
"callForVaccinationText": "Calling for Vaccination",
|
|
|
|
|
"callForNebulizationText": "Calling for Nebulization",
|
|
|
|
|
"roomText": "Room",
|
|
|
|
|
"queueNoText": "Queue No",
|
|
|
|
|
"callForText": "Call For"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
static TicketData ticket = TicketData(
|
|
|
|
|
id: 189805,
|
|
|
|
|
patientID: 4292695,
|
|
|
|
|
laBQGroupID: null,
|
|
|
|
|
queueNo: 'W-T-4',
|
|
|
|
|
counterBatchNo: null,
|
|
|
|
|
calledBy: null,
|
|
|
|
|
calledOn: null,
|
|
|
|
|
servedOn: null,
|
|
|
|
|
patientName: null,
|
|
|
|
|
mobileNo: '0598544522',
|
|
|
|
|
patientEmail: 'munira.ali@hotmail.com',
|
|
|
|
|
preferredLang: 2,
|
|
|
|
|
voiceLanguageEnum: LanguageEnum.arabic,
|
|
|
|
|
ticketNoText: 'رقم التذكرة',
|
|
|
|
|
postVoiceText: 'التوجه الى غرفة قياس العلامات الحيوية',
|
|
|
|
|
patientGender: 2,
|
|
|
|
|
roomNo: 'D 12',
|
|
|
|
|
isActive: null,
|
|
|
|
|
createdBy: null,
|
|
|
|
|
editedBy: null,
|
|
|
|
|
editedOn: DateTime.parse('2025-08-18 15:09:03.633'),
|
|
|
|
|
createdOn: DateTime.parse('2025-08-18 15:06:07.363'),
|
|
|
|
|
doctorNameN: null,
|
|
|
|
|
callTypeEnum: CallTypeEnum.doctor,
|
|
|
|
|
queueNoM: 'W-T-4',
|
|
|
|
|
callNoStr: 'W_T-4',
|
|
|
|
|
isQueue: false,
|
|
|
|
|
isToneReq: false,
|
|
|
|
|
isVoiceReq: false,
|
|
|
|
|
orientationType: 0,
|
|
|
|
|
isTurnOn: false,
|
|
|
|
|
concurrentCallDelaySec: 0,
|
|
|
|
|
crTypeAckIP: null,
|
|
|
|
|
voiceLanguageText: 'English',
|
|
|
|
|
vitalSignText: 'علامة حيوية',
|
|
|
|
|
doctorText: 'الطبيب',
|
|
|
|
|
procedureText: 'الاجراءات',
|
|
|
|
|
vaccinationText: 'المطاعيم',
|
|
|
|
|
nebulizationText: 'التنفس',
|
|
|
|
|
callForVitalSignText: 'التوجه الى غرفة قياس العلامات الحيوية',
|
|
|
|
|
callForDoctorText: 'التوجه الى الطبيب',
|
|
|
|
|
callForProcedureText: 'التوجه الى غرفة الإجراءات',
|
|
|
|
|
callForVaccinationText: 'التوجه الى غرفة المطاعيم',
|
|
|
|
|
callForNebulizationText: 'التوجه الى غرفة التنفس',
|
|
|
|
|
roomText: 'غرفة',
|
|
|
|
|
queueNoText: 'رقم الانتظار',
|
|
|
|
|
callForText: 'التوجه الى',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RAW DATA:
|
|
|
|
|
|