diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 04e6ff09..b54bdce0 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -39,10 +39,14 @@ class PatientSearchViewModel extends BaseViewModel { if (strExist) { filterData = []; for (var i = 0; i < _outPatientService.patientList.length; i++) { - String firstName = _outPatientService.patientList[i].firstName!.toUpperCase(); - String lastName = _outPatientService.patientList[i].lastName!.toUpperCase(); - String mobile = _outPatientService.patientList[i].mobileNumber!.toUpperCase(); - String patientID = _outPatientService.patientList[i].patientId.toString(); + String firstName = + _outPatientService.patientList[i].firstName!.toUpperCase(); + String lastName = + _outPatientService.patientList[i].lastName!.toUpperCase(); + String mobile = + _outPatientService.patientList[i].mobileNumber!.toUpperCase(); + String patientID = + _outPatientService.patientList[i].patientId.toString(); if (firstName.contains(str.toUpperCase()) || lastName.contains(str.toUpperCase()) || @@ -58,7 +62,8 @@ class PatientSearchViewModel extends BaseViewModel { } } - getOutPatient(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async { + getOutPatient(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { if (isLocalBusy) { setState(ViewState.BusyLocal); } else { @@ -88,9 +93,11 @@ class PatientSearchViewModel extends BaseViewModel { setState(ViewState.Idle); } - getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async { + getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, + {bool isLocalBusy = false}) async { setState(ViewState.Busy); - await _outPatientService.getPatientFileInformation(patientSearchRequestModel); + await _outPatientService + .getPatientFileInformation(patientSearchRequestModel); if (_outPatientService.hasError) { error = _outPatientService.error!; setState(ViewState.Error); @@ -109,22 +116,32 @@ class PatientSearchViewModel extends BaseViewModel { String dateTo; String dateFrom; if (OutPatientFilterType.Previous == outPatientFilterType) { - selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); - selectedToDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); + selectedFromDate = DateTime( + DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); + selectedToDate = DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); dateTo = AppDateUtils.convertDateToFormat(selectedToDate!, 'yyyy-MM-dd'); dateFrom = AppDateUtils.convertDateToFormat(selectedFromDate!, 'yyyy-MM-dd'); } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { dateTo = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), 'yyyy-MM-dd'); + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 6), + 'yyyy-MM-dd'); dateFrom = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); + DateTime(DateTime.now().year, DateTime.now().month, + DateTime.now().day + 1), + 'yyyy-MM-dd'); } else { dateFrom = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); dateTo = AppDateUtils.convertDateToFormat( - DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); + DateTime( + DateTime.now().year, DateTime.now().month, DateTime.now().day), + 'yyyy-MM-dd'); } PatientSearchRequestModel currentModel = PatientSearchRequestModel(); currentModel.patientID = patientSearchRequestModel!.patientID; @@ -138,23 +155,27 @@ class PatientSearchViewModel extends BaseViewModel { filterData = _outPatientService.patientList; } - PatientInPatientService _inPatientService = locator(); + PatientInPatientService _inPatientService = + locator(); List get inPatientList => _inPatientService.inPatientList; - List get myIinPatientList => _inPatientService.myInPatientList; + List get myIinPatientList => + _inPatientService.myInPatientList; List filteredInPatientItems = []; List filteredMyInPatientItems = []; - Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false}) async { + Future getInPatientList(PatientSearchRequestModel requestModel, + {bool isMyInpatient = false, bool isLocalBusy = false}) async { await getDoctorProfile(); if (isLocalBusy) { setState(ViewState.BusyLocal); } else { setState(ViewState.Busy); } - if (inPatientList.length == 0) await _inPatientService.getInPatientList(requestModel, false); + if (inPatientList.length == 0) + await _inPatientService.getInPatientList(requestModel, false); if (_inPatientService.hasError) { error = _inPatientService.error!; if (isLocalBusy) { @@ -169,7 +190,10 @@ class PatientSearchViewModel extends BaseViewModel { } } - sortInPatient({bool isDes = false, required bool isAllClinic, required bool isMyInPatient}) { + sortInPatient( + {bool isDes = false, + required bool isAllClinic, + required bool isMyInPatient}) { if (isMyInPatient ? myIinPatientList.length > 0 : isAllClinic @@ -182,12 +206,12 @@ class PatientSearchViewModel extends BaseViewModel { : [...filteredInPatientItems]; if (isDes) localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => b - .admissionDateWithDateTimeForm - .compareTo(a.admissionDateWithDateTimeForm)); + .admissionDateWithDateTimeForm! + .compareTo(a.admissionDateWithDateTimeForm!)); else localInPatient.sort((PatiantInformtion a, PatiantInformtion b) => a - .admissionDateWithDateTimeForm - .compareTo(b.admissionDateWithDateTimeForm)); + .admissionDateWithDateTimeForm! + .compareTo(b.admissionDateWithDateTimeForm!)); if (isMyInPatient) { filteredMyInPatientItems.clear(); filteredMyInPatientItems.addAll(localInPatient); diff --git a/lib/models/SOAP/GetPhysicalExamReqModel.dart b/lib/models/SOAP/GetPhysicalExamReqModel.dart index 27b454d2..ea2d8f97 100644 --- a/lib/models/SOAP/GetPhysicalExamReqModel.dart +++ b/lib/models/SOAP/GetPhysicalExamReqModel.dart @@ -1,7 +1,7 @@ class GetPhysicalExamReqModel { int? patientMRN; int? appointmentNo; - int admissionNo; + int? admissionNo; String? episodeID; String? from; String? to; diff --git a/lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart b/lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart index 2b49066e..4d5efc98 100644 --- a/lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart +++ b/lib/models/SOAP/in_patient/GetEpisodeForInpatientReqModel.dart @@ -1,7 +1,7 @@ class GetEpisodeForInpatientReqModel { - int patientID; - int patientTypeID; - int admissionNo; + int? patientID; + int? patientTypeID; + int? admissionNo; GetEpisodeForInpatientReqModel( {this.patientID, this.patientTypeID, this.admissionNo}); diff --git a/lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart b/lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart index 2dff7a60..b9ea104e 100644 --- a/lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart +++ b/lib/models/SOAP/in_patient/PostEpisodeForInpatientRequestModel.dart @@ -1,7 +1,7 @@ class PostEpisodeForInpatientRequestModel { - int admissionNo; - int patientID; - int patientTypeID; + int? admissionNo; + int? patientID; + int? patientTypeID; PostEpisodeForInpatientRequestModel( {this.admissionNo, this.patientID, this.patientTypeID = 1}); diff --git a/lib/models/SOAP/selected_items/my_selected_allergy.dart b/lib/models/SOAP/selected_items/my_selected_allergy.dart index b3f58310..01d47b22 100644 --- a/lib/models/SOAP/selected_items/my_selected_allergy.dart +++ b/lib/models/SOAP/selected_items/my_selected_allergy.dart @@ -5,10 +5,10 @@ class MySelectedAllergy { MasterKeyModel? selectedAllergy; String? remark; bool? isChecked; - bool isExpanded; - bool isLocal; - int ?createdBy; - bool hasValidationError; + bool? isExpanded; + bool? isLocal; + int? createdBy; + bool? hasValidationError; MySelectedAllergy( {this.selectedAllergySeverity, @@ -19,5 +19,4 @@ class MySelectedAllergy { this.isLocal = true, this.createdBy, this.hasValidationError = false}); - } diff --git a/lib/models/SOAP/selected_items/my_selected_assement.dart b/lib/models/SOAP/selected_items/my_selected_assement.dart index 13a95905..acadceda 100644 --- a/lib/models/SOAP/selected_items/my_selected_assement.dart +++ b/lib/models/SOAP/selected_items/my_selected_assement.dart @@ -16,9 +16,11 @@ class MySelectedAssessment { {this.selectedICD, this.selectedDiagnosisCondition, this.selectedDiagnosisType, - this.remark, this.appointmentId, this.createdBy, - this.createdOn, - this.doctorID, - this.doctorName, - this.icdCode10ID}); + this.remark, + this.appointmentId, + this.createdBy, + this.createdOn, + this.doctorID, + this.doctorName, + this.icdCode10ID}); } diff --git a/lib/models/SOAP/selected_items/my_selected_history.dart b/lib/models/SOAP/selected_items/my_selected_history.dart index 3769c418..177fb46e 100644 --- a/lib/models/SOAP/selected_items/my_selected_history.dart +++ b/lib/models/SOAP/selected_items/my_selected_history.dart @@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class MySelectedHistory { MasterKeyModel selectedHistory; String remark; - bool isChecked; - bool isLocal; + bool? isChecked; + bool? isLocal; MySelectedHistory( {this.selectedHistory, this.remark, this.isChecked, this.isLocal = true}); diff --git a/lib/models/admisson_orders/admission_orders_model.dart b/lib/models/admisson_orders/admission_orders_model.dart index a0891a02..01539342 100644 --- a/lib/models/admisson_orders/admission_orders_model.dart +++ b/lib/models/admisson_orders/admission_orders_model.dart @@ -1,15 +1,15 @@ class AdmissionOrdersModel { - int procedureID; - String procedureName; - String procedureNameN; - int orderNo; - int doctorID; - int clinicID; - String createdOn; - int createdBy; - String editedOn; - int editedBy; - String createdByName; + int? procedureID; + String? procedureName; + String? procedureNameN; + int? orderNo; + int? doctorID; + int? clinicID; + String? createdOn; + int? createdBy; + String? editedOn; + int? editedBy; + String? createdByName; AdmissionOrdersModel( {this.procedureID, diff --git a/lib/models/admisson_orders/admission_orders_request_model.dart b/lib/models/admisson_orders/admission_orders_request_model.dart index 897bb8f8..4b6296e5 100644 --- a/lib/models/admisson_orders/admission_orders_request_model.dart +++ b/lib/models/admisson_orders/admission_orders_request_model.dart @@ -1,20 +1,20 @@ class AdmissionOrdersRequestModel { - bool isDentalAllowedBackend; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int deviceTypeID; - String tokenID; - int patientID; - int admissionNo; - String sessionID; - int projectID; - String setupID; - bool patientOutSA; - int patientType; - int patientTypeID; + bool? isDentalAllowedBackend; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? deviceTypeID; + String? tokenID; + int? patientID; + int? admissionNo; + String? sessionID; + int? projectID; + String? setupID; + bool? patientOutSA; + int? patientType; + int? patientTypeID; AdmissionOrdersRequestModel( {this.isDentalAllowedBackend, diff --git a/lib/models/countriesModel.dart b/lib/models/countriesModel.dart index 89797fab..79ba027e 100644 --- a/lib/models/countriesModel.dart +++ b/lib/models/countriesModel.dart @@ -16,10 +16,10 @@ // } class Countries { - String name; - String nameAr; - String code; - String countryCode; + String? name; + String? nameAr; + String? code; + String? countryCode; Countries({this.name, this.nameAr, this.code, this.countryCode}); diff --git a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart index 2d2c14ad..cc643e3f 100644 --- a/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart +++ b/lib/models/discharge_summary/GetDischargeSummaryReqModel.dart @@ -1,11 +1,14 @@ class GetDischargeSummaryReqModel { - int patientID; - int admissionNo; - int patientType; - int patientTypeID; + int? patientID; + int? admissionNo; + int? patientType; + int? patientTypeID; GetDischargeSummaryReqModel( - {this.patientID, this.admissionNo, this.patientType = 1, this.patientTypeID=1}); + {this.patientID, + this.admissionNo, + this.patientType = 1, + this.patientTypeID = 1}); GetDischargeSummaryReqModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/models/discharge_summary/GetDischargeSummaryResModel.dart b/lib/models/discharge_summary/GetDischargeSummaryResModel.dart index 10ddab00..214acc97 100644 --- a/lib/models/discharge_summary/GetDischargeSummaryResModel.dart +++ b/lib/models/discharge_summary/GetDischargeSummaryResModel.dart @@ -1,33 +1,33 @@ class GetDischargeSummaryResModel { - String setupID; - int projectID; - int dischargeNo; - String dischargeDate; - int admissionNo; - int assessmentNo; - int patientType; - int patientID; - int clinicID; - int doctorID; - String finalDiagnosis; - String persentation; - String pastHistory; - String planOfCare; - String investigations; - String followupPlan; - String conditionOnDischarge; - String significantFindings; - String planedProcedure; - int daysStayed; - String remarks; - String eRCare; - int status; - bool isActive; - int createdBy; - String createdOn; - int editedBy; - String editedOn; - bool isPatientDied; + String? setupID; + int? projectID; + int? dischargeNo; + String? dischargeDate; + int? admissionNo; + int? assessmentNo; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + String? finalDiagnosis; + String? persentation; + String? pastHistory; + String? planOfCare; + String? investigations; + String? followupPlan; + String? conditionOnDischarge; + String? significantFindings; + String? planedProcedure; + int? daysStayed; + String? remarks; + String? eRCare; + int? status; + bool? isActive; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + bool? isPatientDied; dynamic isMedicineApproved; dynamic isOpenBillDischarge; dynamic activatedDate; @@ -36,16 +36,16 @@ class GetDischargeSummaryResModel { dynamic patientCodition; dynamic others; dynamic reconciliationInstruction; - String dischargeInstructions; - String reason; + String? dischargeInstructions; + String? reason; dynamic dischargeDisposition; dynamic hospitalID; - String createdByName; + String? createdByName; dynamic createdByNameN; - String editedByName; + String? editedByName; dynamic editedByNameN; - String clinicName; - String projectName; + String? clinicName; + String? projectName; GetDischargeSummaryResModel( {this.setupID, diff --git a/lib/models/doctor/replay/request_create_doctor_response.dart b/lib/models/doctor/replay/request_create_doctor_response.dart index 49e421d9..0544ef05 100644 --- a/lib/models/doctor/replay/request_create_doctor_response.dart +++ b/lib/models/doctor/replay/request_create_doctor_response.dart @@ -1,24 +1,24 @@ class CreateDoctorResponseModel { - String setupID; - int projectID; - String transactionNo; - int infoEnteredBy; - int infoStatus; - int createdBy; - int editedBy; - String doctorResponse; - int doctorID; + String? setupID; + int? projectID; + String? transactionNo; + int? infoEnteredBy; + int? infoStatus; + int? createdBy; + int? editedBy; + String? doctorResponse; + int? doctorID; CreateDoctorResponseModel( {this.setupID, - this.projectID, - this.transactionNo, - this.infoEnteredBy, - this.infoStatus, - this.createdBy, - this.editedBy, - this.doctorResponse, - this.doctorID}); + this.projectID, + this.transactionNo, + this.infoEnteredBy, + this.infoStatus, + this.createdBy, + this.editedBy, + this.doctorResponse, + this.doctorID}); CreateDoctorResponseModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/doctor/replay/request_doctor_reply.dart b/lib/models/doctor/replay/request_doctor_reply.dart index f2daa591..8283801a 100644 --- a/lib/models/doctor/replay/request_doctor_reply.dart +++ b/lib/models/doctor/replay/request_doctor_reply.dart @@ -13,9 +13,9 @@ class RequestDoctorReply { String? sessionID; bool? isLoginForDoctorApp; bool? patientOutSA; - int pageIndex; - int pageSize; - int infoStatus; + int? pageIndex; + int? pageSize; + int? infoStatus; RequestDoctorReply( {this.projectID, @@ -68,8 +68,7 @@ class RequestDoctorReply { data['PatientOutSA'] = this.patientOutSA; data['PageIndex'] = this.pageIndex; data['PageSize'] = this.pageSize; - if(this.infoStatus != null) - data['InfoStatus'] = this.infoStatus; + if (this.infoStatus != null) data['InfoStatus'] = this.infoStatus; return data; } } diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index 7309c410..c4b0d224 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -5,17 +5,17 @@ class StartCallRes { bool? isAuthenticated; int? messageStatus; String? appointmentNo; - bool isRecording; + bool? isRecording; - StartCallRes( - {this.result, - this.openSessionID, - this.openTokenID, - this.isAuthenticated, - this.appointmentNo, - this.messageStatus, - this.isRecording = true, - }); + StartCallRes({ + this.result, + this.openSessionID, + this.openTokenID, + this.isAuthenticated, + this.appointmentNo, + this.messageStatus, + this.isRecording = true, + }); StartCallRes.fromJson(Map json) { result = json['Result']; diff --git a/lib/models/operation_report/create_update_operation_report_request_model.dart b/lib/models/operation_report/create_update_operation_report_request_model.dart index f6d72b1b..cecbce0b 100644 --- a/lib/models/operation_report/create_update_operation_report_request_model.dart +++ b/lib/models/operation_report/create_update_operation_report_request_model.dart @@ -1,54 +1,54 @@ class CreateUpdateOperationReportRequestModel { - String setupID; - int patientID; - int reservationNo; - int admissionNo; - String preOpDiagmosis; - String postOpDiagmosis; - String surgeon; - String assistant; - String anasthetist; - String operation; - String inasion; - String finding; - String surgeryProcedure; - String postOpInstruction; - int createdBy; - int editedBy; - String complicationDetails; - String bloodLossDetail; - String histopathSpecimen; - String microbiologySpecimen; - String otherSpecimen; - String scrubNurse; - String circulatingNurse; - String bloodTransfusedDetail; + String? setupID; + int? patientID; + int? reservationNo; + int? admissionNo; + String? preOpDiagmosis; + String? postOpDiagmosis; + String? surgeon; + String? assistant; + String? anasthetist; + String? operation; + String? inasion; + String? finding; + String? surgeryProcedure; + String? postOpInstruction; + int? createdBy; + int? editedBy; + String? complicationDetails; + String? bloodLossDetail; + String? histopathSpecimen; + String? microbiologySpecimen; + String? otherSpecimen; + String? scrubNurse; + String? circulatingNurse; + String? bloodTransfusedDetail; CreateUpdateOperationReportRequestModel( {this.setupID, - this.patientID, - this.reservationNo, - this.admissionNo, - this.preOpDiagmosis, - this.postOpDiagmosis, - this.surgeon, - this.assistant, - this.anasthetist, - this.operation, - this.inasion, - this.finding, - this.surgeryProcedure, - this.postOpInstruction, - this.createdBy, - this.editedBy, - this.complicationDetails, - this.bloodLossDetail, - this.histopathSpecimen, - this.microbiologySpecimen, - this.otherSpecimen, - this.scrubNurse, - this.circulatingNurse, - this.bloodTransfusedDetail}); + this.patientID, + this.reservationNo, + this.admissionNo, + this.preOpDiagmosis, + this.postOpDiagmosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.createdBy, + this.editedBy, + this.complicationDetails, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); CreateUpdateOperationReportRequestModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/operation_report/get_operation_details_request_modle.dart b/lib/models/operation_report/get_operation_details_request_modle.dart index 7e23b503..fd7be8a4 100644 --- a/lib/models/operation_report/get_operation_details_request_modle.dart +++ b/lib/models/operation_report/get_operation_details_request_modle.dart @@ -1,34 +1,34 @@ class GetOperationDetailsRequestModel { - bool isDentalAllowedBackend; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int deviceTypeID; - String tokenID; - int patientID; - int reservationNo; - String sessionID; - int projectID; - String setupID; - bool patientOutSA; + bool? isDentalAllowedBackend; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? deviceTypeID; + String? tokenID; + int? patientID; + int? reservationNo; + String? sessionID; + int? projectID; + String? setupID; + bool? patientOutSA; GetOperationDetailsRequestModel( {this.isDentalAllowedBackend = false, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.deviceTypeID, - this.tokenID, - this.patientID, - this.reservationNo, - this.sessionID, - this.projectID, - this.setupID, - this.patientOutSA}); + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.reservationNo, + this.sessionID, + this.projectID, + this.setupID, + this.patientOutSA}); GetOperationDetailsRequestModel.fromJson(Map json) { isDentalAllowedBackend = json['isDentalAllowedBackend']; diff --git a/lib/models/operation_report/get_operation_details_response_modle.dart b/lib/models/operation_report/get_operation_details_response_modle.dart index 04540ea6..b57acc4a 100644 --- a/lib/models/operation_report/get_operation_details_response_modle.dart +++ b/lib/models/operation_report/get_operation_details_response_modle.dart @@ -1,74 +1,74 @@ class GetOperationDetailsResponseModel { - String setupID; - int projectID; - int reservationNo; - int patientID; - int admissionID; + String? setupID; + int? projectID; + int? reservationNo; + int? patientID; + int? admissionID; dynamic surgeryDate; - String preOpDiagnosis; - String postOpDiagnosis; - String surgeon; - String assistant; - String anasthetist; - String operation; - String inasion; - String finding; - String surgeryProcedure; - String postOpInstruction; - bool isActive; - int createdBy; - String createdName; + String? preOpDiagnosis; + String? postOpDiagnosis; + String? surgeon; + String? assistant; + String? anasthetist; + String? operation; + String? inasion; + String? finding; + String? surgeryProcedure; + String? postOpInstruction; + bool? isActive; + int? createdBy; + String? createdName; dynamic createdNameN; - String createdOn; + String? createdOn; dynamic editedBy; dynamic editedByName; dynamic editedByNameN; dynamic editedOn; dynamic oRBookStatus; - String complicationDetail; - String bloodLossDetail; - String histopathSpecimen; - String microbiologySpecimen; - String otherSpecimen; + String? complicationDetail; + String? bloodLossDetail; + String? histopathSpecimen; + String? microbiologySpecimen; + String? otherSpecimen; dynamic scrubNurse; dynamic circulatingNurse; dynamic bloodTransfusedDetail; GetOperationDetailsResponseModel( {this.setupID, - this.projectID, - this.reservationNo, - this.patientID, - this.admissionID, - this.surgeryDate, - this.preOpDiagnosis, - this.postOpDiagnosis, - this.surgeon, - this.assistant, - this.anasthetist, - this.operation, - this.inasion, - this.finding, - this.surgeryProcedure, - this.postOpInstruction, - this.isActive, - this.createdBy, - this.createdName, - this.createdNameN, - this.createdOn, - this.editedBy, - this.editedByName, - this.editedByNameN, - this.editedOn, - this.oRBookStatus, - this.complicationDetail, - this.bloodLossDetail, - this.histopathSpecimen, - this.microbiologySpecimen, - this.otherSpecimen, - this.scrubNurse, - this.circulatingNurse, - this.bloodTransfusedDetail}); + this.projectID, + this.reservationNo, + this.patientID, + this.admissionID, + this.surgeryDate, + this.preOpDiagnosis, + this.postOpDiagnosis, + this.surgeon, + this.assistant, + this.anasthetist, + this.operation, + this.inasion, + this.finding, + this.surgeryProcedure, + this.postOpInstruction, + this.isActive, + this.createdBy, + this.createdName, + this.createdNameN, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedByNameN, + this.editedOn, + this.oRBookStatus, + this.complicationDetail, + this.bloodLossDetail, + this.histopathSpecimen, + this.microbiologySpecimen, + this.otherSpecimen, + this.scrubNurse, + this.circulatingNurse, + this.bloodTransfusedDetail}); GetOperationDetailsResponseModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/operation_report/get_reservations_request_model.dart b/lib/models/operation_report/get_reservations_request_model.dart index 06425254..8de0bbf3 100644 --- a/lib/models/operation_report/get_reservations_request_model.dart +++ b/lib/models/operation_report/get_reservations_request_model.dart @@ -1,17 +1,17 @@ class GetReservationsRequestModel { - int patientID; - int projectID; - String doctorID; - int clinicID; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - bool patientOutSA; - int deviceTypeID; - String tokenID; - String sessionID; + int? patientID; + int? projectID; + String? doctorID; + int? clinicID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + bool? patientOutSA; + int? deviceTypeID; + String? tokenID; + String? sessionID; GetReservationsRequestModel( {this.patientID, diff --git a/lib/models/operation_report/get_reservations_response_model.dart b/lib/models/operation_report/get_reservations_response_model.dart index 3bebdc8b..b6191353 100644 --- a/lib/models/operation_report/get_reservations_response_model.dart +++ b/lib/models/operation_report/get_reservations_response_model.dart @@ -1,38 +1,38 @@ class GetReservationsResponseModel { - String setupID; - int projectID; - int oTReservationID; - String oTReservationDate; - String oTReservationDateN; - int oTID; - int admissionRequestNo; - int admissionNo; - int primaryDoctorID; - int patientType; - int patientID; - int patientStatusType; - int clinicID; - int doctorID; - String operationDate; - int operationType; - String endDate; - String timeStart; - String timeEnd; + String? setupID; + int? projectID; + int? oTReservationID; + String? oTReservationDate; + String? oTReservationDateN; + int? oTID; + int? admissionRequestNo; + int? admissionNo; + int? primaryDoctorID; + int? patientType; + int? patientID; + int? patientStatusType; + int? clinicID; + int? doctorID; + String? operationDate; + int? operationType; + String? endDate; + String? timeStart; + String? timeEnd; dynamic remarks; - int status; - int createdBy; - String createdOn; - int editedBy; - String editedOn; - String patientName; + int? status; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + String? patientName; Null patientNameN; Null gender; - String dateofBirth; - String mobileNumber; - String emailAddress; - String doctorName; + String? dateofBirth; + String? mobileNumber; + String? emailAddress; + String? doctorName; Null doctorNameN; - String clinicDescription; + String? clinicDescription; Null clinicDescriptionN; GetReservationsResponseModel( diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index aa27d68e..2ab6ba90 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -3,11 +3,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class PatiantInformtion { - PatiantInformtion? patientDetails; + PatiantInformtion? patientDetails; int? genderInt; dynamic age; String? appointmentDate; - DateTime appointmentDateWithDateTimeForm; + DateTime? appointmentDateWithDateTimeForm; dynamic appointmentNo; dynamic appointmentType; String? arrivalTime; @@ -55,7 +55,7 @@ class PatiantInformtion { int? patientMRN; String? admissionNo; String? admissionDate; - DateTime admissionDateWithDateTimeForm; + DateTime? admissionDateWithDateTimeForm; String? createdOn; String? roomId; String? bedId; @@ -79,7 +79,7 @@ class PatiantInformtion { int? vcId; String? voipToken; - PatiantInformtion( + PatiantInformtion( {this.patientDetails, this.projectId, this.clinicId, @@ -158,7 +158,9 @@ class PatiantInformtion { PatiantInformtion.fromJson(Map json) { { - patientDetails = json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails']) : null; + patientDetails = json['patientDetails'] != null + ? new PatiantInformtion.fromJson(json['patientDetails']) + : null; projectId = json["ProjectID"] ?? json["projectID"]; clinicId = json["ClinicID"] ?? json["clinicID"]; doctorId = json["DoctorID"] ?? json["doctorID"]; @@ -186,7 +188,8 @@ class PatiantInformtion { nationalityId = json["NationalityID"] ?? json["nationalityID"]; mobileNumber = json["MobileNumber"] ?? json["mobileNumber"]; emailAddress = json["EmailAddress"] ?? json["emailAddress"]; - patientIdentificationNo = json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; + patientIdentificationNo = + json["PatientIdentificationNo"] ?? json["patientIdentificationNo"]; //TODO make 7 dynamic when the backend retrun it in patient arrival patientType = json["PatientType"] ?? json["patientType"] ?? 1; admissionNo = json["AdmissionNo"] ?? json["admissionNo"]; @@ -196,10 +199,16 @@ class PatiantInformtion { bedId = json["BedID"] ?? json["bedID"]; nursingStationId = json["NursingStationID"] ?? json["nursingStationID"]; description = json["Description"] ?? json["description"]; - clinicDescription = json["ClinicDescription"] ?? json["clinicDescription"]; - clinicDescriptionN = json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; - nationalityName = json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName']; - nationalityNameN = json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN']; + clinicDescription = + json["ClinicDescription"] ?? json["clinicDescription"]; + clinicDescriptionN = + json["ClinicDescriptionN"] ?? json["clinicDescriptionN"]; + nationalityName = json["NationalityName"] ?? + json["nationalityName"] ?? + json['NationalityName']; + nationalityNameN = json["NationalityNameN"] ?? + json["nationalityNameN"] ?? + json['NationalityNameN']; age = json["Age"] ?? json["age"]; genderDescription = json["GenderDescription"]; nursingStationName = json["NursingStationName"]; @@ -207,7 +216,8 @@ class PatiantInformtion { startTime = json["startTime"] ?? json['StartTime']; appointmentNo = json['appointmentNo'] ?? json['AppointmentNo']; appointmentType = json['appointmentType']; - appointmentTypeId = json['appointmentTypeId'] ?? json['appointmentTypeid']; + appointmentTypeId = + json['appointmentTypeId'] ?? json['appointmentTypeid']; arrivedOn = json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn']; clinicGroupId = json['clinicGroupId']; companyName = json['companyName']; @@ -229,9 +239,12 @@ class PatiantInformtion { ? int?.parse(json["patientId"].toString()) : ''); visitType = json['visitType'] ?? json['visitType'] ?? json['visitType']; - nationalityFlagURL = json['NationalityFlagURL'] ?? json['NationalityFlagURL']; - patientStatusType = json['patientStatusType'] ?? json['PatientStatusType']; - visitTypeId = json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; + nationalityFlagURL = + json['NationalityFlagURL'] ?? json['NationalityFlagURL']; + patientStatusType = + json['patientStatusType'] ?? json['PatientStatusType']; + visitTypeId = + json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid']; startTimes = json['StartTime'] ?? json['StartTime']; dischargeDate = json['DischargeDate']; status = json['Status']; @@ -254,8 +267,9 @@ class PatiantInformtion { ? AppDateUtils.convertStringToDate(json["admissionDate"]) : null; - appointmentDateWithDateTimeForm = - json["AppointmentDate"] != null ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) : null; + appointmentDateWithDateTimeForm = json["AppointmentDate"] != null + ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) + : null; } } @@ -303,7 +317,8 @@ class PatiantInformtion { data["gender"] = this.gender; data['Age'] = this.age; - data['AppointmentDate'] = this.appointmentDate.isNotEmpty ? this.appointmentDate : null; + data['AppointmentDate'] = + this.appointmentDate!.isNotEmpty ? this.appointmentDate : null; data['AppointmentNo'] = this.appointmentNo; data['ArrivalTime'] = this.arrivalTime; diff --git a/lib/models/pending_orders/pending_order_request_model.dart b/lib/models/pending_orders/pending_order_request_model.dart index c69cf780..47577b16 100644 --- a/lib/models/pending_orders/pending_order_request_model.dart +++ b/lib/models/pending_orders/pending_order_request_model.dart @@ -1,20 +1,20 @@ class PendingOrderRequestModel { - bool isDentalAllowedBackend; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int deviceTypeID; - String tokenID; - int patientID; - int admissionNo; - String sessionID; - int projectID; - String setupID; - bool patientOutSA; - int patientType; - int patientTypeID; + bool? isDentalAllowedBackend; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? deviceTypeID; + String? tokenID; + int? patientID; + int? admissionNo; + String? sessionID; + int? projectID; + String? setupID; + bool? patientOutSA; + int? patientType; + int? patientTypeID; PendingOrderRequestModel( {this.isDentalAllowedBackend, diff --git a/lib/models/pending_orders/pending_orders_model.dart b/lib/models/pending_orders/pending_orders_model.dart index 89525369..65f93f89 100644 --- a/lib/models/pending_orders/pending_orders_model.dart +++ b/lib/models/pending_orders/pending_orders_model.dart @@ -1,5 +1,5 @@ class PendingOrderModel { - String notes; + String? notes; PendingOrderModel({this.notes}); diff --git a/lib/models/sickleave/sick_leave_statisitics_model.dart b/lib/models/sickleave/sick_leave_statisitics_model.dart index f679807c..179664a6 100644 --- a/lib/models/sickleave/sick_leave_statisitics_model.dart +++ b/lib/models/sickleave/sick_leave_statisitics_model.dart @@ -1,12 +1,12 @@ class SickLeaveStatisticsModel { - String recommendedSickLeaveDays; - int totalLeavesByAllClinics; - int totalLeavesByDoctor; + String? recommendedSickLeaveDays; + int? totalLeavesByAllClinics; + int? totalLeavesByDoctor; SickLeaveStatisticsModel( {this.recommendedSickLeaveDays, - this.totalLeavesByAllClinics, - this.totalLeavesByDoctor}); + this.totalLeavesByAllClinics, + this.totalLeavesByDoctor}); SickLeaveStatisticsModel.fromJson(Map json) { recommendedSickLeaveDays = json['recommendedSickLeaveDays']; diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index f78bef85..f62e3e11 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -18,7 +18,8 @@ class VideoCallPage extends StatefulWidget { final PatiantInformtion patientData; final listContext; final LiveCarePatientViewModel model; - VideoCallPage({required this.patientData, this.listContext, required this.model}); + VideoCallPage( + {required this.patientData, this.listContext, required this.model}); @override _VideoCallPageState createState() => _VideoCallPageState(); @@ -66,8 +67,12 @@ class _VideoCallPageState extends State { //'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg', kApiKey: '46209962', vcId: widget.patientData.vcId, - isRecording: tokenData != null ? tokenData.isRecording: false, - patientName: widget.patientData.fullName != null ? widget.patientData.fullName! : widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-", + isRecording: tokenData != null ? tokenData.isRecording! : false, + patientName: widget.patientData.fullName != null + ? widget.patientData.fullName! + : widget.patientData.firstName != null + ? "${widget.patientData.firstName} ${widget.patientData.lastName}" + : "-", tokenID: token, //"hfkjshdf347r8743", generalId: "Cs2020@2016\$2958", doctorId: doctorprofile['DoctorID'], @@ -98,7 +103,8 @@ class _VideoCallPageState extends State { }); connectOpenTok(result); - }).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } @override @@ -126,14 +132,20 @@ class _VideoCallPageState extends State { ), Text( _start == 0 ? 'Dailing' : 'Connected', - style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), + style: TextStyle( + color: Colors.deepPurpleAccent, + fontWeight: FontWeight.w300, + fontSize: 15), ), SizedBox( height: MediaQuery.of(context).size.height * 0.02, ), Text( widget.patientData.fullName!, - style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w900, fontSize: 20), + style: TextStyle( + color: Colors.deepPurpleAccent, + fontWeight: FontWeight.w900, + fontSize: 20), ), SizedBox( height: MediaQuery.of(context).size.height * 0.02, @@ -141,7 +153,10 @@ class _VideoCallPageState extends State { Container( child: Text( _start == 0 ? 'Connecting...' : _timmer.toString(), - style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), + style: TextStyle( + color: Colors.deepPurpleAccent, + fontWeight: FontWeight.w300, + fontSize: 15), )), SizedBox( height: MediaQuery.of(context).size.height * 0.02, @@ -188,8 +203,8 @@ class _VideoCallPageState extends State { _showAlert(BuildContext context) async { await showDialog( context: context, - builder: (dialogContex) => - AlertDialog(content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) { + builder: (dialogContex) => AlertDialog(content: StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { return Container( height: MediaQuery.of(context).size.height * 0.7, width: MediaQuery.of(context).size.width * .9, @@ -202,7 +217,8 @@ class _VideoCallPageState extends State { top: -40.0, child: InkResponse( onTap: () { - Navigator.of(context, rootNavigator: true).pop('dialog'); + Navigator.of(context, rootNavigator: true) + .pop('dialog'); Navigator.of(context).pop(); }, child: CircleAvatar( @@ -220,7 +236,8 @@ class _VideoCallPageState extends State { padding: EdgeInsets.all(8.0), child: RaisedButton( onPressed: () => {endCall()}, - child: Text(TranslationBase.of(context).endcall!), + child: + Text(TranslationBase.of(context).endcall!), color: Colors.red, textColor: Colors.white, )), @@ -228,7 +245,8 @@ class _VideoCallPageState extends State { padding: EdgeInsets.all(8.0), child: RaisedButton( onPressed: () => {resumeCall()}, - child: Text(TranslationBase.of(context).resumecall!), + child: + Text(TranslationBase.of(context).resumecall!), color: Colors.green[900], textColor: Colors.white, ), @@ -237,7 +255,8 @@ class _VideoCallPageState extends State { padding: EdgeInsets.all(8.0), child: RaisedButton( onPressed: () => {endCallWithCharge()}, - child: Text(TranslationBase.of(context).endcallwithcharge!), + child: Text(TranslationBase.of(context) + .endcallwithcharge!), textColor: Colors.white, ), ), @@ -247,7 +266,8 @@ class _VideoCallPageState extends State { onPressed: () => { setState(() => {isTransfer = true}) }, - child: Text(TranslationBase.of(context).transfertoadmin!), + child: Text( + TranslationBase.of(context).transfertoadmin!), color: Colors.yellow[900], ), ), @@ -261,11 +281,14 @@ class _VideoCallPageState extends State { child: TextField( maxLines: 3, controller: notes, - decoration: InputDecoration.collapsed(hintText: "Enter your notes here"), + decoration: InputDecoration.collapsed( + hintText: + "Enter your notes here"), )), Center( child: RaisedButton( - onPressed: () => {this.transferToAdmin(notes)}, + onPressed: () => + {this.transferToAdmin(notes)}, child: Text('Transfer'), color: Colors.yellow[900], )) @@ -287,24 +310,33 @@ class _VideoCallPageState extends State { transferToAdmin(notes) { closeRoute(); - _liveCareProvider.transfterToAdmin(widget.patientData, notes).then((result) { + _liveCareProvider + .transfterToAdmin(widget.patientData, notes) + .then((result) { connectOpenTok(result); - }).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } endCall() { closeRoute(); - _liveCareProvider.endCall(widget.patientData, false, doctorprofile['DoctorID']).then((result) { + _liveCareProvider + .endCall(widget.patientData, false, doctorprofile['DoctorID']) + .then((result) { print(result); - }).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } endCallWithCharge() { - _liveCareProvider.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']).then((result) { + _liveCareProvider + .endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']) + .then((result) { closeRoute(); print('end callwith charge'); print(result); - }).catchError((error) => {Helpers.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => + {Helpers.showErrorToast(error), Navigator.of(context).pop()}); } closeRoute() { diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 7045d694..a8df56a3 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -59,7 +59,6 @@ class _DischargedPatientState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox( height: 12, ), @@ -70,6 +69,7 @@ class _DischargedPatientState extends State { }, marginTop: 0, suffixIcon: IconButton( + onPressed: () {}, icon: Icon( DoctorApp.filter_1, color: Colors.black, diff --git a/lib/screens/patients/register_patient/CustomEditableText.dart b/lib/screens/patients/register_patient/CustomEditableText.dart index 58713495..ac20d1e1 100644 --- a/lib/screens/patients/register_patient/CustomEditableText.dart +++ b/lib/screens/patients/register_patient/CustomEditableText.dart @@ -9,7 +9,8 @@ class CustomEditableText extends StatefulWidget { Key key, required this.controller, this.hint, - this.isEditable = false, this.isSubmitted, + this.isEditable = false, + this.isSubmitted, }) : super(key: key); final TextEditingController controller; @@ -27,7 +28,7 @@ class _CustomEditableTextState extends State { Widget build(BuildContext context) { return Column( children: [ - if(!widget.isEditable) + if (!widget.isEditable) Container( height: 60, decoration: BoxDecoration( @@ -36,7 +37,7 @@ class _CustomEditableTextState extends State { borderRadius: BorderRadius.all(Radius.circular(20)), border: Border.fromBorderSide( BorderSide( - color: Colors.grey[300], + color: Colors.grey[300]!, width: 2, ), ), @@ -62,7 +63,6 @@ class _CustomEditableTextState extends State { child: Icon( DoctorApp.edit_1, size: 20, - ), onTap: () { setState(() { @@ -74,17 +74,15 @@ class _CustomEditableTextState extends State { ), ), ), - if(widget.isEditable) + if (widget.isEditable) AppTextFieldCustom( hintText: widget.hint, //TranslationBase.of(context).addoperationReports, controller: widget.controller, - validationError: widget.controller - .text.isEmpty && - widget.isSubmitted - ? TranslationBase.of(context) - .emptyMessage - : null, + validationError: + widget.controller.text.isEmpty && widget.isSubmitted + ? TranslationBase.of(context).emptyMessage + : null, maxLines: 1, minLines: 1, hasBorder: true, @@ -92,4 +90,4 @@ class _CustomEditableTextState extends State { ], ); } -} \ No newline at end of file +}