|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'dart:math';
|
|
|
|
|
|
|
|
|
|
import 'package:queuing_system/core/response_models/call_config_model.dart';
|
|
|
|
|
import 'package:queuing_system/utils/call_type.dart';
|
|
|
|
|
|
|
|
|
|
class PatientTicketModel {
|
|
|
|
|
@ -36,6 +37,9 @@ class PatientTicketModel {
|
|
|
|
|
late String roomText;
|
|
|
|
|
late String queueNoText;
|
|
|
|
|
late String callForText;
|
|
|
|
|
late int orientationType;
|
|
|
|
|
late ScreenOrientationEnum screenRotationEnum;
|
|
|
|
|
|
|
|
|
|
late bool callUpdated = false;
|
|
|
|
|
|
|
|
|
|
PatientTicketModel({
|
|
|
|
|
@ -72,6 +76,8 @@ class PatientTicketModel {
|
|
|
|
|
this.roomText = "Room",
|
|
|
|
|
this.queueNoText = "Queue No",
|
|
|
|
|
this.callForText = "Call For",
|
|
|
|
|
this.orientationType = 1,
|
|
|
|
|
this.screenRotationEnum = ScreenOrientationEnum.portraitUp,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
int getRandomNum() {
|
|
|
|
|
@ -111,6 +117,8 @@ class PatientTicketModel {
|
|
|
|
|
roomText = json['roomText'];
|
|
|
|
|
queueNoText = json['queueNoText'];
|
|
|
|
|
callForText = json['callForText'];
|
|
|
|
|
orientationType = json['orientationType'];
|
|
|
|
|
screenRotationEnum = (json['orientationType'] as int).toScreenOrientationEnum();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// "voiceLanguage": 1,
|
|
|
|
|
@ -130,27 +138,6 @@ class PatientTicketModel {
|
|
|
|
|
// "queueNoText": "Queue No",
|
|
|
|
|
// "callForText": "Call For"
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['patientID'] = patientID;
|
|
|
|
|
data['mobileNo'] = mobileNo;
|
|
|
|
|
data['doctorName'] = doctorName;
|
|
|
|
|
data['doctorNameN'] = doctorNameN;
|
|
|
|
|
data['patientGender'] = patientGender;
|
|
|
|
|
data['callType'] = callType;
|
|
|
|
|
data['roomNo'] = roomNo;
|
|
|
|
|
data['createdOn'] = createdOn;
|
|
|
|
|
data['editedOn'] = editedOn;
|
|
|
|
|
data['queueNo'] = queueNo;
|
|
|
|
|
data['callNoStr'] = callNoStr;
|
|
|
|
|
data['isQueue'] = isQueue;
|
|
|
|
|
data['isToneReq'] = isToneReq;
|
|
|
|
|
data['isVoiceReq'] = isVoiceReq;
|
|
|
|
|
data['concurrentCallDelaySec'] = concurrentCallDelaySec;
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return (queueNo).toString();
|
|
|
|
|
@ -164,98 +151,98 @@ class PatientTicketModel {
|
|
|
|
|
if (callType == 5) return CallType.nebulization;
|
|
|
|
|
return CallType.vitalSign;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static List<PatientTicketModel> testCallPatients = [
|
|
|
|
|
PatientTicketModel(
|
|
|
|
|
id: 1,
|
|
|
|
|
patientID: 112,
|
|
|
|
|
mobileNo: "112",
|
|
|
|
|
doctorName: "name",
|
|
|
|
|
doctorNameN: "nameN",
|
|
|
|
|
patientGender: 1,
|
|
|
|
|
callType: 1,
|
|
|
|
|
roomNo: "617",
|
|
|
|
|
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOnTimeStamp: DateTime.now().millisecondsSinceEpoch,
|
|
|
|
|
queueNo: "B-89",
|
|
|
|
|
callNoStr: "B-89",
|
|
|
|
|
isQueue: true,
|
|
|
|
|
isToneReq: true,
|
|
|
|
|
isVoiceReq: true,
|
|
|
|
|
concurrentCallDelaySec: 8,
|
|
|
|
|
),
|
|
|
|
|
PatientTicketModel(
|
|
|
|
|
id: 1,
|
|
|
|
|
patientID: 112,
|
|
|
|
|
mobileNo: "112",
|
|
|
|
|
doctorName: "name",
|
|
|
|
|
doctorNameN: "nameN",
|
|
|
|
|
patientGender: 1,
|
|
|
|
|
callType: 1,
|
|
|
|
|
roomNo: "617",
|
|
|
|
|
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
queueNo: "B-89",
|
|
|
|
|
callNoStr: "B-89",
|
|
|
|
|
isQueue: true,
|
|
|
|
|
isToneReq: true,
|
|
|
|
|
isVoiceReq: true,
|
|
|
|
|
concurrentCallDelaySec: 8,
|
|
|
|
|
),
|
|
|
|
|
PatientTicketModel(
|
|
|
|
|
id: 1,
|
|
|
|
|
patientID: 112,
|
|
|
|
|
mobileNo: "112",
|
|
|
|
|
doctorName: "name",
|
|
|
|
|
doctorNameN: "nameN",
|
|
|
|
|
patientGender: 1,
|
|
|
|
|
callType: 1,
|
|
|
|
|
roomNo: "617",
|
|
|
|
|
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
queueNo: "B-89",
|
|
|
|
|
callNoStr: "B-89",
|
|
|
|
|
isQueue: true,
|
|
|
|
|
isToneReq: true,
|
|
|
|
|
isVoiceReq: true,
|
|
|
|
|
concurrentCallDelaySec: 8,
|
|
|
|
|
),
|
|
|
|
|
PatientTicketModel(
|
|
|
|
|
id: 1,
|
|
|
|
|
patientID: 112,
|
|
|
|
|
mobileNo: "112",
|
|
|
|
|
doctorName: "name",
|
|
|
|
|
doctorNameN: "nameN",
|
|
|
|
|
patientGender: 1,
|
|
|
|
|
callType: 1,
|
|
|
|
|
roomNo: "617",
|
|
|
|
|
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
queueNo: "B-89",
|
|
|
|
|
callNoStr: "B-89",
|
|
|
|
|
isQueue: true,
|
|
|
|
|
isToneReq: true,
|
|
|
|
|
isVoiceReq: true,
|
|
|
|
|
concurrentCallDelaySec: 8,
|
|
|
|
|
),
|
|
|
|
|
PatientTicketModel(
|
|
|
|
|
id: 1,
|
|
|
|
|
patientID: 112,
|
|
|
|
|
mobileNo: "112",
|
|
|
|
|
doctorName: "name",
|
|
|
|
|
doctorNameN: "nameN",
|
|
|
|
|
patientGender: 1,
|
|
|
|
|
callType: 1,
|
|
|
|
|
roomNo: "617",
|
|
|
|
|
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
queueNo: "B-89",
|
|
|
|
|
callNoStr: "B-89",
|
|
|
|
|
isQueue: true,
|
|
|
|
|
isToneReq: true,
|
|
|
|
|
isVoiceReq: true,
|
|
|
|
|
concurrentCallDelaySec: 8,
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
//
|
|
|
|
|
// static List<PatientTicketModel> testCallPatients = [
|
|
|
|
|
// PatientTicketModel(
|
|
|
|
|
// id: 1,
|
|
|
|
|
// patientID: 112,
|
|
|
|
|
// mobileNo: "112",
|
|
|
|
|
// doctorName: "name",
|
|
|
|
|
// doctorNameN: "nameN",
|
|
|
|
|
// patientGender: 1,
|
|
|
|
|
// callType: 1,
|
|
|
|
|
// roomNo: "617",
|
|
|
|
|
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOnTimeStamp: DateTime.now().millisecondsSinceEpoch,
|
|
|
|
|
// queueNo: "B-89",
|
|
|
|
|
// callNoStr: "B-89",
|
|
|
|
|
// isQueue: true,
|
|
|
|
|
// isToneReq: true,
|
|
|
|
|
// isVoiceReq: true,
|
|
|
|
|
// concurrentCallDelaySec: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// PatientTicketModel(
|
|
|
|
|
// id: 1,
|
|
|
|
|
// patientID: 112,
|
|
|
|
|
// mobileNo: "112",
|
|
|
|
|
// doctorName: "name",
|
|
|
|
|
// doctorNameN: "nameN",
|
|
|
|
|
// patientGender: 1,
|
|
|
|
|
// callType: 1,
|
|
|
|
|
// roomNo: "617",
|
|
|
|
|
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// queueNo: "B-89",
|
|
|
|
|
// callNoStr: "B-89",
|
|
|
|
|
// isQueue: true,
|
|
|
|
|
// isToneReq: true,
|
|
|
|
|
// isVoiceReq: true,
|
|
|
|
|
// concurrentCallDelaySec: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// PatientTicketModel(
|
|
|
|
|
// id: 1,
|
|
|
|
|
// patientID: 112,
|
|
|
|
|
// mobileNo: "112",
|
|
|
|
|
// doctorName: "name",
|
|
|
|
|
// doctorNameN: "nameN",
|
|
|
|
|
// patientGender: 1,
|
|
|
|
|
// callType: 1,
|
|
|
|
|
// roomNo: "617",
|
|
|
|
|
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// queueNo: "B-89",
|
|
|
|
|
// callNoStr: "B-89",
|
|
|
|
|
// isQueue: true,
|
|
|
|
|
// isToneReq: true,
|
|
|
|
|
// isVoiceReq: true,
|
|
|
|
|
// concurrentCallDelaySec: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// PatientTicketModel(
|
|
|
|
|
// id: 1,
|
|
|
|
|
// patientID: 112,
|
|
|
|
|
// mobileNo: "112",
|
|
|
|
|
// doctorName: "name",
|
|
|
|
|
// doctorNameN: "nameN",
|
|
|
|
|
// patientGender: 1,
|
|
|
|
|
// callType: 1,
|
|
|
|
|
// roomNo: "617",
|
|
|
|
|
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// queueNo: "B-89",
|
|
|
|
|
// callNoStr: "B-89",
|
|
|
|
|
// isQueue: true,
|
|
|
|
|
// isToneReq: true,
|
|
|
|
|
// isVoiceReq: true,
|
|
|
|
|
// concurrentCallDelaySec: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// PatientTicketModel(
|
|
|
|
|
// id: 1,
|
|
|
|
|
// patientID: 112,
|
|
|
|
|
// mobileNo: "112",
|
|
|
|
|
// doctorName: "name",
|
|
|
|
|
// doctorNameN: "nameN",
|
|
|
|
|
// patientGender: 1,
|
|
|
|
|
// callType: 1,
|
|
|
|
|
// roomNo: "617",
|
|
|
|
|
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
|
|
|
|
|
// queueNo: "B-89",
|
|
|
|
|
// callNoStr: "B-89",
|
|
|
|
|
// isQueue: true,
|
|
|
|
|
// isToneReq: true,
|
|
|
|
|
// isVoiceReq: true,
|
|
|
|
|
// concurrentCallDelaySec: 8,
|
|
|
|
|
// ),
|
|
|
|
|
// ];
|
|
|
|
|
}
|
|
|
|
|
|